An old explanation of desyncs I found, for anybody interested
8 points · 2 years ago · edited 2 years ago
OK. I’ll try my best to ELY5. AoE2 uses a turn based system to “simulate” real-time (also related to tickrate systems). The turn times are so small that you won’t notice the difference to real-time simulation. What that practically means is that AoE2 syncs up your game at least every 50 ms with modern internet connection speed.
Now what happens if a packet gets lost? (BTW: It doesn’t matter if it is caused by network problems or deliberately by the player). In other games, let’s say a First-Person-Shooter, you would see the desynced player’s model stutter or run into walls. Other models in the game would likely not be affected. Usually, after the player is synced up again, the model will be beamed back to the correct position and the game can continue.
In AoE2 this kind of correction is not possible because everything is important for the game state. To minimize network traffic, pretty much everything is simulated on the clients and there’s no central server that can validate it. If a movement command is lost, this can cause a chain of events that leads to a building not being destroyed which can then still produce armies, etc. pp. Therefore every lost command has to be resent and the state of all players has to be constantly validated. Reconstructing the valid game state is not that easy and it can confuse Age of Empires 2 quite a bit. That’s known as the out-of-sync error, where the game has to pause to let other players catch up with the correct game state.
These desyncs can of course be done deliberately by sending faulty network packets to the other or just by disconnecting an reconnecting a couple of times. This will also create problems for other players, since their backend receives conflicting network information, which can lead to a total halt of the game when AoE2 is not able to reconstruct a valid game state anymore (“out-of-sync hack”).
As this is part of the network design, I’d say it can’t be solved unless the whole multiplayer backend is rebuilt. What you can do, although it might be unreliable, is spam taunts, messages or flares (or any player command). Because every command also acts as a method to sync, sending these commands in periods of less than 50 ms will make the desyncer drop because his game “thinks” its game state is already too far behind. It can be explained like this: If a desyncer disconnects, he knows the last turn where the game was synced. When he reconnects and the turn timer is 5 turns ahead, the game thinks that around 550ms=250ms have passed which is acceptable for a reconnect. By spamming commands you can move the turn timer way further, e.g. 100 turns instead of 5 in the same time. Reconnecting then will make AoE2 think 10050ms=5s have passed, instead of the actual 250 ms.