48 · Multiplayer · 2D and 3D

Interest management

Only send players what they can see.

A server that sends every player every update wastes bandwidth and CPU, and it gets worse as the player count grows. Interest management filters updates per client, usually by distance or a spatial grid, so each player only receives the entities that matter to them.

←↑↓→ or WASD moveI filter on/off · 123 radiusD-pad to walk

Try this: Walk around 200 players. With no filter the server sends you all of them and the bandwidth bar is red. Turn on the interest area: only nearby players update, the far ones go grey.

Players sent 200Bandwidth 0 kbit/s

No filter: the server sends you every player on the map, even ones you cannot see.

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.

Add interest management: send each client updates only for entities inside its interest radius or neighbouring grid cells, check every 0.1 s, and keep party members and the current target relevant even when they are outside the radius.

38 words · one sentence to paste as is

Where it's used

Common mistakes

Checking distance against every entity every frame (O(n²)), no hysteresis so entities pop at the edge, dropping party members or the current target, forgetting despawn messages, and making the radius smaller than the view distance so enemies appear from nowhere.

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.