Players syncing issue

I am working on a unity mobile game. Which is like a multiplayer version of temple run. Because this game is meant for mobile there is a fluctuating latency generally in the range of 200ms - 500ms.
Since the path is predetermined and actions the user can perform are limited (jump,slide, use powerup etc) , the remote player keep running on the path until it receives the updated state from its local player.
This strategy generally works pretty well since I only need to send limited amount of data over the network but there is a specific case in which I am having issues.
In the game, players die on the specific positions (obstacles).
I want remote players to die on the same obstacle/position as local player but due to latency in sending message, the remote player crosses the obstacle by the time it receives the death message.
Is there a way to sync the players on the deaths.
One of the things I tried was moving the remote player back to the local players death position but not only does it look awkward visually but can also raise other syncing issues.
Is there some other better way to do this ?

Comments

  • Even though your game seems to be simple for multiplayer design, the same simplicity exposes the issues you get.
    Due to the lag, you can't really have both players act at the very same time AND both know what the other did.

    You can hide a bit of lag when your players have to do their input 100 or 200 ms before the action is done. You can send the input immediately but apply it locally 100 to 200 ms later. This hides a bit of the lag.
    Aside from that, you can't do much for a game like this, I fear. You can't predict moves and any correction you do will look bad, due to the simplicity of movement.