I am currently working on a Multiplayer TD, players can join games, and place towers on a map, so far so good.
This is how the game works as of today, when a new game is created, the server initialise a master game, basicly all logic happens here, it tell clients what to visualize. But this being my first MP game, i need some advice about how to keep players in sync with the server game, my questions could be. "What to do, if a player looses contact to the server for several seconds, therefore getting out of sync" "What to do, if a player plays with a poor internet connection, and having a latency jumping from 400ms to 3000ms"
I thought of sending data to each client 4 times every seconds, containing information for all entities on the board. This data i would then compare to the client data, and overrule entities that is out of sync, there would then be a tolerate value, so the users would't experience changes on the board, because of small game delays.
However i can imagine this would be a lot of work, and i wanted to ask if there was a smarter solution, i've looked at some post around the net, but could't find any which would apply for my game, feel free to throw links my way.