45 · Multiplayer · 2D and 3D

Entity interpolation

Show other players smoothly between network updates.

Servers send positions maybe 10 to 30 times a second, and packets arrive unevenly. Drawing each update as it lands makes other players stutter and teleport. Interpolation renders them a little in the past, smoothly moving between the two snapshots around that time.

←↑↓→ or WASD moveI interpolation on/offD-pad to move

Try this: Move on the left. The right shows what a friend sees from 10 updates a second: you teleport between dots. Turn interpolation on and you glide, about 0.1 s behind.

Snapping: updates arrive 10 times a second, so your friend sees you teleport.

Prompt bit

Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.

Interpolate remote entities: buffer timestamped server snapshots, render them about 0.1 s in the past (two update intervals), lerp position and slerp rotation between the two snapshots around that time, and hold the last pose briefly instead of extrapolating far when packets stop.

43 words · one sentence to paste as is

Where it's used

Common mistakes

Rendering snapshots as they arrive (stutter), interpolating toward the newest snapshot so movement lags and rubber-bands, no buffer for jitter, extrapolating forever after packet loss, and interpolating teleports across the map.

Writing this with an AI assistant? See our best AI coding assistants for game developers.

Missing a concept? Request one.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.