pbogre/pong

Handle game server side

Closed this issue · 2 comments

Handling the game client side means that latency / desync will cause the two players to basically be playing two different games. Doing it server side means that although on high latency you might get some weird looking behaviour, you are guaranteed the two players are in sync.

a way of doing this (without changing everything to handle the game serverside) is to make sure all the coordinates are scaled based on window resolution and size, so that the calculations are consistent through different systems & window sizes

desync issues caused by netcode were largely fixed by commit #15 through non-blocking sockets. the problem of different screen resolutions may still be there but has not been tested. closing this issue though as server-side calculation is no longer a problem