Lag Compensation: Why You Get Shot Behind Walls

Share:
Lag Compensation: Why You Get Shot Behind Walls

"I shot him first!"

We've all been there. You run behind a wall, and 0.5 seconds later, you die. Is the game broken? No, it's Lag Compensation working exactly as intended.

The Past vs The Present

Server-side, the game keeps a history of where every player was for the last second. When a high-ping player shoots at you:

  1. They see you in the open (on their screen, which is "in the past").
  2. They shoot.
  3. The server receives the shot 100ms later.
  4. The server "rewinds" the simulation to see if you were there 100ms ago.
  5. You WAS there. So the hit counts.

On your screen, you are safe behind the wall. But in the timeline of the shooter, you were dead. It feels unfair, but without it, you would have to aim ahead of moving targets like in the Quake 1 days.

How Games Decide Who Really Shot First

The dominant approach in modern shooters is server-side lag compensation with client-side prediction. Here's the sequence: your client renders the world slightly ahead of the server (prediction), you shoot based on what you see locally, your shot packet arrives at the server with your timestamp, and the server rewinds its game state to that exact timestamp to check if the shot would have hit at the moment you fired. This is why you can clearly see an enemy behind cover on your screen and still register a hit — the server confirmed you were correct at the time you fired, even if the network delay means the enemy has since moved.

The flip side: this same system is why you occasionally die "around corners." From your attacker's perspective at a lower ping, they had a valid line of sight when they fired. The server honored their timestamp. Your higher-latency client saw the corner as protection; the server's rewind said otherwise. Understanding this helps separate legitimate lag compensation from actual cheating — and reducing your own ping is the best way to minimize these situations.

Frequently Asked Questions

Does lag compensation favor high-ping players?

It can appear that way, but the reality is nuanced. Lag compensation lets high-ping players register shots based on what they saw (delayed), meaning low-ping players sometimes get shot by what appears to be a ghost. However, high-ping players also experience worse hit registration on their end and more rubber-banding. Overall, low ping is still a significant advantage — the perception of high-ping players "benefiting" is a misread of how server-side rewinding works.

How much does ping affect lag compensation accuracy?

Most servers cap the compensation window — often at 150-200ms — meaning players above that ping don't receive full compensation and start experiencing obvious hit registration failures. Below that cap, compensation is mathematically exact but creates the "killed around corners" experience for low-ping players. The sweet spot where lag compensation feels fair for everyone is when all players are under 60ms on the same server.

⚡ Benchmark Your Internet Connection Now

Measure your true download & upload bandwidth, latency jitter, and bufferbloat in real-time with zero ads slowing down your test.

Run Free Speed Test ➔

Frequently Asked Questions

Why does the game die me even though I saw myself safe behind a wall?

The server rewinds its simulation to the exact timestamp your shot packet was sent and checks whether you were exposed at that moment — if you were, the hit counts even though the delay means you've since moved to cover.

Without lag compensation, what would gaming feel like?

You would have to aim ahead of moving targets to account for network delay, similar to how shooters worked in the Quake 1 era.

What's the sequence a modern shooter uses to decide who really shot first?

Your client renders the world slightly ahead of the server (prediction), your shot packet arrives with your timestamp, and the server rewinds its game state to that exact moment to check if the shot would have hit.

Sources & References

See our research methodology for how we combine our own testing with public data sources.

About the Author

Dalto Cardoso is the founder of DCSpeedTest, a digital nomad who has tested internet connections across multiple countries and runs his own VPS infrastructure for clients worldwide. He holds certifications from Google and Meta Blueprint.