summaryrefslogtreecommitdiff
path: root/1mb
Commit message (Collapse)AuthorAgeFilesLines
* Phase 0–1: verification guardrails and engine enablers for the 1MB ↵Christian Cleberg2026-07-132-62/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expansion (#2) * Add byte-budget gate, headless solver harness, and size ledger Phase 0 guardrails for the 1MB roguelike; no changes under 1mb/. - tools/check-size.sh: per-file byte ledger for 1mb/, fails past 1 MiB, warns loudly past 95% - tools/validate.js: evaluates the unmodified game in a stubbed vm environment and sweeps seeds x floors 2-6 through the real escapeSolve, failing on any unwinnable escape room - tools/check.sh: single entry point running both gates - tools/pre-commit: optional installable hook running check.sh - README: Budget & verification section; docs/SIZES.md: ledger seeded at 82,240 B (7.8% of budget) * Task 1.1: data-driven floor graph Move room topology out of build() into a GRAPH table in data.js: each floor declares its room set and exit wiring (TOPO shared by floors 1-7), and build() consumes it generically. BASES flatten to raw map arrays since their exit wiring now lives in GRAPH. Two new graph capabilities, exercised by a hidden floor-9 proving ground (debug key T): extra room instances beyond the nine fixed codes (h2, inheriting family behavior from its first letter — spawn, darkness, room text, path counters) and one-way exits ("!dest" seals after one crossing). Guard cover()/the debug solve line for floors with no e room. Behavior-neutral: fixed-seed summary() and variantSummary() identical across floors 1-7 before/after; save format unchanged (v:1 round-trips). * Task 1.2: procedural room generator Add genRoom(rand, spec) to the engine: builds a 12x12 map from a spec (required exit letters, pit-room O ring, wall-cluster and pit-vein tile budgets, trap/item sprinkles, a stamp pattern for the idol ring) with perimeter walls and a flood-fill guarantee that every walkable tile and exit stays mutually reachable — block-overlay spots count as solid, and overlay spot coords plus spawns are forced open so hazards never bury a door. Bounded retries end in a sparse layout, then an authored fallback. Floors 2+ draw each variant pick from the authored arrays plus PROC_SLOTS=2 generated slots per room type (PROC_SPECS in data.js); escapes stay authored from floor 6 up and BASES rooms are never generated. Procedural escape rooms are gated by escapeSolve at build time with regeneration on failure. Fully deterministic per seed. Generator weighs 3,268 bytes. validate.js 500: 2500/2500 solvable. * Task 1.3: full-floor solver Add floorSolve(seed, level) to the engine: proves a floor completable end to end — gate to bones for the torch, hall to idol for the bow, hall to vault via pit or crack, crown and key pickups, then the escape room via the existing beast simulation, back to the gate. Room legs are BFS path costs over the built maps with block overlays solid and pits never crossed; exits and item tiles are located dynamically from the GRAPH-built rooms, so future topologies validate without changes. Floor 1 crosses the escape room at torch 8 (fresh-run fuel plus an allowed brazier refuel; 6 was falsely failing a third of floor-1 seeds that play fine). validateSeeds (V key) and tools/validate.js now sweep floors 1-7 with full-floor checks: 200 seeds x 7 floors in ~6.5s, 500 in ~15s. The debug panel gains a "floor : ok:<cost>" line (n/a on graphs without idol/vault/escape rooms). A scratch copy with the vault crown walled off fails 250/350 checks with per-floor variant detail.
* Add 1MB roguelike, player README, and 1KB polish (#1)Christian Cleberg2026-07-122-0/+2212
* commit WIP 1mb version * Fix beast-collision exploit and shadow-twist torch bug; add balance constants and mobile D-pad - Exit tiles no longer bypass the beast-adjacency death check - Shadow-twist turns now consume torch fuel like a normal wait - Extract torch/beast/relic magic numbers into named constants - Fix floor 2 beast enrage threshold (operator precedence bug) - Add viewport meta tag and on-screen D-pad for mobile play * Split game data into data.js for mod support * Add poisoned effigy hazard: decoy relics that kill on touch * Add minimalist Web Audio sound effects driven by existing fx events * Add camp-checkpoint save/continue via localStorage * Add optional floor 7 postgame descent, unlocked after winning * Add three character-class starting kits (heavy torch, swift, warded) * Check off completed roadmap items in BLUEPRINT.md * Fix relic spots colliding with higher-priority tiles across all floors RELIC_SPOTS coordinates on every floor overlapped exactly with BLOCK_SPOTS, SHRINE_SPOTS, or BRAZIER_SPOTS entries, and tile() resolves those categories before relics, so the relic silently became unreachable whenever the colliding spot was chosen. Floor 6 was the worst case: its relic and brazier candidate lists were identical, masking every relic every run. Moved each affected relic to a free, verified-floor coordinate in the same room instead. * Add player-facing README, drop dev blueprint, bump 1KB font size Replace 1mb/BLUEPRINT.md (a dev-oriented architecture doc) with a top-level README aimed at players, covering both games' controls and goals with links to the hosted versions. Also increase the 1KB version's font size for readability, trimming the now-redundant favicon-suppression tag to stay within the strict 1,024-byte budget.