Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

How do you guys solve latency and synchronization issue?

Discussion in 'Multiplayer' started by TigerLu, May 23, 2018.

  1. TigerLu

    TigerLu

    Joined:
    Dec 24, 2016
    Posts:
    1
    I am currently making a multiplayer 2d platformer game with shooting.

    I have tried a few solutions to determine whether the shot hits the target or not.
    1. Determined by the target, if the target successfully dodged the shot there is no damage, if he fails then he takes damage. This is friendly to the target because he doesn't take random damage that he thought he dodged. But this felt extremely laggy for the attacker, he will see the damage seconds after the shot hits the target.

    2. Determined by the attacker, if it hit on the attacker's screen, then it is confirmed a hit. This made the game felt smooth, but it was horrible for the targets, because you will randomly take damage and die not knowing what happened.

    3. Determined by both sides, if both sides agrees on the hit then the damage is applied to the target. I haven't tried this method yet but I can only imagine how laggy this will feel for the attacker.

    What is the best solution to determine whether the shot hits the target or not?