reikhelm/reikhelm-web
Parley Hatch a1d2a63937 feat(core): polygonal room shapes (rect/octagon/ellipse/plus)
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>
2026-05-31 00:16:45 -06:00
..
index.html feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
main.js feat(core): polygonal room shapes (rect/octagon/ellipse/plus) 2026-05-31 00:16:45 -06:00
render.js feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00
style.css feat(wasm+web): live browser dungeon playground (WASM core + atmospheric renderer) 2026-05-31 00:07:24 -06:00