Hi all :)
I’m interested in learning to develop a multiplayer game that is hosted with a single central server. With all the anti-hype around Unity, I thought I’d try out Godot instead.
I’m looking for learning resources on this. All I have found so far was centered around player-hosted multiplayer games, which is not what I’m looking for. Think about Diablo or Path of Exile where they have one or multiple servers managing the game and players. That is what I’m looking to learn doing.
I think more precisely:
- database synchronisation
- client synchronisation
- interpolation for movement/effects
- delta compression
- server-side game state management
Game-wise, I’m looking to develop a multiplayer platformer.
I’m a backend software developer with a couple years in, so advanced guides are nothing I’m afraid of.
Thanks for your input :)
You’ve clearly thought about the problem, so the solutions should be relatively obvious. Some less obvious ones:
recvmmsg
/sendmmsg
which are critical for performance unlike with TCP; note the extram
)Thanks for your reply :) This grew quite detailed and more thorough than I had expected. But I’m thankful to now have something to read up on. It will take me a while though.
There are two follow-ups:
I’d be surprised if there weren’t libraries for the networking parts already. You briefly mentioned there would be for at least data types for the interfacing and wrote that I should instead use my own solution instead for said reasons. Well, are there libraries I can use for networking? What you mentioned sounds very low level.
What do you mean with point (3), where the client “should do more” than the server? The server would be authoritative and the client predicting. But, do you mean that the server shouldn’t do so much heavy lifting like working with game physics?
Thanks!
io_uring
is weird; previously I wouldn’t include this. On the client side it isn’t needed, but that depends on how much code you share between server and client). Packet framing and serialization are really easy to do yourself and most existing tools (which usually do generate code anyway) have weird limitations or overhead.