Client Side Prediction Example

Looking at the thread here: [how to use SmoothMovers?) it sounds like the SmoothMover is used mostly for non-predicted entities (e.g. other players in the game aside from yourself). Have you accomplished input prediction before? The problem I’m running into as I try to get this to work in a game is that the client and server aren’t sync’d anymore - in my example, the time between frames is exactly the same for both the client and the server, where this is not the case for remote machines.

Aside from attempting to smooth out the times when the prediction doesn’t match the server’s location, does anyone have any ideas to make the prediction more perfect?

Edit1:
So I did some debugging and found out that the reason my prediction differs from the actual movement is out of order packets - so let’s say I send 3 move forward packets, but the most recent one arrives first. Currently, I’m discarding the old ones, which means that the server could move less than the client.

Edit2:
What if, instead of telling the server that the client is now pressing +FORWARD, I tell it I pressed +FORWARD for 5ms since the last packet I sent?