DIY vs Spidermonkey

Use SpiderMonkey. You can heavily customize how your messages are sent but 99% of the time you won’t need to. Networking is hard to get right… the previous version of SpiderMonkey (before I rewrote it) didn’t even get it right. Better to leverage someone else’s work really. NIO selectors and threading is extremely fragile.

You can send just changes. To do so you’d have to send change messages… but then I’d argue that you really want an Entity System because that’s pretty much what it deals with… changes. (See: Zay-ES)

You shouldn’t send player position to the server. The server should be authoritative. It’s really the easiest way.

See:
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
https://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization

And you can see the end of this thread which has devolved into a similar discussion:

1 Like