Ran an observed 6-player game with persona AI players (one per
Lineage/Calling) via a Workflow (72 agents): avgFun 7.3/10, 6/6 would
replay, tight 84-82-75 finish. PLAYTEST.md captures the session +
designer's assessment.
Findings the Monte-Carlo bots structurally missed:
- the careful/safe line feels UNFAIR, not just weak (banker finished
last and resented it) — three human angles confirm the sim's
Cash-vs-Worthy substitution finding
- humans hit the no-Last-Stand feel-bad 6x where rational bots hit it 0x
- deep-collapses-first geometry confuses newcomers (component fix)
Fixes (re-validated, 1000 seeds): WorthyEnd strategy 46.7 -> 42.5%,
safe lines lifted, 6p margin to 9.5%.
- Desperate Strike: a no-Last-Stand Take salvages 1/3 unbanked loot
- Extraction bonus: +3 glory per crew retired alive
- RULEBOOK: "Maw eats NEXT" indicator as a component rule
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DEEPFALL: a tabletop game mashing up 9 loved games (SmashUp, Dragon
Rampage, Blood Rage, Catan, EverQuest, Daggerfall, Eye of the Beholder,
Quarriors, SmallWorld). Core fusion = SmallWorld decline + Blood Rage
glorious death -> three exits (Cash Out / Press On / Worthy End) under a
rising Maw that collapses a reikhelm dungeon floor-by-floor.
- deepfall-core: pure deterministic engine (vendored ChaCha8, 11 tests)
- deepfall-sim: balance-by-bot sweeps -> CSV/JSON
- analysis/analyze.py: stdlib ASCII heatmap (no deps)
- DESIGN.md (rules + post-critique revisions), FINDINGS.md (9-iteration
balance journey), README.md
- reikhelm-core/examples/sample_dungeon.rs: dumps a real generated board
Method: adversarial design critics -> build -> simulate -> tune. 9
iterations compressed combo spread 77.8 -> 32.5 pts (all 36 combos
viable). Fixed deep-content lockout (value rises with the Maw), the
multi-collapse feel-bad (1 collapse/round cap; feel-bad now 0.00/game),
and dead combos. Open finding: Cash-Out and Worthy-End are substitutes
for a glory-maximizing bot.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GPU A/B on the worst-blown frame (r9_N crypt): at strength 0.85 the
ControlNet forced the bright near-ceiling depth into a blown-white band
(27.7% of pixels >245); at 0.70 the blowout vanishes (0.0%) and the
ceiling renders as natural dark vaulted stone, with geometry still
honored. Verified a closed wall (r0_N threshold) stays solid at 0.70 —
no phantom doors return — so one global strength suffices. Matches the
documented Z-Image 0.6-0.7 sweet spot now that rev-3 maps are
full-contrast (high strength was only needed to force weak old maps).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First GPU pass on the rev-3 depth pipeline surfaced two issues; both fixed
and re-rendered clean:
1. Blown near-field highlights (regression from 018909b). Mapping the
nearest pixel to pure white (nearPlane=nearRaw) made the depth
ControlNet render overexposed near floors/ceilings at strength 0.85.
fpv.js: nearPlane=0 (anchor white at the camera; nearest real surface
≈gray 214, headroom intact) + minSpan 5→8. Re-bake confirms the blown
ceiling is gone while recesses still reach black and geometry holds.
2. Phantom doors on closed walls — a PROMPT problem, not the depth map
(present in old maps too). Opening NOUNS in the positive prompt summon
a passage onto solid stone: threshold's "gatehouse, portcullis,
entrance" painted a gate on a blank wall, and at cfg 1.0 the negative
can't cancel it. bake_atlas.py: THEME_BODY_CLOSED (full theme flavor,
zero opening nouns) for closed facings + opening-nouns negated on
closed facings only. r0_N (threshold) now renders clean ashlar wall.
("Bricked-up archway" backfires — "archway" alone re-summons the arch.)
Also: sweep_strength.py re-exec-under-venv guard (the venv python is a
symlink to the base interpreter, so the realpath check wrongly skipped
the hop and the montage died after every render); now env-sentinel
guarded. Findings in .dev/2026-06-15-diffusion-pipeline-reliability.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
--alt-work renders each test frame from a second depth dir alongside the
new full-range maps, so the GPU run proves the rev-3 normalization fix
(018909b) beats the washed-out rev-2 maps rather than just looking
better. Persisted the rev-2 maps under tools/out/compare/rev2_depths so
the A/B is reproducible. Doc updated with the one-shot command.
Workstation note: host 192.168.1.26 is up but ComfyUI (:8188) wasn't
running this iteration — needs a manual start before the sweep.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sweep_strength.py renders one open + one closed FPV frame across a
ControlNet strength matrix at fixed seed/prompt and montages them beside
the depth map — the GPU experiment to find the right strength now that
rev-3 depth maps carry a full-range signal (018909b). Findings/plan in
.dev/2026-06-15-diffusion-pipeline-reliability.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diagnosis: every baked FPV depth map used only the upper-mid grays
(typ. 160–214, 0/68 frames reaching true black, only 35/68 reaching
near-white). A fixed 0..maxView=12 scale meant the nearest floor (~1
cell) never hit white and a wall 3 cells ahead never went past mid-gray,
so a small room collapsed into a low-contrast band. A depth ControlNet
trained on full-range MiDaS/depth-anything maps gets almost no structural
signal from that — the root cause of "controlnet barely followed / hit
and miss" renders.
Fix: two-pass raycast. Pass 1 records each column's wall distance and the
frame's true near/far. Pass 2 maps depth through a per-frame window so
near surfaces read white and the deepest visible recess reads black every
frame. The far plane tracks the deepest real surface but is clamped to a
minSpan floor so a shallow dead-end nook is NOT stretched into a fake
tunnel — its faced wall stays an honest mid-gray slab (no black recess
for the model to paint a phantom door into). gamma default 2.0→1.5 since
normalization now owns the range. nearPlane/minSpan exposed as opts.
Verified offline (headless bake, seed 7, 68 frames): median dynamic range
193→255; frames reaching true-white near surfaces 35/68→68/68; worst-frame
range 54→106. Visual before/after confirms open frames now frame a black
passage and closed frames a clean mid-gray wall.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A new `world` generation domain in reikhelm-core, sibling to the dungeon
passes. Builds continuous fields (elevation, temperature, moisture, flow)
and classifies them into biomes — a general-purpose world generator any
game can consume, the foundation for the "generate a world for any game"
app idea.
Stages (each forks its own RNG sub-stream, like the dungeon pipeline):
- noise: own Perlin + fBm + domain warp (no `noise` crate, same reason
we own range/shuffle — version drift would change every seed)
- elevation: domain-warped fBm shaped by edge falloff + redistribution
- hydrology: ocean/lake flood, priority-flood depression fill, D8 flow
accumulation → dendritic rivers that always reach the sea
- climate: latitude temperature w/ altitude lapse; prevailing-wind
moisture sweep with orographic rain + emergent rain shadows
- biome: Whittaker classifier over temperature × moisture
Determinism: same (config, seed) → byte-identical World on every machine.
The whole generator is transcendental-free (only + - * / and comparisons),
so even the f32 fields reproduce exactly cross-platform (spec §7 ethos).
Plus `examples/world_png.rs`: a zero-dependency PNG exporter (hand-rolled
stored-DEFLATE zlib) with biome palette, ocean-depth shading, and hillshade
— a viewer for eyeballing output, kept out of the pure core.
24 new tests (determinism, rain-shadow, depression-filling, river density,
Whittaker corners); full suite 169 passing, clippy clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
All 208 frames of seeds 7/69/59, rendered with per-direction cameras
(directedVantage: gap-centered when open, close + off-axis when walled,
per-class wall seed) and dithered through the speckle-free rev-2 recipe
(sRGB-spaced LUT, gamut-clamped diffusion, --overshoot 6).
Walls no longer grow phantom doors; the passage you walk is the passage
you see; shadows are warm stone instead of green confetti.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Parley's review: dither full of green spots, baked rooms don't match the
nav graph (doors painted on closed walls, real openings off-center).
Both root-caused:
- pixelate.py: the nearest-color LUT was spaced in LINEAR RGB, cramming
the whole shadow range into ~4 cells — dark picks were effectively
arbitrary (green/teal confetti in warm near-blacks). LUT is now
sRGB-spaced, diffusion error is gamut-clamped (no more blue blobs at
torch highlights), and a new --overshoot penalty forbids choosing a
color more saturated than the source. Green-dominant dark pixels on
the test frame: 5.2% -> 0.02%, while palette usage went UP (107 -> 135
colors). Recipe rev 2: append --overshoot 6.
- fpv.js: new directedVantage(env, region, dir) — per-(room,facing)
camera instead of one room-wide vantage. Open ahead: stand in a cell
whose straight-ahead ray escapes through the actual gap (the passage
you walk is centered, 2-7 cells deep). Closed ahead: stand ~2 cells
from the wall, deliberately OFF the room's axis — a symmetric stage
begs the model to paint a centered focal door; an off-axis dead-end
corner doesn't. Walls also render under their own fixed seed and an
emphatic sealed-masonry prompt clause (cfg 1.0 negatives are inert).
Validated on seed 7 room 1: the closed-N phantom door is gone; the open-S
passage is dead-center. Full campaign re-bake follows as its own commit.
Also: rest-overlay no longer sticks without a keyup, in-combat drink
message, feathered sprite mask, no monster packs on floor 1.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pieces finally meet: procgen dungeons + the baked EoB atlas pipeline +
the Vigor combat engine become one game. Three fixed pre-baked floors
(seeds 7 → 69 → 59, 208 frames), monsters/loot/encounters rerolled per run
and composited over the empty scenes; the Ember Sovereign waits at the
bottom.
- game-wasm: run state machine in Rust (manifest nav graph as dungeon
truth, seeded spawning by theme/depth, embedded combat-core Encounter,
vigor/fatigue persistence between fights, rest/potions/relics/flee,
permadeath + victory). 8 native tests incl. a whole-run bot and a
ScriptedPlayer boss-winnability probe used for tuning.
- game-web: no-framework front-end — title/death/victory screens, baked
frames with screen-blend monster portraits, combat overlay (dual vigor
bars, cast telegraphs, cooldown sweeps, floaters), minimap with fog,
all SFX synthesized in WebAudio.
- balance: floor-scaled levels with a hero's edge over trash, no packs on
floor 1, boss tuned by sim sweep (~35%/55% win at skill 50/80).
- campaign atlases now versioned (tools/.gitignore exception); boss
portrait added to the Z-Image roster.
Verified end-to-end in-browser: an autopilot beat the full game through
the real UI (10 fights, 2 flees, Sovereign down), and died plenty before
that.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fights were ~3-5s; the user wanted 20-30s. Tuned the table (and added one
mechanic) so they land there, re-validated against the sim throughout.
- Engine: a `global_cooldown` (the genre swing timer, §10 "attack delay") — an
actor can't start a new action until it elapses, so no button-masher can
out-DPS the intended tempo. Config-driven (`global_cooldown` ticks; 0 = off).
Actor gains `next_action_at`; engine gates decisions on it.
- Controller: ScriptedPlayer now pressures with its heavy proactively when
healthy (not only on the exact overrun frame), so the sim measures what a real
player experiences instead of an unrealistically patient bound.
- Config rebalance: damage cut + flattened, fatigue/regen/recovery co-tuned, and
the kit made roughly **DPS-neutral** with auto-attack (each ability's cooldown
matched to auto's damage-per-second). Under the global cooldown that's the key
insight: abilities win through stagger leverage + timing, not raw throughput —
otherwise strong abilities trivialize the pace and flat ones aren't worth their
fill (the guardrail kept inverting until this landed). Auto-attacks (difficulty
0) also no longer fizzle.
- Front-end: cache-bust the config fetch so edits are always picked up; widened
the sim's archetype sweep to all six monsters.
Result (sim, skilled play ≈ real play): monster fights 16-38s (centered ~24s);
guardrail steep and green (even-con auto 0% → skill20 2% → skill50 12% →
skill80 44% → skill100 78%); all six monsters winnable. Verified live in-browser:
realistic play lands ~15-30s and a clean mid-fight reads perfectly on the dual bar.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
Build the full combat-system experiment from its spec, no slices deferred.
combat-core — pure, headless, deterministic engine (the single source of truth):
- One combined Vigor pool (HP+mana+stamina merged) with the two-axis
(fill, ceiling) cost model; offense spends survival.
- Stagger cascade (absorbed/dazed/unconscious/dead), capacity = current fill,
ceiling collapse via fatigue as the real loss condition; revive-on-recovery.
- Unified ability model (skills == spells) with the delivery+effects+potency+
targets cost composer and a full effect library (fill/ceiling damage, DoT/HoT,
regen-sabotage, fatigue-amp, mitigation buff/debuff, recovery).
- Ordered mitigation pipeline, config-driven con curve, competency/fizzle/resist,
loadout/memorization, active-defense windows.
- Symmetric actors; pluggable controllers (SwingOnCooldown, ScriptedPlayer{skill},
HoldAndPunish). Fixed-tick loop with the canonical within-tick resolution order;
decisions are simultaneous within a tick so mirror matches are fair.
- Determinism is load-bearing: vendored order-independent RNG fork (+ integer
chance_bp so no f64 touches the hot path) and integer fixed-point magnitudes
with banker's rounding. 48 tests incl. bit-reproducible event-log integration.
combat-sim — batch harness: loads the config "table", runs con-tier x skill and
archetype sweeps (tens of thousands of fights), exports per-fight CSV, an
aggregated summary, and one fight's full event log.
analysis — pandas/matplotlib layer: difficulty curve, duration tent, anti-turtle
guardrail, stagger frequency, and one fight's fill/ceiling time series.
The sim did its job: the first default numbers produced a one-tick cliff and 82%
mutual-KO draws and surfaced the spec's deepest risk live (a poke skill strictly
worse than free auto-attack, so auto-only out-won the full kit). Tuning the table
moved it to the intended shape — duration tent peaking ~22s at even con, a
monotone skill->win-rate gradient (auto ~3% -> skill100 44% at even con), and a
green anti-turtle guardrail. That sim->measure->tune loop is the deliverable.
Own Cargo workspace, fully decoupled from the root reikhelm workspace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New sandbox experiment: a deterministic, fully-parameterized real-time
combat engine (EQ/Daggerfall lineage) built on a single combined Vigor pool
(health+endurance+mana) with ceiling/fatigue attrition, capacity-as-fill
stagger cascade, symmetric Actors + pluggable controllers, one composable
Ability model (skills==spells), and classless three-layer emergent identity.
Sim-first: headless deterministic engine + batch sweep harness + CSV/JSON
export for data-driven balancing. Rust engine (combat-core/combat-sim) +
Python analysis layer, in its own decoupled combat/ workspace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
reikhelm is now framed as an open-ended sandbox: each game-system experiment
lives in its own top-level folder, loosely coupled, glue code as needed. README
documents the convention and maps the current contents (dungeon procgen / web
playground + explorer / AI-render pixel-art pipeline).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Render actual generated dungeons through the AI pipeline — both top-down and
first-person (Eye-of-the-Beholder style) — instead of synthetic test depth.
All renderer-side: derived from the envelope's tiles+regions+theme, the core
stores none of it.
- depth.js: top-down height-field depth exporter (walls raised, pools recessed,
pillars as bumps, subtle per-theme relief), calibrated to the proven room_depth
levels so one tall room can't crush every floor dark.
- fpv.js: first-person depth via a Wolfenstein-style grid raycaster (16:9),
reports straight-ahead distance for opening detection.
- explore.js: room->room nav graph derived from REAL tile openings (scan
boundary gaps, bin by cardinal, flood the corridor to the destination room) —
nav + open share one source of truth with the rendered passages.
- bake_atlas.py: bakes per-room x4-facing pixel-art frames; per-theme + per-facing
(wall vs passage) prompts, fixed diffusion seed for cross-frame style coherence,
per-run unique prefixes so re-bakes don't silently skip.
- explore.html + explore-viewer.js: WASD first-person dungeon explorer
(room-to-room movement, turning, minimap), integer-pixel fullscreen.
- serve.py: stdlib dev server — static web root + /out tree + POST /save, no-store.
- main.js/render.js/style.css: export hooks, the depth button, distanceToWall export.
- tools/README.md: Stage 0/1/2/3 docs; .dev/2026-06-01-fpv-prompts.md: prompt
research (cfg-1 negatives are inert; trigger words summon hands; empty-ruin
reframe; fixed seed = consistency).
Proven end-to-end on seed 7 (17 rooms). Outputs organized under git-ignored
tools/out/. Control strength: 0.80-0.85 top-down, 0.85 first-person.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds RegionTheme + RoomThemer: a pure classifier (no tile changes) that
labels each room (terrain-driven Forge/Cistern/Hall, special Throne/
Threshold, weighted Crypt/Den/Library/Vault/Stone). Renderer tints themed
rooms; EntityPlacer biases contents by theme. Entrance/exit now chosen
RNG-free from geometry so themer & placer agree.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The roadmap capstone: the dungeon is now populated.
- New entity layer: src/entity.rs (Entity { kind, at }, EntityKind {Entrance,
Exit, Treasure, Monster}); Map gains an `entities: Vec<Entity>` overlay field
(serde round-tripped). Entities aren't terrain, so no new Tile and the frozen
viz is untouched.
- EntityPlacer/EntityConfig: places one Entrance (random room), one Exit (the
room farthest from it — a traversal goal), per-room Treasure (treasure_chance)
and Monsters (monster_chance, 1..=max, never in the entrance room). All on
plain Floor only, never two per cell, fully deterministic.
- Handoff via the Blackboard (the designed side channel for non-tile/region/edge
data) under entity::BLACKBOARD_KEY, harvested by Pipeline into Map.entities —
so GenContext's 25 literals stay untouched.
- Renderer draws iconic markers on the final stage: green beacon (entrance),
cyan portal (exit), gold diamond (treasure), crimson eyed-blob (monster), each
with a soft glow. New entities toggle + treasure/monster sliders + readout.
Core: 135 tests green (6 new: one entrance/one exit on distinct floor, entrance
room monster-free, determinism, empty-map, recipe populated-check). clippy
clean. Pipeline is now 9 passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Eighth pass (after RoomCarver, before MstConnect): re-sculpts some rooms into
organic caves.
- CaveShaper/CaveConfig (cave_chance, min_room, fill, steps): fills the room
rect with noise, runs the classic 4-5 cellular automaton `steps` times, keeps
the LARGEST 4-connected floor component, and re-carves the room to that blob
(cells + bounds updated; the rest of the footprint reverts to Wall). Too-small
results leave the room clean. Caves stay Room regions — their organic outline
reads as a cavern, so the renderer needs no change.
- CorridorCarver now anchors to the room cell NEAREST bounds.center() instead of
the center point itself. Output-preserving for convex/centered shapes (the
center cell is already floor), but robust for irregular cave blobs whose AABB
center may fall in rock — so a cavernized room is always reachable.
- DungeonConfig gains `caves`; recipe inserts CaveShaper after RoomCarver.
Core: 129 tests green (4 new: cave is connected floor within room, small/zero
skip, determinism); connectivity holds with caves in the default recipe. clippy
clean. Pipeline is now 8 passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seventh pass (before pillars): floods an organic blob of Water or Lava into
some larger rooms via randomized BFS growth.
- New Tile::Water / Tile::Lava (impassable hazards). Exhaustive matches updated
(ascii '~'/'!', frozen viz colors, wasm codes 4/5).
- PoolDecorator/PoolConfig (water_chance, lava_chance, min_room): blob is
interior-only (>= 2 from edge, never the center), and a connectivity guard
verifies the room's remaining floor stays 4-connected with the center intact
before committing — so a pool never orphans part of a room.
- DungeonConfig gains `pools`; recipe inserts PoolDecorator after DoorPlacer.
- Renderer: water as cool reflective pools; lava as molten rock that ALSO
throws warm light onto nearby floor (BFS light field, wall-blocked) — lava
chambers visibly glow. New water/lava sliders.
Core: 125 tests green (4 new: interior placement, floor stays connected,
zero/small-room skip, determinism); connectivity holds with pools in the
default recipe. clippy clean (core + viz).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per feedback ("not every room needs pillars"): default PillarConfig drops to
room_chance 0.30 / min_room 7 (was 0.55/7). A typical dungeon now has a couple
of distinctive pillared halls rather than pillars in most rooms — measured ~14
of 24 default seeds carry any pillars at all, usually just one room's worth.
The pillars slider still goes to 1.0 for full colonnades.
Also expose pillarTiles in the web state() hook (iteration/measurement aid).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A finishing decorator that scatters free-standing pillar columns into larger
rooms on a spaced interior grid. Sixth pass in the dungeon recipe.
- New Tile::Pillar (impassable like Wall, drawn distinctly). Exhaustive matches
updated: ascii ('o'), frozen macroquad viz (still compiles), wasm code 3.
- PillarPlacer/PillarConfig (room_chance, min_room, spacing): places isolated
single-cell pillars only on interior room floor (>= 2 from the edge, never the
center), on a grid with spacing >= 2 — so the floor stays 4-connected by
construction and a room is never orphaned. Respects non-rect room shapes
(pillars land only on actual carved floor).
- DungeonConfig gains `pillars`; recipe appends PillarPlacer after DoorPlacer.
- Renderer draws pillars as lit stone columns with a contact shadow; new
"pillars" density slider.
Core: 121 tests green (5 new: interior-only placement, floor stays connected,
zero-chance/small-room skip, determinism). clippy clean (core + viz).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Renderer-only: low-frequency stone mottling (per ~4x4 block) with faint grain
instead of high-frequency per-cell noise; room glow now warms toward amber so
lit chambers read as torch-lit while corridors fall to shadow. Stronger
room/corridor light contrast.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RoomCarver now rolls a per-room shape within its chosen rectangle, weighted by
a new RoomConfig.shapes (ShapeWeights). The rect is still picked first and
unchanged, so room centers — and the corridors wired between them — are
identical to before; only the carved interior differs.
- Shapes built from per-row contiguous spans → guaranteed 4-connected and
convex, so flood-fill never strands a cell.
- Hard invariant: every shape contains rect.center() (the corridor target),
with a fallback to a full rect for tiny rooms or any non-covering shape —
keeps MstConnect/CorridorCarver correct.
- ShapeWeights::default() is rect-only (preserves old behavior + existing
tests); the dungeon recipe opts into ShapeWeights::varied().
- Configs lose Eq (now carry f64 weights); serde unaffected.
Core: 116 tests green (new forced-shape invariants test: in-bounds, center
carved, non-rectangular, 4-connected); connectivity + determinism + door tests
all pass with varied shapes active. Surfaced as 4 shape-weight sliders in the
web playground.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 0+1 of the browser viz effort:
- core: drop unused `rand` dep (removes getrandom/libc → clean wasm32 build);
derive serde on DungeonConfig + 5 sub-configs so the bridge can (de)serialize
- reikhelm-wasm: thin wasm-bindgen cdylib exposing generate(seed, config_json)
-> JSON envelope (tiles as int codes, regions, edges, per-pass snapshots) and
default_config_json(); holds no generation logic
- workspace: add reikhelm-wasm member; default-members keeps host cargo
test/clippy on core+viz only
- reikhelm-web: vanilla-JS + Canvas 2D renderer running the real core live in
the browser. Atmospheric look — lit stone floor, raised stone walls with
rim-lit carved edges + top bevel, room light-pooling, amber door thresholds,
vignette. Controls: seed/reroll, 9 config sliders, stage scrubber, semantic
overlays (region outlines / graph / grid). window.reikhelm hooks for
Playwright-driven iteration.
Core stays 115 tests green. Driven + screenshotted via Playwright MCP.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the design for a live browser-based dungeon generator: reikhelm-core
compiled to WASM (after dropping the unused rand dep), a thin reikhelm-wasm
bridge, and a vanilla-JS/Canvas atmospheric renderer driven + screenshotted
via Playwright. Plus C2: room shape variety (rect/octagon/ellipse/plus) to
escape rectangular rooms. Aesthetic target: atmospheric + polygonal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Press S to begin seed entry, type digits (HUD shows the buffer),
Enter applies and regenerates, Esc cancels, Backspace edits. Reroll
still increments. Digit-only input; buffer capped under u64's range.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Default was a pure MST (extra_edge_ratio 0.0), which reads as a linear
chain of rooms. Retune DungeonConfig::default to min_leaf 8 / max_depth 5,
rooms 5..=11, and extra_edge_ratio 0.30 — ~17 interconnected rooms with
loops. Validation inequality still holds (8 - 2 >= 5); boundary test now
uses an explicit edge-case config since the default no longer sits on it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Corridors carve center-to-center and pierce room walls, so the old
wall-threshold rule placed almost no doors. Detect the pierced-wall
threshold (corridor floor outside a room, room on one side, corridor on
the opposite) and mark it Door with probability door_chance (default
0.5), else leave it an open archway. Connectivity is via corridor floor,
independent of doors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lets downstream determinism tests compare maps with `assert_eq!` instead
of a serde-string workaround. Auto-gated on T (Grid<f32> gets only
PartialEq); Map has no float fields so Eq is sound.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>