Playband
Devlog
pathfindingrts

Pathfinding that agrees on every client

Navmesh A* with funnel smoothing and ORCA avoidance — running locally on each machine and arriving at the exact same path. No path data on the wire.

Playband

Move a thousand units in an RTS and you do not want to stream a thousand paths across the network. In a deterministic world you don’t have to: every client computes the same path from the same inputs, so the army just moves — no path data is ever sent.

The pipeline

A* over a navmesh for the route, a funnel pass to smooth it into a natural line, and ORCA for local avoidance so units flow around each other instead of colliding. All of it fixed-point and order-independent, which is what keeps it identical across machines.

The determinism traps

Getting this right meant being ruthless about sources of divergence: neighbor insertion has to be order-independent, the corridor cache has to key off the goal polygon’s centroid rather than an exact point, and avoidance jitter has to resolve the same way for everyone. Get those wrong and two clients pick “equally good” but different paths — and you’ve desynced.