What happens if the ring buffer doesn't have a snapshot for the timestamp on the packet?
If a packet arrives claiming a timestamp older than the buffer's oldest snapshot — or if there's clock drift between client and server — the server either rejects the shot as invalid, treats it as a present-time hit test, or uses the oldest available snapshot. Clients with broken clocks or extreme packet delay can have their shots invalidated, which is a safeguard against cheating and connection abuse.
Answered in
Time-Travel Fairness: How Servers Rewind for Lag CompensationWhy lag compensation rewinds the game world to when a shot was fired, and why victims experience the cost.
Read the full analysisOther questions this article answers
- Why does lag compensation exist at all? Can't players just aim for where the enemy is now?
- How does the server know what time the client fired the shot at?
- What happens to the player who gets shot from behind cover? Is that not unfair to them?
- How far back can the server rewind? Can it go back 500ms or 1 second?
More system design & architecture questions
- What does CodeDeploy RESTART actually deploy?
- Does CodeDeploy RESTART work with ECS or Lambda?
- Does RESTART remove an application from load-balancer traffic while it restarts?
- Does Elastic Beanstalk's Active Directory join require a domain password?
- Can an Elastic Beanstalk environment be healthy if the domain join fails?
- Will enabling Active Directory replace running instances?
- What is different about AWS Lambda Web Functions?
- Does Lambda Web Functions automatically cost less than ordinary Lambda?
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.