tune(core): make pillars an occasional special-room feature

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>
This commit is contained in:
Parley Hatch 2026-05-31 00:29:14 -06:00
parent b1449248f8
commit 128dce6310
2 changed files with 6 additions and 3 deletions

View file

@ -44,11 +44,13 @@ pub struct PillarConfig {
}
impl Default for PillarConfig {
/// A sensible default: a little over half of large rooms (min extent >= 7)
/// get a grid of pillars spaced 3 cells apart.
/// A sensible default: pillars are an *occasional* feature, not the norm —
/// only larger rooms (min extent >= 7) qualify, and only about a third of
/// those get a grid of pillars spaced 3 cells apart. So a typical dungeon has
/// a couple of distinctive pillared halls — never every chamber.
fn default() -> Self {
PillarConfig {
room_chance: 0.55,
room_chance: 0.30,
min_room: 7,
spacing: 3,
}

View file

@ -190,6 +190,7 @@ window.reikhelm = {
setConfig(path, v) { setPath(state.config, path, v); regenerate(); },
state: () => ({ seed: state.seed, stage: state.stage, genMs: state.genMs, config: state.config,
rooms: state.env?.regions.filter((r) => r.kind === 'Room' && r.cells.length > 0).length,
pillarTiles: state.env ? countTiles(state.env, 3) : 0,
ok: !!state.env }),
};