# game.events
Tumblestep's per-peer event bus and shared run state. Every system (director, camera, feel, UI) talks through it, so
none requires another's internals. Each player runs their own copy locally.
# game.run.director
Tumblestep's run director, one per player and local to that player's machine. Phases: `title` (the tumbler stands on
the top step of a live course under the title card) → `aim` (hover the tumbler, hold to charge, release to shove;
touch tap-hold; pad reticle + trigger; Space / Enter quick shove) → `tumble` (the endless course streams around the
tumbler, toys are populated on every chunk, every impact / combo / coin / toy / area scores Bonks) → `results` (the
run is banked through `game.economy`; Again starts a new course).
It owns the course (`endlessStairs.course`, a fresh seed per run), the tumbler (`tumbleTroupe.troupe`, unsynced) and
the toys (`courseToys.toys`, unsynced, body group = the tumbler's bodies), handles course rebases for the tumbler and
camera, and emits on `game.events`: `phase`, `popup`, `banner`, `score`, `runEnd`, `rebase`, `secondWind`.
# arcade
Tumblestep's Prize Arcade rules, on gachaKit and slotsKit. `setup()` (main scene and arcade scene, every machine) defines the three capsule banners (Tumblers, Outfits, Course Toys: tickets pay first, else Bonks), the six slot machines (bet in Bonks; Bonks, Prize Tickets and next-run boosts as prizes), bridges incrementalKit Bonks into both kits, and feeds the Prizes upgrades in as luck (gachaLuck, slotLuck). `attachMain()` grants Prize Tickets on every `runEnd` (floor(distance/100) + floor(snaps/4), x (1 + Ticket Printer)) and writes `result.tickets`.
Read by the game: `toyBoost(kind)` / `toyWeights(base)` (pulled toys show up more on the stair), `charBonus(charId)` (duplicate tumbler levels: +10% Bonks a level), `boost()` / `consumeBoost()` and `Bus.state.prizeBoost` ({ bonksMul, shoves } for the next run), `presentation()` / `setPresentation(p)` / `nextPresentation()` (the pull presentation setting, saved in the player's settings). Pulled tumblers and outfits unlock through `game.economy.prizeUnlock`.
# game.ui.TumbleUI
Tumblestep's screens in the sticker-storybook style (`game.ui.style`), local to each player: the title card over the
live course (stepped TUMBLESTEP title, PLAY, Tumblers / Upgrades / Settings, the first-run hint), the run HUD
(distance, run Bonks rolling up, combo meter, area chip, Second Wind pips, charge meter, pad reticle), popping numbers
at impact points, the area banner, the results card (distance, depth record, Bonks breakdown, combo record, NEW RECORD,
upgrade nudge, Shop / Again / Rebirth), the tumbler select screen (characters and outfits) and settings (volume, music,
number style, quality). The shop, Rebirth and welcome-back screens are incrementalKit's, restyled in `game.economy`.