multiplayer not synching constantly? (Photon)

Hi,

I’ve run into a synching issue that didn’t happen a few months ago. When my multiplayer game is played with more than one player some players “freeze” for a few seconds on other clients screens before continuing to synchronise movement correctly again. This was not an issue before and all that has happened since, is simply more things happening at once, so more RPC’s.

All players have a networkMovement script that sends and receive both transform.position and transform.rotation as well as all animations on serialized view and the networkMovement script is observed by the photonView of the player and again, this has worked without any issues before.

Now I’m also using photons transformview component which ia also observed by the photon view but it doesn’t solve the problem.

I’ve tried elevating the PhotonNetwork.sendRateOnSerialize to 250 just to see if that was the issue but that didn’t solve the problem. Now it’s back to 70.

So how do I synch all players movements?

If you made sure that the problem comes from data not being send or received (package loss) you’ll have to go into optimization.

  • Reduce accuracy of send data (only send position in centimeters and strip the rest, only rotate by whole degrees)
  • Only send updates when exceeding a certain amount of change
  • Send updates every 1/10th second instead of each Update()-Cycle and extrapolate player movement based on last known position, rotation and speed.
  • Check if (only useful for long messages) compression of messages is an option.

In short: If data amount is your problem, cut the data amount :wink:

1 Like

Thanks, that makes sense. Now to figure out how to do it :slight_smile: