SI spawn placement visualizer
Interactive walkthrough of the 2026-08 spawn selection pipeline (inf_nav_team_nearest 1): the native extension runs a single multi-source reverse Dijkstra pass so every Nav area records its shortest path distance to the nearest available survivor and its assigned owner; the plugin then scans 10 fixed distance bands from near to far, evaluating candidates from front to back by Flow within each band. Gray walls mark impassable cells so you can compare path detours against straight-line distance—drag any survivor to recompute the distance field live.
2D controls: left-drag a survivor to reposition them, drag empty space to pan, scroll to zoom around the cursor, and double-click to reset the view; in built-in grid mode, select 'Draw Wall / Erase Wall' and drag to paint obstacles.
3D controls: left-drag to orbit, right-drag or Shift+left-drag to pan, scroll to zoom, and double-click to reset the camera; switch back to 2D Top-Down to drag survivors.
Graph 2D controls: left-dragging a survivor snaps them to the nearest Nav area center, and dragging empty space pans the canvas; select 'Block Area' and click or drag to simulate dynamic blockers (elevators, doors, nav_block), removing blocked areas from the distance field and candidate pool.
Graph mode LOS check: once geometry data is loaded, the visualizer runs real raycasts against BSP triangles (including floors and ceilings; playerclip does not block LOS, checked only when straight-line distance <= 1800); without geometry, it falls back to the heuristic 'straight-line <= 1500, |Δz| <= 120, detour ratio <= 1.6'. Real map graphs can be exported on the server with sm_navgraph_export and loaded via 'Import Map JSON'.
Parse custom maps locally: drag a .vpk / .zip or raw .bsp+.nav directly onto the canvas (or click 'Parse Local Map') to parse everything in your browser without uploading files (.7z / .rar archives must be extracted to VPK first). Local parsing reads raw map file presets without Anne Stripper blockers or Director runtime item pruning; for official maps or live server snapshots, use the map dropdown or 'Import Map JSON'.
Survivor states (click to toggle, drag to move)
Current search state
Scene saves (browser local)
Search log (matching the [FIND]/[SpawnPerf] wording)
The full pipeline of one normal spawn attempt (team-nearest branch)
How this page maps to the real implementation / simplifications
| Real implementation | This demo |
|---|---|
| AnneSpawn_NavCandidatesPrepareTeam / CollectTeam (multi-source Dijkstra; owner is the survivor yielding the shortest path, breaking ties by lower client index) | 8-way grid Dijkstra recording path distance and owner per cell (tie-broken by lower index, 1 cell = 50u) |
| Intersects the 10 TEAM_NAV_LAYER_EDGES bands with class [classMin, min(finalMax, inf_SpawnDistanceMax*2)] (first 9 half-open, final band closed) | Identical (clips distance ranges by selected class and skips empty bands) |
| Orders candidates within each band by descending Flow (front-first); team mode skips near/mid/far tercile interleaving and shuffling | Identical (grid mode simulates Flow progress using horizontal X coordinates) |
| Excludes spots within max(250, inf_SpawnDistanceMin) straight-line distance of any survivor, followed by LOS trace, hull stuck, and path checks | Implements the exclusion radius and grid LOS (Bresenham wall check); omits hull stuck and path re-verification |
| Hard-rejects behind-progress gaps (8 buckets for standard classes, 4 for Hunter/Jockey/Charger; soft-penalized instead of rejected when owner progress >= 90%) | Identical |
| SpawnScore_BuildCandidate multi-factor scoring + best of 12-candidate budget pool | Forward bonus - behind gradient - distance deviation - kernel density; 100u hard separation rejected outright; picks best once 12 candidates are collected |
| SI_Target_limit: per-survivor cap = (SI limit / active survivors) + 1, doubled for the Flow leader | Identical; each spawned SI increments its owner's count by 1, removing that owner from the active set and rebuilding the distance field once capped |
| Falls back to Director Range (2000u straight-line distance cap) once all distance bands are exhausted | Picks a random feasible distant cell and marks it as a fallback indicator |
| Nearby SI kernel density (close combat excluded, radius scales with SI cap), 100u hard separation, Nav area cooldown, and post-spawn teleport supervision | Implements area cooldown, 100u hard separation, and dynamic-radius kernel density; omits post-spawn teleport supervision |
| Real map Nav graph (exported via sm_navgraph_export with area centers, corners, Flow, attribute flags, and directed edges) | Graph mode runs the same state machine over the imported adjacency graph, using real triangle raycasts when geometry is loaded (excluding dynamic props and glass semantics) and falling back to heuristics otherwise |
| Dynamic blocker snapshots (blocked) are read frame-by-frame from the engine by the native extension (elevators, doors, nav_block, etc.) | In graph mode, 'Block Area' lets you toggle dynamic blockers manually; Dijkstra and candidate collection skip blocked nodes directly |
| Item and blocker entity layers reflect the post-load runtime snapshot (includes Stripper edits, before Director round-start item pruning) | Renders item markers and blocker bounding boxes directly from the exported snapshot (requires v2 export data) |