4 ms·
I use phaser on client side, then matter.js for physics + nengi.js for networking (https://github.com/timetocode/nengi https://github.com/timetocode/nengi). I
by nullandvoid 4y ago
I use phaser on client side, then matter.js for physics + nengi.js for networking (https://github.com/timetocode/nengi https://github.com/timetocode/nengi).
I only have experience with 2d (so it might not be useful to you, but perhaps will others), where typically it's a worse experience for the player to have CSP (client side prediction) at-least in a fast paced game, as for example a player behind a wall can more clearly see something missed them, yet they still got hit.
The way I do things (and I've seen is common across other "io" games), is "CSP" only for particular actions (such as your own rotation, or swinging your own weapon), but otherwise just let the client move in step with the server in terms of any physics entities etc.
- leohart 4y agoDo you have a demo/link to one of your games? I am interested in learning more about multiplayer experience for web games and would love to see an example with these tools mentioned.
- nullandvoid 4y agoI only have this old demo I open sourced - https://github.com/TomYeoman/2d-zombie-survival-io-demo https://github.com/TomYeoman/2d-zombie-survival-io-demo right now (trying to crunch to finish full version) It's using phaser on the server in this instance (which I recently ripped out, and moved to just using matter) It's pretty ugly code, but the foundations are there, maybe it's a starting point or of some use!