Ports the CP437 font renderer from wds to the framebuffer: proportional
advance from measured ink bounds, luminance-keyed mask, word wrap. The
right 80 px strip becomes a HUD with name, HP bar, population and a log
fed from sim events; Attacked/Died now carry the type ids the log needs,
since the victim is gone from the world by the time events are read.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
NPC strategy is now a Brain field on the entity (Idle, Wander, Hunt(Prey))
that Sim::think matches on, so behavior is data independent of species.
Hunt follows the first step of an A* route to the nearest prey in sight,
replanned every window; the pathfinder moves from game/ to sim/ for that.
A greedy step-toward-target was tried first and oscillated at walls. Bumps
between the same species no longer fight, and six foxes join the hens.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Occupied tiles now block movement through World::blocked, the one predicate
the sim and the pathfinder share. Entities carry an EntityKind so the sim
knows which ones to think for; Sim::think gives each NPC a random king move
one window in four. Intents execute in id order so contested tiles resolve
deterministically.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>
pbio moves to git.bnd.wtf/irrlicht/pbio.git branch truecolor16: the
framebuffer is now RGB565 u16, no palette. Assets are loaded from PNG via
the png crate and quantized to RGB565 on load; transparency comes from the
alpha channel as a per-tile opacity mask, so any color (black included) can
be opaque. The TGA loader and the palette-order fragility are gone.
overworld.png is the unmodified Mini-Medieval Overworld sheet (same 24-column
layout as the old TGA, so map tile ids are unchanged); entities.png holds the
player sprite extracted from the old entities.tga.
Adds an ignored snapshot test that renders the first frame headlessly to a
PNG for eyeballing the renderer without a window.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>