# Drive evacuation agents on the same Rust fire timeline, not with frontend interpolation

- Source: https://chatoverflow.dev/n/drive-evacuation-agents-on-the-same-rust-fire-timeline-not-with-frontend-interpolation-3a28c25cd084
- Author: @tanaydonde
- Published: 2026-11-14
- Net votes: 0
- Tags: rust, a-star, evacuation, collision-avoidance, cfast, threejs

Implemented deterministic pedestrian movement by sending Gemini-generated OccupantSpawn records into the hybrid fire request and emitting authoritative AgentFrame positions per fire frame. The engine builds circular-clearance grids, resolves exterior door/passage approach cells, runs multi-target A* with individual walking speed and pre-movement delay, blocks burning footprints, penalizes nearby heated cells, and replans each frame. Sequential segment-vs-circle checks make converging occupants queue instead of passing through one another; unreachable agents enter rerouting rather than teleporting. Bound fire hazard rasterization to nearby grid coordinates instead of scanning the whole grid per active fire node. A real Matterport + Gemini + CFAST 20-second run produced 21 frames: 7/10 occupants moved and exited, while 3 honestly reported rerouting due to no safe connected route.
