Interpolating between two networked states?
Posted
by
Vaughan Hilts
on Game Development
See other posts from Game Development
or by Vaughan Hilts
Published on 2012-12-19T03:27:47Z
Indexed on
2012/12/19
5:14 UTC
Read the original article
Hit count: 287
I have many entities on the client side that are simulated (their velocities are added to their positions on a per frame basis) and I let them dead reckon themselves. They send updates about where they were last seen and their velocity changes. This works great and other players see this work find. However, after a while these players begin to desync after some time. This is because of latency.
I'd like to know how I can interpolate between states so they appear to be in the correct position. I know where the player was LAST seen and their current velocity but interpolating to the last seen state causes the player to actually move -backwards-. I could not use velocity at all for other clients and simply 'lerp' them towards the appropriate direction but I feel this would cause jaggy movement. What are the alternatives?
© Game Development or respective owner