← All interactive demos

Rollback — Interactive Demo

This is the working model from the video "Why Do Moves Appear Mid-Animation in Online Fighting Games?". Left = you (white), right = the opponent (pink). Both players' inputs come from our own random numbers, and the opponent's buttons arrive a few frames late over the network. The top shows "in the same room (true motion)"; the bottom shows "your screen in an online match". The visuals are our own diagrams, not real game screens.

1. Play a 10-second match

Match number
—

2. Connection and method

One way
Method
Your own delay
Prediction
Task 1: with "Delay-based", find the amount of delay that never freezes even at 6 frames one way.
Task 2: with "Rollback" at 6 frames one way, find the amount of delay at which the opponent's light punch (startup 4) shows up on the frame it hits.

3. Average of 100 matches (10 s each) (same measurement as the video)

—

Methods: Wait = do not advance to the next frame until the opponent's button arrives. Delay-based = also delay your own button by the "delay" frames, making time in advance to wait for theirs (it freezes if it does not arrive in time). Rollback = predict the opponent's buttons that have not arrived and keep going, saving the state every frame; if an arriving button differs from the prediction, go back to that frame and recalculate (all within one frame). Adding "delay" combines rollback with a little delay.
Model settings: 60 frames per second. Moves use our own values (light punch startup 4, medium punch startup 6, heavy kick startup 12). Getting hit while holding back and able to move counts as a block. Spacing is ignored. "Spiky" means usually 3 frames one way, but about once every 2 seconds it becomes 6 frames for 10–30 frames. "Vanished hits" counts hits that looked like they landed on screen but disappeared after a rollback. The numbers come from a teaching model; real games differ in their connections and prediction methods.
Sources and credits: same as the video description (Infil "Fighting Game Netcode", the GGPO README and more. AI was used to make the diagrams and script; no game footage or characters are used).