Closed gschup closed 3 years ago
The spectator desyncs on it's own while the players only desync when abruptly changing windows. I suspect these might be two separate issues.
The solution:
There is a timewindow in which one client sent an input ack, but the other did not receive that ack yet. If more input is sent in that time frame, it will be encoded/decoded with different reference inputs.
The quick solution: such inputs will be dropped until we can ensure that the encoding/decoding is matching.
In the future, one could reduce network usage by keeping more reference inputs to decode with.
When running the P2P BoxGame example, the clients eventually desync, with the spectator desyncing much easier than the two players. Since the BoxGame SyncTest is running absolutely rock-solid, I assume it has to to with the transmission of the inputs.