What is netcode, and what is the difference between rollback and delay-based?
Netcode is the collective term for how a multiplayer game synchronises state between players across a network. It is one of the hardest problems in game development, because information takes time to travel and every player needs a consistent view of a shared world.
The fundamental problem. If you press a button, that input must reach the other player. At 50ms of latency, they learn about it 50ms late. Something must resolve the disagreement.
Delay-based netcode solves it by waiting. The game buffers your input for roughly the round-trip time before executing it, so both machines execute the same input on the same frame. The simulation stays perfectly synchronised.
The cost: your own inputs feel delayed, because they are. Every player experiences added input lag proportional to the connection, and the game feels sluggish and unresponsive on anything but an excellent connection. Worse, latency spikes cause the game to freeze while waiting, producing the stuttering familiar from older fighting games.
Rollback netcode solves it by predicting and correcting. Your inputs execute immediately and locally. The game predicts what the opponent will do, usually assuming they continue their previous input. When their actual input arrives, if the prediction was wrong, the game rewinds to that frame, replays the intervening frames with the correct input, and resumes — all within a frame or two.
The benefit: your own actions are always instant, regardless of ping. This matters enormously in fighting games where reactions are measured in a few frames.
The cost: visible teleporting or snapping of the opponent when a prediction was wrong. Most players find that far preferable to their own controls feeling delayed.
Why rollback became the standard in fighting games, and why its absence is now a serious criticism at launch.
Other approaches: lockstep for RTS games, and client-server with authority for shooters, using client-side prediction and lag compensation.