# Tilt & Ruin — Shared Game Brief (3-Way Frontier Model Bake-Off #2)

> **Sealed Buildoff Rule `[locked]`:** Three frontier models at XHigh effort are building this game independently and strictly blind from the exact same brief and `browser-game-craft` skill:
> - **Gemini 4 Neon XHigh (`agy-sam`)** → `/Users/austin/dev/tilt-and-ruin/neon/`
> - **Claude Opus 5.5 XHigh (`cc-canary`)** → `/Users/austin/dev/tilt-and-ruin/opus/`
> - **GPT-6.2 Astra XHigh (`codex exec`)** → `/Users/austin/dev/tilt-and-ruin/astra/`
>
> **Do NOT read, list, grep, or inspect any other contestant's folder** until all three builds are complete and Austin has compared them. Each contestant chooses its own physics stack, 3D cabinet & lighting craft, table layout, relic catalog, audio design, and game feel freely.

---

## 1. Routing (`skills/browser-game-craft/`)

- **Track:** Full Track (`realtime-3d`)
- **3C Profile:** `realtime-3d` (read `~/dev/feral-tool-heuristics/skills/browser-game-craft/SKILL.md`, `references/3c-and-feel.md`, and `references/gates-and-rubric.md`)
- **Core Loop:** `skill-flow` arcade pinball + `roguelike` table-mutating relic draft escalation
- **Verification:** `window.__game.runSelfTests()` + Playwright headless playtest + multi-state contact sheet + `390×844` portrait peak-HUD screenshot + **1 focused 5-pillar visual polish pass**

---

## 2. Genre Authenticity

- **First-glance identity:** A gleaming, tactile Three.js **3D roguelike pinball cabinet** set in a moody midnight-brass arcade/occult parlor — slanted walnut-and-obsidian cabinet rails, chrome plunger lane, illuminated playfield lamp inserts beneath subtle smoked glass reflection, reactive pop bumpers, triangular slingshots, drop-target bank, upper orbit/ramp lane, and an imposing **3D Ruin Idol / Boss Core** perched at the upper playfield.
- **Native core fun:** Snappy, rock-solid **zero-tunneling pinball physics** (crisp flippers, spring-loaded skill-shot plunger, juicy pop-bumper chains, slingshot kickbacks, physical cabinet Nudge with real TILT risk) fused with a **roguelike relic/table-mutation run**:
  - Each run progresses through escalating **Stages** (at least 3 stages culminating in a **Boss Ruin** clear → `WIN`, with optional endless continue; losing all balls → `GAME OVER`, instant 1-tap Replay).
  - Hitting bumpers, drop targets, orbit lanes, and the Boss Core builds **Score / Ruin Damage** and rising **Combo Multipliers** to crack the current Stage Quota / Boss HP.
  - Clearing a stage opens a **3-Card Relic / Table Mutation Draft** — picking a relic **visibly and mechanically mutates the live 3D playfield** (e.g., spawns Multiball, raises an illuminated brass Center Save-Post, electrifies pop bumpers with Tesla arcs, turns the ball molten/heavy with splash damage, adds combo multipliers or magnetic drain saves, etc. — build at least 6 distinct relics with real gameplay + visual effects!).
- **Native outcome model:** Shatter the final Stage / Ruin Boss (`WIN`) with final score, peak combo, stage cleared, active relic loadout, and run grade — or drain your last ball (`GAME OVER`) with instant Replay and zero leftover state.

---

## 3. Divergence & Hooks

- **Cliché explicitly rejected `[target]`:** No sluggish, floaty ball physics that tunnels through thin flippers on hard hits, no flat neon-wireframe void with zero 3D cabinet mass, and no fake "+10% invisible stat" roguelike cards. Lean into **sub-stepped continuous collision** (ball NEVER escapes walls or passes through swinging flippers), **rich dark-mahogany / brushed-brass / glowing-insert-lamp lighting**, **table mutations you immediately SEE on the 3D playfield**, and **visceral pinball juice** (bumper shockwave rings, flipper solenoid kick, rising harmonic chime scales, micro hit-stop on Boss/drop-target crits, sparks, and ball motion trails).
- **Signature Twist `[locked]` — Physical Nudge + TILT Pendulum & Live 3D Table Mutations:**
  - **Nudge & TILT:** Players can physically jolt the table mid-flight to save a center drain or kick a ball into an orbit ramp — imparting real velocity impulse + cabinet/camera jolt, while pushing a visible **TILT warning meter** (`WARN` → `DANGER` → **`TILT!`** which kills flipper power and dims table lamps until that ball drains, then resets cleanly for the next ball).
  - **Live 3D Table Mutations:** Every drafted relic changes the physical/visual table (retractable center post, electrified bumper coils, multiball cannon/lock, molten trail & shockwave, bumper multiplier rings, magnetic outlane kickback, etc.).
- **Peak Moment `[locked]`:** **Multiball mayhem** — 2–3 gleaming balls bouncing simultaneously off upgraded electrified pop bumpers and slamming into the cracking 3D Ruin Core as combo chimes climb (`×4`, `×6`, `×8`) and table inserts flash in sequence, capped by a clutch Nudge save right above the drain that sends the winning shot straight into the Boss!

---

## 4. Platform, Audio & Packaging `[locked]`

- **Desktop + iPhone (`390×844` portrait):**
  - Full-viewport `100dvh` canvas, safe-area aware HUD, **zero horizontal overflow at `390×844` under peak HUD density** (score, stage/boss progress bar, balls left, combo pill, tilt indicator, active relic icons, and touch controls all clean and readable).
  - **Desktop controls:** `A` / `ArrowLeft` / `Z` = Left Flipper, `D` / `ArrowRight` / `/` = Right Flipper, `S` / `ArrowDown` / `Enter` (hold & release) = Plunger launch, `Space` / `W` / `ArrowUp` = Physical Nudge, `M` = Mute.
  - **Mobile portrait (`390×844`) controls:** Responsive simultaneous multi-touch Left & Right Flipper buttons/zones (`≥ 48px`, `touch-action: none`), intuitive Plunger pull/tap control when a ball is in the shooter lane, and a reachable Nudge button.
- **Audio:** Procedural Web Audio pinball Foley (solenoid flipper clack, spring plunger pull & release, harmonic bumper chimes that pitch up with combo, slingshot snap, drop-target thunk, metallic rail clink, ball drain sigh, Nudge thump, TILT alarm buzzer, relic draft chime, stage/boss shatter) — unlocked on first user gesture, clean mute toggle silencing both SFX and BGM, zero loop stacking on Replay.
- **Self-contained static build:** Vite + Three.js (`base: './'` so `dist/` works standalone and under any subpath). Include an inline SVG favicon. Zero broken external CDN assets or 404s. Keep all physics, scoring, tilt, and stage constants in one centralized `config` object.

---

## 5. Acceptance Contract — Hard Fails (`window.__game.runSelfTests()`)

Expose `window.__game` with `getState()`, `getStats()`, `sendAction(action)`, and `runSelfTests()` verifying at least these 5 invariants:

1. **`finiteAndContainedPhysics`:** Launch a ball at full plunger force and simulate active play + flipper strikes; all balls remain finite (zero `NaN`/`Infinity`) and strictly contained inside cabinet playfield bounds with zero tunneling/escape.
2. **`flipperStrikeImpulse`:** Place/drop a ball onto a flipper and actuate it; the flipper transfers real upward velocity/impulse toward the upper playfield without the ball tunneling through the paddle.
3. **`bumpersScoreAndDrain`:** Colliding with bumpers/targets increases score, combo, and stage progress; letting a ball drain past idle flippers cleanly triggers ball drain (decrementing balls remaining and serving the next ball or transitioning to Game Over on the last ball).
4. **`nudgeAndTiltLock`:** Triggering Nudge imparts real velocity impulse to an active ball and raises the TILT warning meter; pushing past the TILT limit engages TILT (`tilted === true`, locking flippers) until the ball drains, then clears TILT cleanly for the next ball.
5. **`relicDraftAndCleanReset`:** Reaching a stage's target opens the 3-card Relic Draft; choosing a relic adds it to active relics, mutates/advances to the next stage, and unmounts the draft overlay cleanly; Replay cleanly resets score, stage, balls, relics, tilt, overlays, and audio with zero stale state or console/page errors.

---

## 6. Top `config` Levers (keep in one centralized `config` module)

Expose and document the 4–6 highest-leverage tuning knobs (e.g., `tableGravity`, `flipperAngularSpeed`, `bumperBounceImpulse`, `plungerMaxSpeed`, `tiltThreshold`, `stageQuotas`).

---

## 7. Deliverables (inside your own folder: `neon/`, `opus/`, or `astra/`)

1. Runnable source + production static bundle (`npm run build` → `dist/`, `base: './'`).
2. Headless Playwright verification script that runs `window.__game.runSelfTests()` (all 5 green, zero console/page/404 errors) and captures:
   - A multi-state gameplay **contact sheet PNG** (title/cabinet overview, active flipper/plunger shot, multiball / bumper cascade + combo, 3-card Relic Draft overlay, boss/win or TILT/game-over end card).
   - A **`390×844` portrait** peak-HUD screenshot (zero horizontal overflow).
3. **One focused 5-pillar visual polish pass** after inspecting capture #1 (lighting/exposure, pose/grounding, material/landmark parity, action juice, multi-frame motion stability), followed by a clean re-verification capture.
4. `BUILD-NOTES.md` summarizing your architecture, physics & audio choices, relic catalog, verification results, what changed in the polish pass, top `config` levers, and up to 5 numbered P2s.
