Commit Graph

9 Commits

Author SHA1 Message Date
randrews 1351055d27 ui crate, editor 2026-06-18 11:40:06 -05:00
randrews fb8f6df501 editor ui 2026-06-17 18:25:09 -05:00
randrews de1870432f Add kiln-tui: a terminal player for kiln boards
New `kiln-tui` crate (ratatui 0.30 / crossterm) that plays a board from a
.toml map named on the command line, letting the player walk around with the
arrow keys or hjkl. It depends only on kiln-core — the engine needed zero
changes, confirming it is genuinely UI-agnostic.

- Text rendering: each Glyph.tile index is reinterpreted as a character via a
  CP437->Unicode table (cp437.rs); fg/bg map to ratatui Color::Rgb truecolor.
- render.rs BoardWidget: per-axis viewport that centers a small board and
  scrolls a large one to keep the player visible.
- term.rs TerminalCaps: detects truecolor and Kitty keyboard-protocol support,
  enabling the protocol when present (held-key repeat, modifier-only keys);
  shows a rainbow "truecolor" badge in the bottom border.
- Input loop acts on Press and Repeat (continuous held-key movement) and
  ignores Release.

Workspace: removed kiln-egui from members (files left untouched). Updated
CLAUDE.md and ARCHITECTURE.md to document the workspace split and kiln-tui.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:10:02 -05:00
randrews a0d21bde20 workspaceify 2026-05-30 20:20:09 -05:00
randrews 96ec8e8e92 object scripting wip 2026-05-30 18:48:41 -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 86bcf84175 Rename project from viberogue to Kiln
Updates Cargo.toml package name, window title, and all references in
ARCHITECTURE.md and CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 19:40:03 -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
randrews f3e5dece7f Initial project scaffold
Sets up eframe/egui app with basic menu bar and placeholder viewport. Adds Rhai scripting dependency for future game object scripting system.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 23:42:14 -05:00