CSV-Map loading

This commit is contained in:
2026-06-17 10:28:32 +02:00
parent fd02ed6d8b
commit 5c8494961c
5 changed files with 211 additions and 15 deletions
+9 -6
View File
@@ -28,6 +28,9 @@ terminal). The platform layer — window, GPU, input, RGB332 palette — lives i
- [x] Ping/Pong RTT measurement (`PingPacket` / `PongPacket`)
- [x] Connection timeout: client emits `Disconnected` after 10 s without a `StatePacket`;
server evicts clients unseen for 10 s
- [x] Map loader: Tiled-CSV parser in `server/src/map.rs` (flip-flag masking, content-derived
dimensions), `load_world` slices it into chunks, invisible solid border at the map rim.
Replaces the hardcoded `build_world`. See `notes/07-map-loader.md`
---
@@ -48,14 +51,14 @@ This supersedes the original 20/10/1 Hz three-tier sketch.
---
### 07 — Tiled map loader
### 07 — Tiled map loader *(done — see Achieved / `notes/07-map-loader.md`)*
Replace the hardcoded `build_world` wall loop with real level data.
Remaining follow-ups when the need is concrete:
- Parse Tiled TMX (XML) or JSON export — only the subset actually used
- Define the tile vocabulary: `TileKind` variants map 1:1 to Tiled tile IDs
- Load a hand-authored starting area as the first real level
- Procedural generation comes later; hand-authored first
- Collision vocabulary: `tile_flags` in `map.rs` is currently empty (all walkable). Fill in
collidable / opaque tile ids as the level design requires.
- Tile flipping: orientation is discarded on load; revisit with the sprite pass (09).
- Multiple / object layers (spawns, triggers) — not yet parsed.
---