6

TLDR - start simple and build up. Getting to AAA quality networking in an action game is complicated but may not even be necessary for your game. So basically: When client connects to the server, server creates new entity. Now, for example, when client presses 'A', packet is sent to a server containing this information. Server will proccess it, moves the ...


1

If the client has a 100ms ping to the server, then there would be a delay of at least 6 extra frames between the user pressing a button, and seeing the result, probably more. Even adding 1 frame from double-buffered rendering causes perceivable delay. This means that client/server gaming is a lot more complicated than this, and prediction is involved.


1

I recommend synchronizing system timers on all clients and the server by means of NTP [Stratum 2] protocol, then the server sends a command to start the game at specified time, say, when all the timers reach 0:05:00. This approach should give you 3-4 ms accurate synchronization, I believe.


Only top voted, non community-wiki answers of a minimum length are eligible