Commit Graph

16 Commits

Author SHA1 Message Date
randrews a1cce10432 scrolls 2026-06-11 18:53:52 -05:00
randrews f73c02437d Added scroll() 2026-06-10 01:42:33 -05:00
randrews c2168b992d better scripting api 2026-06-09 22:38:17 -05:00
randrews e5c406e42d speech bubbles and delays 2026-06-08 22:15:44 -05:00
randrews ea18fe8fc2 Real object ids, fixed warping bug 2026-06-06 20:01:07 -05:00
randrews 374a69f0ca Floor layer 2026-06-06 18:49:45 -05:00
randrews a5f60e22e1 more scripting, objects moving 2026-06-06 17:36:00 -05:00
randrews 8ac6da184c crates, player coords, arch.md gone 2026-06-06 14:11:20 -05:00
randrews 05c9fdbde9 Solidity 2026-06-06 01:37:19 -05:00
randrews 8f2cca2907 more refactor 2026-06-05 01:09:50 -05:00
randrews 4f21f7fa8a more scripting 2026-06-04 23:52:33 -05:00
randrews e0477a12b8 basic scripting 2026-06-04 20:11:55 -05:00
randrews 0241cd2a8d Move passable and opaque into objectdef 2026-05-30 21:22:36 -05:00
randrews 212297ecf9 Add bitmap font rendering via PNG tilesheet
Replace egui text rendering with a BitmapFont system:
- Glyph.tile: u32 replaces ch: char; top-left pixel of PNG is background sentinel
- BitmapFont loads/preprocesses PNG to opaque-white + transparent, tinted at render time
- Default font: assets/vga-font-8x16.png (CP437, 8×16 tiles); placeholder generated if missing
- Boards can specify a per-board font via [font] in their .toml file
- Editor Board tab: "Font…" button opens font dialog (rfd file picker, tile dims, tilesheet preview)
- Glyph picker: tile grid from active font replaces hardcoded ASCII char grid
- map_file: TileIndex untagged enum accepts char or integer in palette entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 00:07:04 -05:00
randrews ac6a8dec57 Replace Element with Behavior + Archetype; update map format
Element is replaced by two types: Behavior (a plain struct of runtime
properties: passable, opaque) and Archetype (an enum of named presets:
Empty, Wall, Object, ErrorBlock). Board.cells changes from Vec<(Glyph,
usize)> to Vec<(Glyph, Archetype)>, eliminating the per-board element
palette. Map files now reference archetypes by name (archetype = "wall")
instead of property bags (passable = false), so the archetype list can
be reordered without breaking saved games. Unknown archetype names
produce an ErrorBlock cell (yellow ? on red) so malformed maps are
immediately visible in-game.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 15:20:46 -05:00
randrews 2dc749e037 Load maps from TOML files with XPM-style palette
Introduces a map file format: TOML with a [palette] mapping characters
to (Glyph, Element) definitions and a [grid] multi-line string. Board
now owns the player position, objects, and portals. map_file::load()
deserializes a file and converts it to a Board via From<MapFile>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 01:50:05 -05:00