No description
Find a file
Parley Hatch 902a233229 feat(combat): playable browser front-end + AI monster portraits
A real-time consumer of combat-core (the front-end the spec designs for, §14):
pick a foe, manage your single Vigor pool, try not to spend your survival.

- combat-core: a HumanController (input-driven, spec §5) behind a shared intent
  cell, plus Encounter::tick_once / drain_events so a wall-clock front-end can
  drive the engine a tick at a time (§10). Trivial abilities (difficulty 0, e.g.
  auto-attack) no longer fizzle. Engine unchanged otherwise; 48 tests still green.
- combat-wasm: a wasm-bindgen Game bridge — tick-stepping, JSON world state, the
  player's ability list, and a flavorful MonsterAI that uses each monster's
  signature kit (the wraith curses your ceiling) on a coin-flip so big hits space
  into a readable duel. Own workspace member, kept out of the default host build.
- combat-web: an atmospheric battler. The signature dual Vigor bar shows fill,
  the regen-headroom ceiling, the ceiling marker, and the dark cracked fatigue
  zone in one bar — the squeeze made legible. Floating damage, cast telegraphs,
  combat log, result overlay. Verified end-to-end in a real browser.
- tools/portraits.py: stdlib text-to-image client reusing the proven LAN Z-Image
  stack (minus the depth ControlNet) to render the bestiary. 7 portraits committed.
- Added skeleton / troll / wraith monster stat blocks; bumped the duelist's
  durability so fights are readable (even-con ~30s) and active play beats every
  monster while passive auto-attacking loses the hard ones. Re-validated the sim:
  the skill gradient and anti-turtle guardrail still hold (auto ~1% → skill100 34%
  at even con). README findings updated to match.

Verified live: roster screen, win/lose, the dual bars, telegraphed casts, and a
3s active-play victory over the Skeleton Knight.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 12:46:47 -06:00
.dev docs(combat): harden spec after two critic passes 2026-06-02 23:51:12 -06:00
combat feat(combat): playable browser front-end + AI monster portraits 2026-06-03 12:46:47 -06:00
reikhelm-core feat(core): room theming — RoomThemer classifier + themed renderer (10th pass) 2026-05-31 17:03:53 -06:00
reikhelm-viz feat(core): water & lava pools (PoolDecorator) + lava lighting 2026-05-31 00:41:48 -06:00
reikhelm-wasm feat(core): room theming — RoomThemer classifier + themed renderer (10th pass) 2026-05-31 17:03:53 -06:00
reikhelm-web feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
tools feat(render): real-geometry depth export + first-person explorable atlas 2026-06-02 00:02:14 -06:00
.gitignore feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
Cargo.lock feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
Cargo.toml feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
README.md feat(combat): deterministic combined-pool combat engine + sim + analysis 2026-06-03 12:13:04 -06:00

reikhelm

A sandbox for game-system experiments. No single end goal — each idea is its own self-contained system, built to learn and to see something cool run. The best ones might get blended into an actual game someday; until then it's just shipping for fun.

How this repo works

  • One experiment per top-level folder. Each is meant to stand on its own.
  • Mix and match freely. When two systems are worth mashing up, write glue code between them. It doesn't have to be pretty.
  • Rust or Python, whatever fits the idea. Rust experiments can be standalone Cargo projects or join the workspace below for easy path-dependency glue.

What's here so far

Procedural dungeon generator (Rust)

A deterministic 2D map generator built from small composable passes over a shared context (BSP → rooms → caves → connect → corridors → doors → pools → pillars → entities). Towns/dungeons are different recipes drawn from one primitive vocabulary (Partitioner / Shaper / Connector / Placer / Decorator).

  • reikhelm-core/ — pure generation library, no rendering deps (the Map struct is the contract; renderers own all art).
  • reikhelm-wasm/wasm-bindgen bridge that compiles core to wasm32.
  • reikhelm-viz/ — original macroquad renderer (frozen — kept, not maintained).

Browser playground & first-person explorer (JS + Canvas)

  • reikhelm-web/ — live procgen playground (reroll / seed / config sliders / per-pass scrubber) in an atmospheric torch-lit style, plus a top-down and a first-person (Eye-of-the-Beholder style) renderer and a walkable explorer.

AI-render → pixel-art pipeline (Python)

  • tools/ — depth map → local diffusion render (Z-Image on the LAN workstation) → FloydSteinberg dither through a 256-color palette → signature pixel art. See tools/README.md.

Combined-pool combat system (Rust + Python)

  • combat/ — a deterministic, headless combat engine built on one combined Vigor pool (HP + mana + stamina merged), so offense literally spends your survival. Sim-first: a pure Rust core (combat-core) + a batch sweep harness (combat-sim) that runs tens of thousands of fights and exports metrics, plus a Python analysis layer that measures "feel" (difficulty curve, fight duration) instead of eyeballing it. Its own Cargo workspace. See combat/README.md.

Building

# Rust workspace (host-native crates)
cargo build            # builds reikhelm-core + reikhelm-viz
cargo test

# Browser playground (wasm)
wasm-pack build reikhelm-wasm --dev --target web \
  --out-dir ../reikhelm-web/pkg --out-name reikhelm_wasm
python3 -m http.server 8011 --directory reikhelm-web

~/.cargo/bin may not be on the non-interactive shell PATH — prepend export PATH="$HOME/.cargo/bin:$PATH" to cargo commands if they're not found.