feat: async pathfinding with provisional paths and bit-grid snapshots
- Add StandableBitGrid: O(1) bit-packed snapshot (~6KB per 50k tiles vs HashMap overhead) - Implement two-tier pathfinding: sync for short paths (<64 tiles), provisional+async for long paths - calculate_provisional_path: capped A* returning path to best heuristic node - calculate_async_path: A* using bit-grid (Send+Sync, no thread_local) - prepare_paths system: dispatches provisional paths immediately, spawns async for full paths - poll_async_paths + splice_completed_async_paths: seamless path transition when async completes - Entities start walking immediately on provisional path while full path computes in background Architecture: FixedUpdate: prepare_paths → update_wandering_targets → movement PostUpdate: poll_async_paths → splice_completed_async_paths Priority: DF-like pathing (immediate movement) > performance > memory
This commit is contained in:
Generated
+1
@@ -2335,6 +2335,7 @@ dependencies = [
|
||||
"bevy",
|
||||
"bevy_platform",
|
||||
"bevy_rand",
|
||||
"futures-lite",
|
||||
"image",
|
||||
"nohash-hasher",
|
||||
"noise",
|
||||
|
||||
Reference in New Issue
Block a user