Live model · Getting shot behind a wall

Why You Get Shot Behind Walls in Online Games

Your screen moves you instantly, but everyone else sees you late: half your ping to the server, half theirs to them, plus interpolation. They shoot where they saw you. The server rewinds you to that moment to judge the shot, so it hits you in the open, after you reached cover on your screen.

One shot, three screens

You sprint for the wall on 40 ms ping; they wait on 80 ms, on a 64-tick server. Your screen moves you the instant you press a key. Everyone else sees you late.
StopLag compensation
Your ping (ms)Their ping (ms)Server ticks a secondInterpolation delay (ms)Lag compensationFurthest rewind (ms)
Clock0 msRewind·

Your screen

wallthemyou

in the open

The server

wallthemyou

has you in the open

Their screen

wallthemyou

you're in the open

Who learns what, when

You40 ms pingServer64 ticks/sThem80 ms ping

    From where they aimed to the hit, in ms

    past the cover line: time you spend behind the wall

    • CH1 you, your connection
    • CH2 them, their connection
    • CH3 interpolation
    • CH4 waiting for a tick

    Watch the Python behind this model run, line by line

    How to read the stage

    Three views of one moment: yours, the server's and the shooter's. You reach the wall 400 ms into your run. At 500 ms their screen still shows you 60 ms short of it, and they fire. The shot reaches the server, waits 6.9 ms for a tick, and the server rewinds you 186.9 ms to where they saw you: a hit. The hit reaches you at 566.9 ms, after 166.9 ms behind the wall.

    Why the server rewinds

    Without the rewind, a shooter would have to aim ahead of what they see. Valve's Source engine keeps a second of every player's past positions and moves them back to when it estimates the shot was fired. Valve's docs say what follows: you can be hit after you took cover, and it can't be solved in general. At 500 ms ping, the stage below kills you 588.8 ms after you were safe.

    The same shot at every ping the shooter might have

    The same shot, now at every ping the shooter might have, from 0 to 600 ms. You stay on 40 ms, with 100 ms of interpolation and a 1000 ms rewind limit.
    StopLag compensation
    Your ping (ms)Server ticks a secondInterpolation delay (ms)Furthest rewind (ms)

    Behind the wall when the hit reached you

    (none)

    Rewind the shot needs, against the limit

    past the limit02004006008001,0000100200300400500600their ping, msrewind, ms
    • needed
    • done

    Watch the Python behind this model run, line by line

    Where games draw the line

    So games cap the rewind. Riot's VALORANT engineers write that, without limits, a player with 500 ms latency could kill you half a second after you moved behind cover, so the server limits how far back it will go. Past the limit, a laggy shooter misses unless they aim where you're going. Try a 200 ms limit below: from 150 ms ping up, every shot misses.

    What the model leaves out

    Pings are steady here; real ones jitter, and packets get lost. You run in a straight line at one speed, and the shooter aims perfectly at what they see. Snapshots and interpolation are folded into one delay, and the server judges a single point, not a hitbox shaped like a body. Real engines differ in the details: VALORANT runs 128 ticks a second, Source defaults to 66.

    Questions

    What is tick rate, and does 128-tick fix this?
    A tick is one step of the server's simulation: Source's default timestep is 15 ms, about 66 a second, and VALORANT runs 128. A shot waits for the next tick, so a faster server trims a few milliseconds of that wait. Most of the delay is ping and interpolation, which tick rate barely touches.
    Does my own ping matter, or only theirs?
    Both. In the model, every millisecond of either player's ping adds about a millisecond to how long you've been behind cover when the hit arrives: your movement reaches the server late, and the hit comes back to you late.
    What is interpolation delay?
    Snapshots arrive in steps, so a game draws other players a little in the past and blends between the last two it received, which keeps them moving smoothly. Source's default is 100 ms. That delay is part of why the shooter sees you late, and lag compensation adds it back when it rewinds.
    What is peeker's advantage?
    Riot defines it as the advantage someone peeking around a corner has over an opponent on the other side. It's the same delay as on the stage, from the other side: the peeker sees you before you see them. In Riot's own worked example, peekers have about 141 ms longer to react than defenders.
    Why doesn't the game let my computer decide hits?
    Valve's documentation says a game server can't trust clients on such important decisions: even a clean client's packets could be altered on the way by a cheat proxy injecting fake hits. So the server checks every shot itself, which is why it needs the rewind.

    More of how it works