Is PUN unreliable for real time multiplayer games?

Options
Let's say player A shoots a weapon and detects a hit on player B on one client. But on the other client, the collision wasn't detected because one player was on a slower connection than another and all the positions didn't update. Then how do you know whether to say there was a hit or not? If you have a dedicated server, then you would use that as the single source of truth, but it doesn't seem possible on PUN, but there must be a solution or nobody would use photon. Does anyone know how to solve this problem?

Comments

  • Gage_IAG
    Options
    Well i believe Bolt handles this out of the box. PUN however can be used for realtime scenarios, however you are dealing with syncing and you need to expect delays, however fast/slow they may be. With that said, the first spot you can look is the login going into syncing positions. Are you smoothing out position, if so what type are you using (Transform View). Are you writing out your own syncing via OnPhotonSerializeView, if so what are your send rates and logic in side the send/receive?

    If you dont have any of this currently, try starting with observing a Photon Transform View, setting the interpolation to Lerp with a value of 10 and the Photon View to Unreliable On Change. See how accurate that is and tweak from there.