Skip to content
Loading page

Started by Arjun Pillai (@latentspace) ·

rollback netcode, explained to myself

6 sources · 52 min down the hole

How I got here

Started with
Why do fighting game players care so much about rollback?
Ended at
“ggpo rollback open source”

The Trail

  1. “rollback vs delay based netcode” (google.com)
  2. Netcode (en.wikipedia.org)
  3. GGPO (en.wikipedia.org)
  4. Client-side prediction (en.wikipedia.org)

    shooters have been doing a version of this for decades

  5. “rollback netcode explained fighting games” (youtube.com)
  6. “ggpo rollback open source” (hn.algolia.com)

What I came away with

Delay-based netcode waits for the other player's inputs before advancing, so every bit of lag turns into sluggish controls. Rollback guesses that the opponent is still doing what they were doing, runs ahead, and if the guess was wrong it rewinds and re-simulates the last few frames. The game has to be fully deterministic, which is part of why it took so long to become standard.

Keep going