← THE BLUE STICK

Guides / Online multiplayer

What Is Netcode? Online Play Explained

PLAY NOWMultiplayer, free, in your browser

Netcode is the informal name for the part of a game that handles playing over a network. When players say a game has "good netcode" or "bad netcode", they mean how well it hides the delays and gaps of the internet.

In an online game, several devices in different places each show the same world. But information takes time to travel between them, typically 20 to 100 milliseconds each way.

By the time your device learns where another player is, they have already moved. By the time the server hears that you fired, a fraction of a second has passed. Everyone is always looking at a slightly old picture, and each player's picture is old by a different amount.

Netcode is the collection of techniques that makes this feel instant and fair anyway.

Who is in charge: servers and peers

Client-serverPeer-to-peer
How it worksA central server runs the real match. Each player's device sends inputs and receives resultsPlayers' devices talk to each other directly, often with one acting as host
Who has the final wordThe serverThe host, or all players jointly
CheatingHarder, since the server checks everythingEasier
Cost to the developerServers must be paid forVery little
When someone leavesThe match carries onIf the host leaves, the match may pause or end
FairnessEveryone has the same relationship to the serverThe host has no delay, which is an advantage
Used byValorant, Counter-Strike 2, Fortnite, Overwatch 2 and most modern shootersMany fighting games, older console games and small cooperative games

A server that runs the true version of events is called authoritative. If your device and the server disagree, the server wins.

Tricks that hide the delay

If a game waited for the server before showing anything, every action would feel sluggish. So games cheat a little, in your favor.

TechniqueWhat it doesWhat you notice when it goes wrong
Client-side predictionYour own character moves the instant you press a key, without waiting for the serverA small snap backward, called rubber-banding, when the server disagrees
InterpolationOther players are drawn slightly in the past, smoothed between the updates receivedNothing, normally. With lost data, players jerk or teleport
Lag compensationWhen you shoot, the server rewinds to what you saw at that moment to judge the hitBeing hit just after reaching cover, because on the shooter's screen you had not reached it
ExtrapolationIf updates stop arriving, the game guesses where things are goingPlayers sliding on in a straight line, then jumping back

Client-side prediction was introduced to a wide audience by QuakeWorld in 1996, to make Quake playable over dial-up modems with pings of several hundred milliseconds. Lag compensation was popularized by Valve in Half-Life and Counter-Strike in the early 2000s. Both are now standard.

Lag compensation involves a real trade-off. It favors the shooter, so that what you see is what you hit. The cost falls on the target, who may be hit a moment after they believed they were safe. Games limit how far back the server will rewind, so that a player with very high ping cannot hit people long after the fact.

Tick rate

Tick rate is how many times per second the server updates the game.

GameServer tick rate
Valorant128
Counter-Strike 264, with a "sub-tick" system that records the exact time of each input
Overwatch 2About 63
Fortnite30
Apex Legends20
Call of Duty: WarzoneAbout 20

A higher tick rate means the server's picture of the match is more precise and more current. At 128 ticks, the server looks at the world every 7.8 milliseconds. At 20, every 50.

Tick rate is a cost decision. More ticks need more server power, and a game with 60 or 100 players in one match has far more to calculate each tick than one with ten. That is why large battle royales run lower rates than small tactical shooters.

Rollback, and fighting games

Fighting games have the strictest requirements, since moves are timed to single frames, 16.7 milliseconds each.

Delay-based netcodeRollback netcode
How it worksBoth players' inputs are held back a few frames so they arrive togetherThe game guesses the opponent's input and carries on. If the guess was wrong, it rewinds and replays instantly
Feel at low pingGoodExcellent
Feel at higher pingSluggish, like playing underwaterStill responsive, with occasional small visual jumps
Over long distancesPoorPlayable

Rollback was popularized by GGPO, a system created by Tony Cannon in 2006. For years it was mostly used in fan projects and re-releases. After players pushed hard for it, it became the expected standard, and Guilty Gear Strive, Street Fighter 6 and Tekken 8 all use rollback.

What you can and cannot control

Netcode is the developer's responsibility. No setting on your side changes how a game was written. But the same game behaves better or worse depending on your connection.

  1. Use a wired connection or strong 5 GHz Wi-Fi.
  2. Play on the nearest server region.
  3. Keep your network free of heavy downloads and uploads.
  4. Turn on the game's network display to watch ping and packet loss.
  5. In fighting games, check the opponent's connection quality before accepting a match, and prefer wired opponents where the game shows it.
  6. Keep your frame rate steady. A stuttering device sends uneven input, which looks like network trouble.

Understanding netcode makes online play less frustrating. When something odd happens, a hit that seemed impossible or a player who skipped across the screen, it is rarely cheating. More often it is two devices disagreeing briefly about a world that neither can see in real time.

PLAY NOWMultiplayer, free, in your browser