This video is part of a video series where i try to build an Among Us clone in Javascript using Phaser.js. In this video the focus is on achieving multiplayer over websockets using a node server running express and socket.io.
Code links:
Start of video:
End of video:
Say hi on twitter:
Timestamps:
0:00 Intro
0:43 Install Socket.io
1:18 Create client socket
2:05 Emitting move event
3:00 Emitting moveEnd event
4:47 Creating Player 2
5:35 Receiving move event
6:23 Receiving moveEnd event
6:47 Handling Player 2 sprite flipX
7:50 Player 2 Run Animation
9:15 Websocket Server Setup
10:53 Socket.io server side events
12:30 VS Code Debugging setup
13:10 Finishing up server code
14:13 Debugging Sockets
15:56 Bugfix: playerMoved
16:43 Debugging with 2 players
17:55 Bugfix: Run animation
18:20 Bugfix: Player 2 sprite movement
18:35 Bugfix: Avoid receiving own event
20:30 Success!
20:40 Outro
KUMAR SAMPURN 2022 Batch PES University EC
03.10.2023Can i and my friend play this on seperate pc if we are connected to same network?
sajt craft
21.03.2023Uncaught Error: Cannot find module 'png-js'
FAILIST
13.06.2022๐ฅ Dude
Za Au
13.06.2022Already video two! With socket.io!!! Bro beast!
sonia maklouf
13.06.2022Hi Thanks for your videos
Would you consider making a game like that in react ?
cozynipples
13.06.2022End that erly with that part too!
But crazy man, must not give that many pain for that โlovalhostโ it has burning my eyes typo. Pleas in future