<i>Develop strong out of sync (OOS) detection tools early, and learn how to use them.</i><p>The way lockstep work is that the clients gives themselves a rendez-vous in the future and agree to compute one turn of the game, given the players' input of that turn, at that moment. It's very clever. The players input are sent to every clients and will be computed in the future in a deterministic way. So every client is computing the exact same game. Now if the clients doesnt compute the same game given the same players' input, the game is OOS and that basically should never happen because the game is dead.<p>To detect an OOS, a client needs to compute a hash of some relevant game data (ultimately "everything" ends up being represented by the position of the units (plus a dead state)), every <i>turn</i> and send them with its "end of turn" message to the server/clients. If clients disagree with the value of the hash, they are OOS.<p>The cool thing with lockstep is that you can record every turn inputs (which is fairly light) and then replay the whole game - because that's already how a game is played. So, when you have an OOS - or any bug, you can just replay the game until the OOS and try to fix it. Sometimes it doesnt work though and you may replay the game without detecting any OOS.<p>If you dont detect an OOS after a replay, you're basically in deep shit. I mean <i>needle in a haystack of c++</i> kind of deep shit. Every client needs to dump <i>every data of every function that ever ran</i> in a log file, and then you need to reproduce the OOS and then compare the log files and then guess what caused the data to differ.