← All interactive demos

Why You Teleport in Online Games — Interactive Demo

This is the working model from the video "Why do you rubber-band in online games?". The server (light blue) holds the correct position. Your screen sends the buttons you press to the server, and the server sends answers back only 20 times a second. The other player's screen draws the answers it receives, joined up 0.1 seconds late. The visuals are our own diagrams, not footage from a real game.

1. Try it (← → keys, or hold the buttons below)

—

2. How your screen is drawn

Round trip 0.30 s (one way is half of this)
Task: change the round-trip time, close the door while you are running, and compare how many squares the square on your screen is pulled back. Also try to find a moment to close the door where you are not pulled back.

3. Try 251 door timings (measured the same way as in the video)

The square runs right with the button held. The time the door closes on the server is changed from 1.00 to 3.50 s in steps of 0.01 s, and we count the largest pull-back when the answer is checked and how many times a pull-back happened (drawn with "Reconcile").
Round tripPull-back (max)Times it happened

How each mode draws: Wait = draw at the position in the latest answer (no prediction). Overwrite = move locally as soon as you press, and overwrite with the answer's position when it arrives. Reconcile = move first, and when an answer arrives, replay from that position all inputs the server has not answered yet (inputs are numbered, and the server says up to which number it has calculated). Reconcile + ease = the same calculation, but the drawn position is not snapped back at once; it eases toward the correct position (1/6 of the remaining gap every frame).
Model settings: a corridor 24 squares wide, the square moves 6 squares a second, the screen runs at 60 frames a second, the server 20 times a second, no network jitter or packet loss. The door is at square 12 (you cannot pass it when closed). The numbers are for this teaching model; real games differ in connection speed and update rate.
Sources and production: same as the video description (explanations by Gabriel Gambetta, Glenn Fiedler, the Valve Developer Community and others. AI was used to make the diagrams and script. No game footage or characters are used).