I've implemented interpolation to smooth character drawing in my networked game. But now I want to fall back on extrapolation if too much time has passed from a user sending an update and the interpolation buffer has been used up.
I'm just wondering if there is an equation that suites the following :
If it has been X since this user's last update, extrapolate the user position using the current time.
That determines the optimal amount of time for X.
I could try lots of different things like "we have surpassed the standard deviation of the last 100 moves + a constant", but I'm convinced there has to be an optimal strategy for deciding when we need to extrapolate. Surely this is a solved problem, is my thinking.
I've searched thoroughly but have found nothing. Also, for reference, I'm interpolating and extrapolating on the client.