Original Post
I've been reading up on client-side prediction for player movement (see Unreal's Networking Architecture, or Half-Life's -- I believe it's from Duke Nukem 3D / QuakeWorld originally).
The idea is great and I get the general idea, but:
How are they apparently applying player movements "in the past?" When the client receives an acknowledged ( / corrected) movement from the server, along with a timestamp, it's supposed to then toss out any saved movements since before that timestamp and re-apply, from that server-given corrected movement, all player inputs that happened afterwards up to the present.
The thing is, how can you apply a movement in the past? The player object can't just determine its position from the inputs alone, because other objects could be moving / colliding with it. So, say a flying rock were to have hit my player in-between the server-acknowledged movement that was sent, and the present... simply applying the player movements would ignore the rock's collision. I'd have to somehow re-do each game "tick" (frame / update) that happened since the server-acknowledged movement's timestamp??
Also, just to check, a "movement" is just an applied acceleration vector, yes?
The idea is great and I get the general idea, but:
How are they apparently applying player movements "in the past?" When the client receives an acknowledged ( / corrected) movement from the server, along with a timestamp, it's supposed to then toss out any saved movements since before that timestamp and re-apply, from that server-given corrected movement, all player inputs that happened afterwards up to the present.
The thing is, how can you apply a movement in the past? The player object can't just determine its position from the inputs alone, because other objects could be moving / colliding with it. So, say a flying rock were to have hit my player in-between the server-acknowledged movement that was sent, and the present... simply applying the player movements would ignore the rock's collision. I'd have to somehow re-do each game "tick" (frame / update) that happened since the server-acknowledged movement's timestamp??
Also, just to check, a "movement" is just an applied acceleration vector, yes?