walkor / browserquest-php Goto Github PK
View Code? Open in Web Editor NEWBrowserQuest server in PHP base on workerman. A PHP/HTML5/JavaScript multiplayer game experiment.
License: MIT License
BrowserQuest server in PHP base on workerman. A PHP/HTML5/JavaScript multiplayer game experiment.
License: MIT License
i made GIF:
https://imgur.com/a/dNXHije
请问服务端支持https吗?
支持的话是不是只需要改用WSS就行了?
Hi walkor,
I am unable to run the server in Windows environment. see below error messages.
What dependency I need to install to make it working in Windows environment?
by the way, I am a C#/.NET Web Developer and I have no experience of using php.
Thanks,
Kevin
ERROR MESSAGES:
C:\projects\BrowserQuest-PHP>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
C:\projects\BrowserQuest-PHP>php start.php start
PHP Fatal error: Uncaught Error: Call to undefined function Workerman\Lib\pcntl
_signal() in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.p
hp:57
Stack trace:
#0 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(489): Work
erman\Lib\Timer::init()
#1 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(424): Work
erman\Worker::init()
#2 C:\projects\BrowserQuest-PHP\start.php(25): Workerman\Worker::runAll()
#3 {main}
thrown in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.ph
p on line 57
Fatal error: Uncaught Error: Call to undefined function Workerman\Lib\pcntl_sign
al() in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.php:57
Stack trace:
#0 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(489): Work
erman\Lib\Timer::init()
#1 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(424): Work
erman\Worker::init()
#2 C:\projects\BrowserQuest-PHP\start.php(25): Workerman\Worker::runAll()
#3 {main}
thrown in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.ph
p on line 57
C:\projects\BrowserQuest-PHP>php start.php start -d
PHP Fatal error: Uncaught Error: Call to undefined function Workerman\Lib\pcntl
_signal() in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.p
hp:57
Stack trace:
#0 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(489): Work
erman\Lib\Timer::init()
#1 C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Worker.php(424): Work
erman\Worker::init()
#2 C:\projects\BrowserQuest-PHP\start.php(25): Workerman\Worker::runAll()
#3 {main}
thrown in C:\projects\BrowserQuest-PHP\vendor\workerman\workerman\Lib\Timer.ph
p on line 57
我想要在网站上套cloudflare的CDN,其CDN支持443,2083,8443等端口的SSL流量,我需要修改什么配置才能实现。
另 #5 该网站配置SSL相关已无
$this->connection->close('Player was idle for too long');
For Server, not showing that message
For client, got an error..
Uncaught SyntaxError: Unexpected token P in JSON at position 0
at JSON.parse ()
at Class.receiveMessage (gameclient.js:129)
at WebSocket.connection.onmessage (gameclient.js:88)
这个文件夹,以及里面的音乐文件,你有么?我找了原版的,好像一样没有该文件夹
Server端正常启动 监听8000端口:
Workerman[start.php] start in DEBUG mode
----------------------- WORKERMAN -----------------------------
Workerman version:3.4.3 PHP version:7.0.6
------------------------ WORKERS -------------------------------
user worker listen processes status
root BrowserQuestWorker websocket://0.0.0.0:8000 1 [OK]
----------------------------------------------------------------
Press Ctrl-C to quit. Start success.
world1 created capacity: 1000 players
然后把web端放到nginx的vhost目录下,配置文件config_local.json内容为
{
"host": "x.x.x.x", //x.x.x.x 为我的服务器IP
"port": 8000,
"dispatcher": false
}
访问网址,输入用户名之后就一直卡在Connecting to server...这个界面.
防火墙已关,请问是什么原因呢?
I tried to run this project through the xampp server. But there the index page comes and when I give a name and click the play button, nothing happens. Loading continues. I am on windows os and ran the project in both edge and firefox browsers. But the result is the same. I would be very grateful if there is a solution to this
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.