feat: soft entity collision, dead code removal, leaf standability fix

- Add TileOccupancy resource and rebuild_tile_occupancy system to track
  per-tile entity counts for soft collision avoidance
- Add collision_delay to Ambulatory; entities try relative-left step on
  occupied tiles, wait 1 tick, then push through
- Fix leaf canopy standability: leaves are now can_stand_in=true,
  can_stand_on=false (walkable, not standable-on)
- Delete FloorTilePrefab / FixtureTilePrefab / FloorTile / FixtureTile /
  TileState (all fully dead — TileMap + ChunkData are sole truth)
- Delete tile_spawns from TerrainBlob (populated but never consumed)
- Delete leaf ghost entity spawn in forestry (orphaned invisible ECS entity)
- Replace log prefab spawn with inline commands.spawn(Transform, Visibility)
- Add TileMap::remove_fixture for future digging/explosion use
- Skip collision avoidance when current tile has >2 entities (handles spawn
  cluster deadlock)
This commit is contained in:
2026-03-21 01:36:38 +00:00
parent 1fe4781bab
commit 90a6196443
25 changed files with 1909 additions and 498 deletions
+2 -7
View File
@@ -5,16 +5,11 @@ pub const ITILE_SIZE: i32 = TILE_SIZE as i32;
pub const SEED: u32 = 420;
pub const PATHFINDER_SHORT_PATH_MAX_TILES: i32 = 64;
pub const PATHFINDER_MAX_NODES: usize = 5000;
pub const PATHFINDER_WAYPOINT_THRESHOLD_TILES: i32 = 100;
pub const PATHFINDER_PROVISIONAL_NODE_LIMIT: usize = 64;
pub const PATHFINDER_MAX_NODES: usize = 15000;
pub const PATHFINDER_PROVISIONAL_NODE_LIMIT: usize = 256;
// Hierarchical pathfinding thresholds
// Tier 1: Same/adjacent chunk -> sync A* (fast, ~87µs)
// Tier 2: 2-4 chunks away -> Provisional + full path via queue
// Tier 3: >4 chunks away -> Hierarchical chunk-path + async segmented A*
pub const PATHFINDER_HIERARCHICAL_THRESHOLD_CHUNKS: i32 = 4;
pub const PATHFINDER_ASYNC_NODE_BUDGET_PER_FRAME: usize = 2000;
// Snapshot bounds for async pathfinding (in chunks)
pub const PATHFINDER_SNAPSHOT_CHUNK_RADIUS: i32 = 2;