Drop the chunk palette; chunks are plain u16 tile arrays
The 64-entry per-chunk palette was a wire-format artifact and capped a chunk at 64 distinct tiles. A Chunk is now Box<[u16; 1024]> with flags derived from the id on lookup — the same layout a binary on-disk format would use. Map path becomes the first CLI argument; assets/map_large is a generated 256×256 stress map (loads in ~0.5 ms release). The snapshot test takes SNAPSHOT_MAP. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5a055c048d
commit
1d14076468
+4
-2
@@ -24,8 +24,10 @@ crate's `tick`/`set_action` interface is the seam a server could be wrapped arou
|
||||
- [x] Pixel helpers: `set_pixel`, `extract`, `blit`, `blit_tile` in `game/src/game/pixelhelper.rs`
|
||||
— signed `i32` offsets, clip against all four framebuffer edges, per-tile opacity mask
|
||||
- [x] Input system: `GameAction`, `InputMap`, `InputState` in `game/src/input.rs` (over `pbio::Key`)
|
||||
- [x] World model: `World` of 32×32 palette-compressed `Chunk`s (64-entry `TileDef` palette,
|
||||
6-bit tile indices), entities indexed per chunk, `entities_in_viewport`
|
||||
- [x] World model: `World` of 32×32 `Chunk`s (plain `[u16; 1024]` tile ids, flags derived
|
||||
on lookup — the network-era 64-entry palette is gone), entities indexed per chunk,
|
||||
`entities_in_viewport`. Map path is the first CLI argument; `assets/map_large` is a
|
||||
generated 256×256 stress map
|
||||
- [x] Map loader: Tiled-CSV parser in `sim/src/map.rs` (flip-flag masking, content-derived
|
||||
dimensions), `load_world` slices it into chunks, invisible solid border at the map rim.
|
||||
See `notes/07-map-loader.md`
|
||||
|
||||
Reference in New Issue
Block a user