Applying force to other player, Initial lag

We have a game that players can apply impulse forces to other players (a push) that is very strong. But we have this issue where locally, the pushed player should fly out immediately but in multiplayer mode, the player will lag for 10ms, reluctant to move before it flies out. And this is really an issue for us because this lag really destroys the game feel. Is there any way to avoid this? Or to fake it?

Answers

  • Hello @ageme ,

    You can use the server authoritative approach and let your players just send commands, the server will simulate the movement and replicated back the result.

    If you want to do local prediction, things get more complicated.
    One solution would be to simulate the command input on a separate physics scene and update the local client based on the result of this simulation. Later the server will respond with the real result, and you need to smoothly blend between the values.

    --
    Ramon Melo
    Photon Bolt Team