3 ms·
Movements pretty tight in our websockets: https://gooberdash.winterpixel.io/ https://gooberdash.winterpixel.io/ It's all about the client side prediction & ro
by nightowl_games 3y ago
Movements pretty tight in our websockets:
https://gooberdash.winterpixel.io/ https://gooberdash.winterpixel.io/
It's all about the client side prediction & roll back networking algorithm. Our game states end up being ~1kb at 30hz, which typically fits into a single packet, so websockets aren't terrible. An unreliable protocol would be better, of course.
- andai 3y ago>client side prediction & roll back networking algorithm. I need to look into this! I made a little networked 2D physics thing (just bouncing balls) and I was surprised how well it stays in sync, because of course both machines just simulate the same result. I added some interactivity and simulated lag / packet loss, at that point I added an interpolation function so an entity could have a "target" and gradually slide there over a few frames. I've seen some other games do that as well. I haven't gone very in depth on this, but VALVE has an excellent article on the subject, also covering input prediction and lag compensation: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking https://developer.valvesoftware.com/wiki/Source_Multiplayer_...
- bcrosby95 3y agoThere's an awesome talk by someone in the overwatch team in youtube. It's about ECS but it has a big section on networking that had some useful tips. Edit: here it is - https://www.youtube.com/watch?v=W3aieHjyNvw https://www.youtube.com/watch?v=W3aieHjyNvw
- nightowl_games 3y agoThis one's good but pretty advanced. We haven't implemented a lot of these techniques in our games. This is a great starting point: https://gafferongames.com/post/introduction_to_networked_physics/ https://gafferongames.com/post/introduction_to_networked_phy...