在此视频中,我演示了如何使用websockets构建可在任何设备上运行的基于浏览器的多人游戏。我使用服务器权威模型设计多人游戏,其中游戏状态存储在服务器上。我将WebSockets用作我正在开发的游戏的通信介质。
连接到服务器:6:00
创建游戏:9:45
加入游戏:13:00
玩游戏:16:00
广播状态18:00
例子22:15
代码31:00
连接代码31:00
创建游戏代码50:00
加入游戏代码59:10
玩游戏代码1:20:40
广播代码1:30:00
源代码
https://github.com/hnasr/javascript_playground/tree/master/websocket-cell-game。
Connect to Server : 6:00
Create game : 9:45
Join Game : 13:00
Play Game: 16:00
Broadcast State 18:00
Example 22:15
Code 31:00
Connect Code 31:00
Create Game Code 50:00
Join Game Code 59:10
Play Game Code 1:20:40
Broadcast code 1:30:00
Source Code
https://github.com/hnasr/javascript_playground/tree/master/websocket-cell-game
Awesome video, thanks! I wonder why does the websocket server rely on the http server and how do they interact with each other. They use the same port so there should be some mechanisms for passing message from one to another?
Thanks Hussein. For your prompt response. And thanks for taking your time in time framing the video
Great video. One of the best session on Websocket multiplayer game.
It would be good if you could share the code.
Waiting for your session on the same working on Multiserver with Redis
Hello, can you share the code please ? I have some issues.. Thanks !
Will you plz make a video about audio/video calling app or service?
Thanks
Perfect!!!
I will help me in my next multiplayer chess game project.
Load of thanksss.
Great video. Thanks. ?
Really interesting topic Hussein, great presentation; thank you.