Consistent delay on the sender machine when using Target.AllViaServer

Hello,

I wanted to use Target.AllViaServer so that the game is a bit more synchronised between machine.
I use it for my bullets mainly, with a lag compensation; it works great.

However, it seems that my bullets consistently spawn first on the non-sender machine (i.e. the machine that did NOT send the RPC), which I find weird.
I also used Target.AllViaServer to apply the effect of my coins and hearts, and again, it seems that, consistently the effect is applied first on the non-sender machine!

I am actually recording my screen with OBS to look at the delay between two clients;
There is a consistent lag around 4-6 frames (100ms) between the non-sender and the sender...

That's just weird... right?

Comments

  • Yes, that's weird.
    The sender is likely the active window, so .. if anything, I would expect the opposite of this.
    And 100ms are quite a lot.

    Would be an interesting test case but I don't know if I can find the time to do that.
    Any ideas how this happens?? Could OBS affect the active window?
    What if you shoot/send when the window is in background?