I'm currently developing an online Soccer MOBA that uses Photon Networking. I noticed during my first network test that there was a noticeable delay between the time the master client started moving their character, and the time non-master client picked up on the movement. After repeating the test and getting the same result a few times, I decided the transform sync wasn't good enough.

Prior to this project I used my own script to synchronize network transformations for use with the built-in Unity networking. I wanted to see if a Photon version of it would perform better; and it did. Here's the script I wrote to use with Photon Projects:


Download: GamieonTransformSync.cs


As of the time I started using this script, the movement delay on the non-master client was shortened enough to be at a point where I thought the game was viable.

The code written in the script is based on the article at https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking which does a superb job of explaining how to synchronize player positions over the network. It supports both interpolation and extrapolation; whichever makes more sense at the time.

The script also lets you set a threshold for how far a transform can move (see maxSpeedDeltaSqr and checkForSpeedHacks), and lets you choose to ignore incoming packet data if you're the receiver (in case the game demands an special, instant movement sequence in response to an event).