Detect Magazine logo Detect MagazineFind what others miss
Tech Notes

How Online Games Rewind Time to Decide Who Shot First

You stepped out from behind the wall, saw the enemy, fired, watched the blood effect, and then your screen went grey and the kill feed gave the frag to someone who was still walking when you pulled the trigger.

A monitor showing a first person shooter duel frozen mid shot beside a laptop displaying a continuous ping graph with uneven spikes

You stepped out from behind the wall, saw the enemy, fired, watched the blood effect, and then your screen went grey and the kill feed gave the frag to someone who was still walking when you pulled the trigger. Every shooter player has this memory. Most of us filed it under cheating, or lag, or the general unfairness of the universe.

What actually happened is stranger and much more deliberate. A server somewhere decided that the version of events on your screen was less authoritative than the version on theirs, reached back about 90 milliseconds into a stored history of where everyone had been, and ruled on a gunfight that had already finished. Lag compensation is one of those systems that hides in plain sight: it decides the outcome of nearly every duel you have ever had online, and almost nobody playing has been told it exists.

Your screen is always showing you the past

Start with the distances. A packet from London to a Frankfurt server and back takes roughly 20 milliseconds on a good connection. London to Virginia is nearer 80. Nothing in that chain is broken, it is just physics and routing, and no amount of money spent on your connection removes it.

That delay creates an impossible choice for a game. If your character waits for the server to confirm every movement before it happens, the controls feel like treacle. So games lie to you instead. Your client predicts the result of your own input immediately, draws it, and then quietly corrects itself if the server disagrees. That correction is the small rubber band snap you feel when a connection wobbles.

Other players get the opposite treatment. Your game holds their positions slightly behind real time and plays them back smoothly, a technique called interpolation, usually costing another 50 to 100 milliseconds depending on the title. So the enemy you can see is not where they are now. They are where they were two or three ticks ago. You are aiming at a ghost of them, and you always have been.

The rewind

If the server only judged shots against present positions, every player with any ping would miss constantly. So the server keeps a short history buffer, typically covering 200 to 1,000 milliseconds, of where every hitbox has been on every tick.

When your shot arrives, the server reads the timestamp, works out what you could reasonably have been seeing, rolls the world back to that moment, and tests your bullet against the old positions. If it connects there, it counts. The technique has been in use since the Half-Life era and the original write up by Valve's engineers is still the clearest description of the idea in print.

This is why you sometimes die behind cover. On your attacker's screen you were still in the open. The server agreed with them, rewound, found the hit, and applied it to the you who had already sprinted to safety. Nobody cheated and nothing malfunctioned. The system worked exactly as designed, and you were the one who paid for it.

The design choice buried in there is worth noticing. Faced with a disagreement between shooter and target, developers almost always favour the shooter. Shooting feels good, dying feels bad, and a game that frequently refuses your well aimed shots gets abandoned faster than one that occasionally kills you behind a wall. That is a cultural decision dressed as a technical one.

Why more tick rate is the wrong answer

Any thread about this ends with someone demanding 128 tick servers, as if the number were the whole story. I have read that argument for fifteen years and I think it is mostly misplaced.

Going from 64 to 128 updates per second halves the gap between snapshots, cutting roughly 7.8 milliseconds down to 3.9. Real improvement, and small next to the 20 to 80 milliseconds of network delay and the 50 to 100 of interpolation sitting alongside it. Meanwhile the server cost per match roughly doubles, which is why free to play titles with enormous player counts do the arithmetic and decline.

The levers that matter more are less glamorous. Jitter, meaning the variation in your ping rather than its size, wrecks prediction far worse than a steady high ping does, because the client cannot settle on how far behind to run. Packet loss above about 2 percent produces the same symptoms people blame on tick rate. And a game's interpolation setting, where it is exposed at all, usually offers a bigger change than anything else in the menu.

I will concede the counter argument in one place. For high level play where two players peek the same corner within a few frames of each other, the extra resolution of a 128 tick server does decide rounds, and competitive leagues are right to insist on it. For the rest of us it is a number to argue about on forums rather than something we would feel in a blind test.

What you can actually change

Very little of this is in your hands, which is worth saying plainly before the list. These are the things that genuinely moved the needle when I have tested them on my own connection.

  1. Measure jitter, not ping. Run a continuous ping to your game server region for ten minutes and look at the spread between the lowest and highest result. Under 5 milliseconds of variation is healthy. A spread of 40 explains far more about your bad duels than an average of 45 does.
  2. Get off WiFi for competitive play. Modern WiFi has decent average latency and poor consistency, which is exactly the wrong shape. A cheap flat ethernet cable run across a carpet beats an expensive router in every test I have done.
  3. Turn off anything doing background upload. Cloud photo sync and game updates saturate the upstream channel, which is usually a fraction of your download speed, and upstream congestion delays the packets carrying your shots.
  4. Lower your interpolation if the game lets you. Source engine titles expose this directly. Reducing it makes other players appear closer to real time at the cost of more visible stutter when packets are late.
  5. Stop blaming your display chain for network symptoms. They feel identical and have different cures. Our guide to finding the cause of TV input lag separates the two, and it is worth ruling out before you buy a new router.

The fighting game community solved it differently

There is a parallel universe where this problem got a better answer. Fighting games cannot tolerate rewinding, because a single frame decides whether a combo connects, so for years they used delay based netcode: everyone waits for the slowest connection, and the whole match feels mildly underwater.

Then Tony Cannon wrote GGPO in the mid 2000s and introduced rollback to the genre. The client assumes the opponent will keep doing what they were doing, simulates forward, and when the real input arrives it silently re simulates the last few frames. At two or three frames of rollback you cannot see it happening. At eight you see a brief flicker of teleporting, and players learned to read that as a sign of a bad connection rather than a bad game.

Shooter players spent two decades complaining about dying behind walls while fighting game players campaigned, successfully, for publishers to adopt rollback as a baseline expectation. Both communities were facing the same physics. One of them turned it into a consumer demand, which is the sort of detail that tells you more about a hobby than any patch note. If you like this kind of hidden machinery, our pieces on what frame rate does to how a game feels and shader compilation stutter pull at similar threads.

FAQ

What is lag compensation in online games?

It is a server technique that stores recent positions of every player and rewinds the world to the moment a shot was fired before deciding whether it hit. Without it, anyone with normal internet latency would miss almost every moving target.

Why do I die behind cover in shooters?

Because the server rewound to the moment your opponent fired, when you were still visible on their screen, and applied the hit to that earlier position. Your client had already drawn you safely behind the wall. Both views are honest, and the server favours the shooter.

Does a 128 tick server make a big difference?

It cuts the gap between server updates from about 7.8 to 3.9 milliseconds, which matters at a high competitive level and is small beside the 20 to 80 milliseconds of network delay most players have. Jitter and packet loss usually affect your games more.

What is rollback netcode?

A method from fighting games where your client predicts the opponent's input, keeps simulating, then re runs the last few frames once the real input arrives. Under three frames it is invisible, which is why it feels far better than making everyone wait for the slowest connection.

RQ
Rosamund Quist

Rosamund spent years writing about game culture for print magazines before moving online. She edits Detect Magazine's features and has a soft spot for games that hide their best ideas in plain sight.

More posts by Rosamund

More in Tech Notes

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto