Sunday Drop

One simulation, two machines: agreeing on every step and every shot

You move the instant you press a key, and the server judges your shots against what your screen showed. Both work because your PC runs the Dead Drop server's own simulation. Here's how the two machines agree on every step and every shot, why that matters in a fight, and where they still don't.

Dead Drop is a 100-player, first-person battle royale for PC, built for competitive play. The introduction covers what the game is. This post is about what happens between your PC and the server every time you move or pull the trigger, and why the two usually agree.

When the game argues with you

You sprint for a wall, reach it, and a moment later the game puts you back in the open. You start a reload, and the magazine you just inserted vanishes. Or you see an enemy, fire first and watch the round land on your screen, and the game says you missed. Players call the first two rubber-banding. The third starts arguments after every match.

All three come from the same gap. The server is the authority on what happens in the match, and it’s tens of milliseconds away from you. Your PC can wait for it, and everything feels late. Or it can guess, and sometimes the guess and the server disagree.

Dead Drop’s answer is to put the server’s own rules on your PC. The game you play and the server that judges it run the same simulation, step for step. When they agree, you never notice the server at all. That gives us three promises to keep, as closely as we can:

  • Your moves happen when you press the key, and the server almost never takes them back.
  • Your shot is judged against what your screen showed, not against where the target got to while the shot was on its way.
  • The body you aim at is the body the server tests, through running, reloads and vaults.

Here’s how each one works, and where each one still falls short.

Your moves happen when you press the key

If your PC waited for the server’s answer before moving you, every key press would feel late. So it doesn’t wait. It moves you the moment you press a key and checks with the server afterward. That’s called prediction. When the server’s answer comes back different, your PC corrects itself, which is called reconciliation. Rubber-banding is what a large correction looks like from your chair.

So the fewer corrections, the better the game feels. The surest way to have none is for your PC to make the same decision the server will make, every time. In Dead Drop, the rules of the game live in one library, written in Rust, with no game engine in it. Movement, the guns, the inventory, vehicles, bullets and the zone are all in there. The server runs it to decide what happens, and your game client loads the same library to predict what happens to you.

Your PC and the server each run the same simulation library. Your PC sends inputs and predicts its own player. The server decides everyone and sends updates back, each with a short hash of your exact state.
Your PC and the server run the same simulation. Your PC predicts you, the server decides everyone.

The engine, Godot, only draws the result, plays the sound and reads your keys. The simulation itself moves in small fixed steps called ticks. Each tick, your PC packs your keys and your aim into the same compact message the server will receive. Then it steps your player with exactly the function the server will call, on exactly those bytes. Same starting point, same inputs, same surroundings, and the result is the same down to the last bit.

That covers far more than running around. Aiming down sights, your ammo count, a reload, swapping a magazine, using a bandage and opening a door are all predicted with the server’s own code. When you drive, your PC predicts the car with the same car physics the server uses. So when you insert a magazine, your PC runs the server’s own reload. The magazine only vanishes if something really did differ.

When your PC guesses wrong

Prediction is still a guess, and the server has the final say. Your PC never decides where you are or what you hit. A modified client can draw whatever it likes on its own screen, but the server keeps running the real rules. The question is how your PC finds out that its guess was wrong.

A common way is to compare positions and accept anything close enough. Dead Drop expects the two results to be identical, so it checks something stricter. Every update the server sends you carries a hash of your own state at that tick, a 32-bit number worked out from the data. Think of it as a fingerprint. Change one bit of the data and the fingerprint almost always changes too.

Two rows of ticks. Your PC is at tick 10 when the update for tick 6 arrives. If the hashes match, no correction is needed. If they differ, your PC asks for the exact state, a later update brings it for tick 8, and ticks 9 and 10 are worked out again from it.
If the hashes match, no correction is needed. If they don't, your PC takes the server's exact state and replays its inputs on top of it.

The fingerprint covers your movement, your gun and your inventory, and your car when you drive. Your PC keeps its guesses for the last few ticks. It works out the fingerprint of the matching one and compares the two numbers.

If they match, your PC was right, and the server doesn’t need to send your full state. If they don’t, your PC asks for your exact state, takes it and replays every input it has sent since. A small correction is smoothed out on screen so you don’t see it. A large one still snaps, and that’s the rubber band.

Because there is no “close enough”, every mismatch gets counted, even one too small to see. Most have a known cause. Your input reached the server too late, or you did something your PC deliberately doesn’t predict. Getting into a vehicle, for example, waits for the server and corrects you once. Whatever is left is a bug. Each one shows up in the count, so we can go and find it before it turns into a rubber band in your match.

Why two computers can agree at all

Two computers running the same code don’t automatically get the same answer. One can round a calculation a little differently, read its own clock or pull random numbers from the operating system. A single different bit breaks the fingerprint, and you’d be corrected for nothing. So the simulation follows a short list of rules, and each rule closes one way two machines can drift apart.

Six ways two computers can disagree, each paired with the rule that blocks it: the order of operations, the math library, the order data comes back in, the wall clock, the operating system's randomness and memory addresses.
Each way two machines can drift has a rule that closes it.

Arithmetic happens in a fixed order, because a different order can round differently. Positions, speeds and times are high-precision 64-bit numbers. Time is counted in ticks, never kept as a running total. That way, a player who joined late gets the same time for the same tick as everyone else.

The simulation also brings its own math library, compiled into the game. Each computer’s own sine and cosine can differ in the last digit, and the one built in gives the same answer everywhere. Players are always processed in a fixed order. The simulation never reads the wall clock, the operating system’s randomness or where things happen to sit in memory. Random numbers come from a generator that both machines start the same way, so they draw the same numbers.

Rules like these are easy to break by accident, so a test guards them. It plays a fixed scenario of bots, takes a fingerprint of the whole world and compares it with a stored one. If a change alters the result, the test fails until someone decides the change was meant. The same test runs on Windows, where you play, and on Linux, where the servers will run. A difference between the two isn’t allowed, because in a real match it would mean corrections all game long.

Leaning on someone at a loot pile

The rules take care of the arithmetic. Disagreements can also hide in what each machine knows, and other players are the hard part. Your PC knows your own inputs exactly. It only knows where everyone else was in its newest update, a moment ago.

Seen from above, you push against another player who is moving. Before the fix, your PC collided you with where its update had them, and the server with where they really were, so you ended up in two places. After the fix, the server uses the bodies your input was predicted with.
Before the fix, your PC and the server pushed you off two different versions of the same player.

We found out how much that matters when players became solid to each other. In our 100-bot tests, two bots looting the same pile would lean into each other for seconds, sliding slowly around each other. Your PC pushed you off the other player where its update had them. The server pushed you off where they really were. Every slide put the two machines out of step, and every one cost a correction.

So now each input says which update your PC predicted it against. The server keeps a short history of everyone’s bodies and pushes that input off the bodies from that update. Both machines collide you with the same version of the other player, and you stay where you were pushed.

It isn’t free. Two players sprinting straight at each other each collide with where the other just was. They can overlap by up to about a body’s width for a fraction of a second, before both catch up and push apart. We accepted that, because the alternative was a correction every time you brushed past a moving player.

Where you look, bullets hit

That loot pile is the same problem shooting has, at a much higher stake. Your PC draws other players from the server’s updates, slightly in the past, and smooths between them. So when you fire, you’re aiming at where an enemy was a moment ago. By the time your shot reaches the server, they’ve moved on.

If the server tested your shot against where the target is when it reads it, a shot that was dead on for you could miss. That’s the shot that starts the arguments. Dead Drop’s answer comes in two parts. The server knows exactly when you fired, and it knows what your screen was showing.

The instant you fired

One server tick as a span. The shot carries the moment you fired, late in the tick, as a fraction of it, with your aim at that instant. Below, the same shot rounded to the tick boundary starts from the earlier position and aim.
The shot carries the instant you fired inside the tick, so it isn't rounded back to the boundary.

The simulation moves in ticks, but your trigger finger doesn’t wait for one. Each shot your PC sends carries the moment you fired, as a fraction of the tick. It also carries your aim at that instant, recorded much more finely than the aim in your movement.

The server fires the shot from that instant instead of rounding it back to the start of the tick. A shot fired late in a tick leaves from where you were standing and where you were aiming at that moment. That matters most on a fast flick. Rounded to the tick, the shot would start from an aim you’d already moved past.

Rewinding to what you saw

The shot also names the moment your screen was showing other players. The server keeps a short history of every player’s pose, a few seconds long. When your shot arrives, the server rewinds the other players to that moment, and your round starts its flight there.

And it really is a flight. Bullets in Dead Drop aren’t instant. They have drag and drop, and at long range a round can be in the air for a second or more. So the server doesn’t test one frozen moment. It steps the round forward through its stored history, testing it at each step against where players were at that time. When the round catches up with the present, it carries on against the live world.

A time line and a top-down view. When you fire, your screen is showing the other player as they were a moment earlier, and the server reads your shot later still. By then the other player had run behind a wall. The server tests your round against where they were when you saw them, and follows its flight from there.
The server rewinds the other players to the moment your screen showed, then flies your round forward through its stored history.

So when you lead a running target at range, your round is judged against the run they were actually on while it flew. A distant player is sent to you less often than a near one, as the fog-of-war post explains. So your PC draws them further in the past. The shot accounts for that too. The server rewinds that one player further, but never further back than the gap between the updates it actually sent you about them.

Here’s the catch, and you’ll feel it from the other side. If the server judges by what the shooter saw, you can be hit a moment after reaching cover on your own screen. On their screen, you weren’t behind it yet. That’s the price of the shooter’s view counting, so the server limits how far back it will rewind.

Within that cap, which covers ordinary connections, the server tests your round against its history at the moment your screen showed. Past it, the server uses more recent positions, so a shooter on a slow connection has to lead their targets a little. That’s a deliberate choice. We’d rather a high ping cost the shooter than the player being shot at. The cap also means a client can’t hold its shots back and claim an old view to hit someone who left long ago.

The body you aim at is the body the server tests

Rewinding only helps if the shapes the server tests match the body you saw. In many shooters, the hit zones are simpler than the drawn body. A shot that clearly clips a sleeve misses, and one that passes beside the shoulder hits.

Dead Drop’s hit zones are 15 capsules, rounded cylinders for the head, neck, chest, stomach, pelvis, shoulders and limbs. They move with the body. Our art pipeline plays the soldier’s animation clips and records where each capsule sits at set moments in each clip. That table is built into the game, so the server knows where every zone is without running a skeleton.

Three side views of one player's hit zones as capsules: standing and aiming, running, and reloading while running, where the legs keep the running pose and the upper body takes the reload.
The server rebuilds the zones from the animation clips your PC draws and the state it recorded, without running a skeleton.

When a round needs a player’s zones, the server picks the clip from what it already knows, like their stance, their speed, their direction and whether they’re aiming. It takes the point in the clip from the clock, and turns the arms and head with their aim. Your PC draws that player with the same clip at the same point. So the running body you’re tracking and the zones the server tests move together, for a rewound shot too.

That holds in the moments that are hardest to get right. A player reloading on the run keeps their running legs while the upper body takes the reload. A rewound shot meets the arm where the reload had it. Vaults and climbs follow their own clips. A passenger leaning out of a car window turns their torso with their aim, and the zones turn with it. Running someone over is judged the way a shot is, from the driver’s view.

The zones are still an approximation, though. When a player switches from walking to running, the drawn body cross-fades between the clips, but the zones switch at once. The hands and feet have no zone at all. Our tests compare the drawn body with the zones at sampled moments. That catches drift between the two, but it isn’t proof that every frame fits.

How often your PC and the server agree

So how close does it get? Our benchmark runs 100 bots against one match, all on one machine. Each bot is a full network client without graphics, using the same prediction and shooting code as your game. For shots at targets within 150 meters, each bot flies its round again against the players and vehicles as it drew them. Then it compares which player, if any, it hit with the server’s verdict.

Hit disagreement between the bots and the server, as ranges of the share of hits. While the bots' check left vehicles out: 4.9 to 16.6 percent. With vehicles in the check: 1.4 to 3.6 percent. Later runs: about 1 to 2 percent.
Most of the early disagreement was the bots' check leaving vehicles out, not the server.

Counting every shot that either side called a hit, the two disagree on around 2 in every 100. That holds in our recent runs over both clean and simulated internet connections. In a run, that’s a handful of shots, small enough to look at one by one. When we sorted them, most of what was left happened while the round was still in the air after the newest update. Your PC has to guess where the target goes next, and the server knows where they went.

That number has also told us when something broke. When a new test map arrived with more cars on it, disagreement jumped as high as 16.6 percent. The server wasn’t wrong. The bots’ own check had never included vehicles. It didn’t know that an engine block stops a round, or that a driver sits inside the car.

One bot emptying a magazine into a parked driver could account for most of a run’s disagreements. Once vehicles were in the check, the same test read a few percent.

What isn’t solved yet

Some of this is still open.

The peeker’s advantage. A player coming around a corner still sees you a moment before you see them, because their move has to reach the server and then your PC. Rewinding makes shots fair to what the shooter saw, but it doesn’t remove that head start. We’ve been measuring it, and we’ve since moved the server to 120 ticks a second, which changes the picture. We’ll go into more depth on both in a future Sunday Drop.

Recoil. It runs in the same shared simulation, and the server works out your gun’s kick itself instead of trusting your PC. That matters more than it sounds once cheats come into it. We’ll go into more depth in a future Sunday Drop.

A bad connection still costs corrections. Each packet your PC sends repeats your recent inputs, so one lost packet usually costs nothing. When every copy of an input is lost, the server repeats your last movement in its place, and your PC gets corrected.

Not everything is predicted. Getting into or out of a vehicle, collisions between vehicles, running someone over and rounds hitting the car you drive all wait for the server. Hit markers come from the server too, not your PC.

Agreement is a discipline. The tests catch what they exercise. A rule broken somewhere no test reaches could still cause a desync in a real match. We’d find it in the counts, not before.

What comes next

So far, most of what we’ve measured comes from a hundred bots. People playing on real connections will find cases the bots never do, and we expect the next surprises to come from them. The counters in this post are how we’ll know whether a fix for one worked.

That’s also what lets a small team keep changing the game’s core week to week. A fixed scenario, a hundred bots and a fingerprint tell us when the two machines stopped agreeing.