Some problems with TrueSync

I'm the lead developper of a million users mobile RTS and we are looking to create an online multiplayers sequel.
I'm already working on a deterministic engine for Unity but you have physics, servers and your solution could increase our development speed.
But I'm not convinced fot the moment here's why :

- In your sample kickingheads there's only a few elements and there's way too much garbage : it's totally not suitable for mobile; your solution should allocate 0 byte per frame:

- With a ping of 65 ( europe ), a sync window of 5, a rollback window of 0 ( I've already created an online lockstep action game without rollback, it should work well 99.99% of the time ), a locked time step of 0.02
I got about 5 missed frames per seconds : what's wrong ?

- The way you do interpolation is wrong, this make the movment not smooth :
transform.position = Vector3.Lerp(transform.position, position.ToVector(), Time.deltaTime * DELTA_TIME_FACTOR);
Here's the right way :

- I suspect your reliable udp layer to be slow, you don't need reliable udp for a lockstep server, the previous video explain how to proceed too.

I will try to share an rts sample but I really need your help and your answers to get an acceptable quality for the players.

Thank you.


  • Hi,

    We're currently fixing the allocations issue so we can achieve 0-bytes per frame.

    Regarding your experience with a sync window of 5 ticks of 20ms each, this accounts for 100ms protection. What I suspect is this: photon rtt (round trip time - ping) is the average ping time, so with 65ms it may fluctuate and some times it will go beyond 100ms. With 50 ticks per second, having 5 missed ones means you're getting 10% missed frames. Have you tried using 6 as sync window to test if it get rid of the missed frames?

    We know well Glenn Fiedler's videos and blog posts, thanks for the reference. We're also fixing our interpolation sample. You're right about using the delta-time-fix.

    Regarding Photon's UDP layer, it indeed includes the reliability feature. TrueSync is built on top of this existent cloud platform. We're working with the platform team (photon server + load balancing API) to expose an unreliable (and faster) option for us to use with TrueSync (then we could in fact send multiple tick inputs each frame and implement the reliability check inside TrueSync itself).

  • Great you already are on the right way !

    I will try with a higher sync window and tell you what I get !

    Thank you.