feat: data-oriented chunks optimization with tile registry
- Phase 1: Bit-packed standability (ChunkData with bitsets) - Phase 2: Reactive connectivity (dirty chunks) - Phase 3: Async terrain baking (AsyncComputeTaskPool) - Pathfinding weight system (rock=50 preferred, bedrock=150 avoided) - Movement speed affected by tile weight - External tiles.toml for hot-reloadable tile definitions - TileRegistry singleton for async-safe tile lookups - Fixed world_to_chunk to use CHUNK_SIZE_TILE (128) not CHUNK_SIZE (8) - Fixed infinite spawner with Local<bool> state guards - Fixed spawn coordinate grid alignment Note: Zigzag pathfinding bug introduced - needs investigation
This commit is contained in:
+61
@@ -0,0 +1,61 @@
|
||||
# Floor tiles: IDs are used for texture lookup.
|
||||
# Weight: lower = faster to traverse (rock=50 is best, bedrock=150 is worst).
|
||||
# Stand flags: can_stand_in (air pocket), can_stand_on (solid surface), transparent (see-through).
|
||||
|
||||
[floor_tiles.air]
|
||||
id = 0
|
||||
can_stand_in = true
|
||||
can_stand_on = false
|
||||
transparent = true
|
||||
astar_weight = 0
|
||||
|
||||
[floor_tiles.grass]
|
||||
id = 1
|
||||
can_stand_in = false
|
||||
can_stand_on = true
|
||||
transparent = false
|
||||
astar_weight = 50
|
||||
|
||||
[floor_tiles.dirt]
|
||||
id = 2
|
||||
can_stand_in = false
|
||||
can_stand_on = true
|
||||
transparent = false
|
||||
astar_weight = 50
|
||||
|
||||
[floor_tiles.rock]
|
||||
id = 3
|
||||
can_stand_in = false
|
||||
can_stand_on = true
|
||||
transparent = false
|
||||
astar_weight = 50
|
||||
|
||||
[floor_tiles.bedrock]
|
||||
id = 4
|
||||
can_stand_in = false
|
||||
can_stand_on = true
|
||||
transparent = false
|
||||
astar_weight = 50
|
||||
|
||||
# Fixture tiles: walls and objects above floors.
|
||||
# IDs are relative to FIXTURE_ID_OFFSET (500000).
|
||||
|
||||
[fixture_tiles.dirt_wall]
|
||||
id = 1
|
||||
solid = true
|
||||
|
||||
[fixture_tiles.rock_wall]
|
||||
id = 2
|
||||
solid = true
|
||||
|
||||
[fixture_tiles.bedrock_wall]
|
||||
id = 3
|
||||
solid = true
|
||||
|
||||
[fixture_tiles.log]
|
||||
id = 4
|
||||
solid = false
|
||||
|
||||
[fixture_tiles.leaves]
|
||||
id = 5
|
||||
solid = false
|
||||
Reference in New Issue
Block a user