Re-Sync

Hello, im working in a football multiplayer game and in some cases the game is desynchronizes, the checksum shows NOK so i have some questions:

-When the checksum shows NOK, it means that client are desynchronized or the game in general are desynchronized?

-In my game the master client check if the ball entered in a trigger to send a goal RPC to another clients, in that moment the clients need to respawn ball and all players need to be moved to spawn position, but the game in that moment is desynchronized, so.. how move an object in a networked event without desynchronizing?, the goal event just change an state that the only thing that does is invalidate the player inputs, but the player can still receive the inputs of the other players.

-What is the best practice to re-sync the game?

-Is there any way to send RPCs to move an object and wait for the game to be synchronized and then restart the game (game = match in my case)?

Comments

  • Hello @Fortunacio,

    The desync happens because you used a way of communication that is not deterministic which means this RPC event will not occur at the same time in all machines. In case of a lockstep system (TrueSync) all clients will get the trigger event, the physics should run the same in all machines. If you take a look at our KickingHeads demo you will see that we just send the inputs (movement and jump) and a goal event will be triggered for every player simulation, there is no "master client" at first glance. I recommend you to take a look at this demo, any doubts feel free to contact us again.
  • Hello @JeffersonHenrique,

    thx for your reply, but if the game is desynchronized in some moment for any reason what is the best practice to re-sync the game?

    and what about this question?:

    -When the checksum shows NOK, it means that client are desynchronized or the game in general are desynchronized?
  • Hi @Fortunacio,

    The game should not be desync at any moment, because this means different simulations for two different clients. About the checksum NOK it means the simulation state of the clients are different, by definition there is no "correct" client, they just disagree on how the physics should be in a specific frame.