top | item 35895168

(no title)

qingdao99 | 2 years ago

Not an expert but:

The lag compensation is, more intuitively, just allowing the client to move on its own without needing server verification yet. The server maintains the authoritative game state, but (assuming no cheating is going on) the clients are able to move as they think they will. In the background, the client is actually sending its inputs to the server, and they technically haven't happened until the server verifies them (however many milliseconds later), but we allow the client to move on its own regardless.

The yanking back only happens if the client's new state (position etc.) don't match the server's state.

discuss

order

No comments yet.