Controlling/capping Interpolation Limits in the Network Prediction Plugin for competitive integrity

Hello,

I’ve been using NPP for a couple of years now and it’s a great system that I believe can open up new types of games to Unreal users. Development progress seems to be fairly slow but the updates are welcome. I’m also very happy to see the progress with Mover which does seem to be a higher priority.

One of the main use cases for developing a project with NPP is to have compete syncronization of world states so that games can be more competitive. Order of damage or abilities being applied is important and when the user sees a target vs when they are able to shoot it is also really important. However, we don’t really have any control over how much delay there is between a users world and the servers world which means we cannot fine tune how much we roll back when we are favouring the shooter.

My understanding is that the clients simulation state consumes frames at a steady pace until frames are missing. In that case, it skips a few to try and get back into a state where it has an endless buffer to consume. This makes a lot of sense but from what I can see, there isn’t any functionality to reduce that gap again to get back to a state where the delay is low. To reproduce this I believe you can just tab out of a 2 player game running in editor as that will artificially limit RPCs while it’s in the background.

In my tests, I have cases where the FFixedTickState::Interpolation.ToFrame is over 60 frames behind in a 60 fps simulation. This means that the server needs to roll back over a seconds worth of frames to ensure the clients shooting experience feels good which is both a lot of cpu time and the target is getting hit with instant looking shots.

So my first question is, is my understanding of all of this correct? If so, is there anything I can do to mitigate this frame delay? I’ve mentioned it before but Overwatch reduces the fixed tick frame time slightly to play the frames quicker which should eventually catch it up to the simulation again. This would be an incredibly useful (and I’d put a vote in for necessary) feature.

Sorry for the long delay in getting back about this one!

Yes, your understanding is correct. Shrinking the prediction gap once network conditions improve is a lacking feature of the Network Prediction Plugin that needs to be supported for shipping projects. Time dilation is one option and I expect this will be the first supported method. This could affect affect a game relying on a rigid timestep for repeatable deterministic simulation. Another method would be to merge inputs for adjacent simulation frames into a single input, effectively dropping frames. It would be smoother to do this when inputs aren’t changing drastically and critical inputs aren’t involved so the transition isn’t so noticeable.

This is something we’ll address by the time Mover shifts out of Experimental status.

* edited answer to make it clear that time dilation is the first option on the table

No worries and thanks for the info! It’s very interesting to hear about your second approach.