Commit Graph
25 Commits
Author SHA1 Message Date
popertots f9a74ed432 feat: migrate quilter rendering to Bevy TilemapChunk
Replaces the CPU pixel-baking quilter system (QuiltCache, TerrainSprite,
pixel_buffers) with Bevy's native TilemapChunk GPU-index-lookup API.

Architecture:
- TilemapChunk entities replace TerrainSprite entities per (chunk, z, layer)
- Tileset PNG stacked vertically as texture_2d_array (11 rows: 6 floor + 5 fixture)
- populate_chunk_tiles reads TileMap HashMap directly; no ECS FloorTile entities
- Chunk spawn deferred to apply_terrain_blobs (after TileMap data exists)
- Dirty key system triggers repopulate on occlusion/camera-z changes

Bug fixes:
- populate_chunk_tiles: add chunk_pos offset to world tile lookups (was always (0,0))
- spawn_tilemap_chunks: offset Transform by -TILE_SIZE/2 (tile-centre vs bottom-left)
- spawn_tilemap_chunks: AlphaMode2d::Blend (was Opaque, blocking DF fade)
- update_tilemap_chunk_visibility: actually mutate Visibility (was read-only)
- handle_tile_occlusion_updates: mark dirty keys inline (was double-reading events)
- TilemapChunkSpawner: deduplicate pending queue and guard stale registry

Performance:
- ~115K FloorTile ECS entities eliminated
- GPU memory: O(tile_data) instead of O(CHUNK_TILES² × z_levels × pixel_bytes)
- Z-scroll: only TilemapChunkTileData repopulates (no entity re-spawn)
- Benchmarks via TilemapBenchmark resource (F9 to report)
2026-03-20 14:02:04 +00:00
popertots 975ac20876 minor 2025-09-14 19:04:34 +01:00
popertots 8a5884c6d5 example item 2025-09-12 18:04:03 +01:00
popertots ee7ac39ad5 refactor file locations for readability 2025-09-11 18:23:53 +01:00
popertots e58f6804bf File cleanup 2025-09-10 20:03:29 +01:00
popertots cbc8011f33 Art 2025-09-10 18:11:01 +01:00
popertots d2dd70caa0 add trees 2025-05-23 17:09:58 +01:00
popertots e2ccd0cead Log (wip), parallelisation 2025-05-11 22:58:25 +01:00
popertots 49095cc47f terrain quilting scaling fix 2025-05-05 23:09:28 +01:00
StephenAdamson 4ba6fecc27 batch sprite 1 2025-02-08 00:23:49 +00:00
StephenAdamson 501c66a1b0 better dorf z 2025-01-25 16:54:27 +00:00
StephenAdamson c88067437c art 2025-01-13 21:02:55 +00:00
StephenAdamson ed88d5bdce partial chunking 2025-01-07 21:35:44 +00:00
StephenAdamson 11ba882d54 images 2024-12-30 22:19:25 +00:00
popertots a4342c9aa0 start con_text 2024-12-29 19:03:26 +00:00
StephenAdamson 3aadb8bb78 Separate floor from fixture 2024-12-29 00:45:07 +00:00
StephenAdamson b47e6cce69 barrel 2024-12-18 00:38:25 +00:00
StephenAdamson d107626b32 changeable z index, with occlusion 2024-12-17 21:30:46 +00:00
StephenAdamson caacf4e072 occlusion part 2 2024-12-17 21:10:21 +00:00
StephenAdamson 80afd547e5 Occlusion attempt 1 2024-12-17 19:44:54 +00:00
popertots 8d89f86c69 z sorting attempt 2024-12-14 01:04:52 +00:00
StephenAdamson bf3ddd0e74 attempt noise gen 2024-12-14 00:03:52 +00:00
StephenAdamson 7363ec9d39 cursor ui 2024-12-13 23:07:08 +00:00
StephenAdamson 01e1349ea1 initial z axis tiles pass 2024-12-13 00:19:21 +00:00
StephenAdamson 7bab01ee74 Initial tile push with item cycle 2024-12-12 17:19:59 +00:00