Reorganize assets; switch the HUD to the Micro Chat font

Source packs move to assets/packs (untouched), maps to assets/maps, and the
palette/sketch leftovers from the 8-bit era go. tools/mkfont.py repacks
VEXED's Micro Chat sheet (8-column grid, 8x10 cells) into the CP437 atlas
layout the font loader already reads, cropped to 8x9 so the HUD can use an
8 px line height. The CGA atlas is dropped in its favor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 19:47:33 +02:00
co-authored by Claude Opus 5
parent bb12f095d8
commit 335962800f
111 changed files with 528 additions and 546 deletions
+9 -3
View File
@@ -9,6 +9,11 @@ window, GPU, input, RGB565 framebuffer — lives in the external `pbio` crate (g
branch `truecolor16`),
not in this repo.
Assets: `assets/packs/` holds the source packs untouched (Mini Medieval family by
VEXED, CC-BY); `assets/tilesets/` is what the game actually loads — sheets assembled
from the packs (`entities.png`: player, hen, fox); `assets/fonts/` the font sources and
the repacked atlas; `assets/maps/` the Tiled CSV maps.
History: this fork started from a client/server multiplayer architecture (authoritative UDP
server, thin client with prediction). The scope was cut to single player in September 2026;
the sim kept its authoritative shape, everything network-related was removed. The `sim`
@@ -26,7 +31,7 @@ crate's `tick`/`set_action` interface is the seam a server could be wrapped arou
- [x] Input system: `GameAction`, `InputMap`, `InputState` in `game/src/input.rs` (over `pbio::Key`)
- [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
`entities_in_viewport`. Map path is the first CLI argument; `assets/maps/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.
@@ -162,8 +167,9 @@ Sprite rendering, camera follow and entity interpolation have all landed.
- [x] Bitmap font: `game/src/font.rs`, CP437 atlas (32×8 cells, codepoint = index),
proportional advance from measured ink bounds, luminance-keyed mask, `wrap`.
Ported from `wds`; the atlas is `assets/fonts/cga-8x8.png` (Oldschool PC Font
Pack CGA 8×8). See `notes/04-text_renderer.md`
Ported from `wds`. The atlas is `assets/fonts/micro-chat-8x9.png`, repacked by
`tools/mkfont.py` from VEXED's Micro Chat sheet (5 px font, 8 px line height).
See `notes/04-text_renderer.md`
- [x] UI primitives in `game/src/ui.rs`: `fill_rect`, `draw_rect`, `draw_hbar`
- [x] HUD in the 80 px strip right of the viewport (`Game::render_hud`): name, HP bar,
population, and a message log fed from the sim events (only fights involving the