- Client and server both running at 66.66Hz internally (15ms steps)
- Client send commands to the at a rate of 33.33Hz (30ms), so on average there are two commands per packet are sent to the server
- 30ms Client sends two commands to the server
- 60ms Client sends two more commands to the server
- The server receives both batches of commands from the client at the same time due to lag/etc.
- Now the client continues to send two commands every 30ms
- The server de-queues one command every 15ms, but will never catch up to the "latest" command due to there always arriving more commands and the initial "burst" of 2x2 commands due to network lag
I've come up with a couple of options, none seems really satisfying:
- Limit the command queue to two commands and drop everything else, this will cause the occasional dropped package but it's not that big of a deal since it can be smoothed out
- Execute commands as fast as they come in to keep up with the client. This feels like it would open up the server for cheating though, by sending commands at a blazing speed to move your character faster for example. Maybe there is some clever way of deducing when commands are valid even when they coming in bursts to disable the ability to cheat.






