Netcode Interpolation Jitter

Hi guys, I am experimenting with having a low network tick (10/sec) and high client frame rate. I was hoping interpolation was going to smooth this out for me but it appears very jittery.

When the game starts I set the ClientServerTickRate for all worlds

                new ClientServerTickRate
                {
                    MaxSimulationStepsPerFrame = 4,
                    NetworkTickRate = 10,
                    SimulationTickRate = 10,
                    TargetFrameRateMode = ClientServerTickRate.FrameRateMode.Auto
                });

On the server I have a cube that I am moving backwards and forwards. My entity is configured as Interpolated, not predicted. My server system has [UpdateInGroup(typeof(ServerSimulationSystemGroup))]

On the client I don’t do any prediction. The only thing running on the client is a system that logs the translation.X value. My client system has
[UpdateInGroup(typeof(ClientSimulationSystemGroup))]

In the logged values the translation.X value is a bit all over the place, sometimes jumping backwards a bit before moving forwards again.

I have plotted the logged values on the client which shows the issue. Sometimes when translatoin.X is increasing on the server, the client jumps its X value backwards before rising again. I experimented with different client framerates and you can see the jitter gets worse as the client framerate gets higher.

Here are the graphs plotted, I’ve marked where the value went ‘backwards’.

Here is a video that shows the issue

Is this a bug? Otherwise there must be something I don’t understand about how interpolation works, if it is not a simple interpolation between the last two frames then what extra magic is happening that explains the graphs?

Thanks for your time

6481546–728188–code.zip (2.49 MB)

3 Likes

I think this is related to what @wechat_os_Qy0zfuyEv3KJOsvT_cd-jV0I0 mentioned in this thread: [Netcode] prediction jitter