Log inGet started
World

EMBERLINE

Branchmain
Branchesmain
Commite3b1d97d67

README.md

emberline.game

The match driver. The scene entrypoint calls exactly two things here — Game.boot() and Game.teardown() — and everything else is the arcade shape around the fight: which phase the game is in, who the next opponent is, what difficulty they fight at, and what a finished match means.

attract → title → select → prefight → fight → roundover
                               ↑                  ↓
                               └── matchover → next rung, or ending

Game.startMatch(opts) binds a fighter, an opponent, a stage and a difficulty and hands off to Bus.services.fight. Game.nextMatch() walks the ladder; after Rules.LADDER_LENGTH rungs it goes to the ending instead.

The staging and ui slices own what attract, title and select look like; this file owns when they happen and what the answer means. Both are optional: with neither present the game drops straight into a fight, which is the state you want while the fight itself is being built.

The ladder only advances on a ui.confirm event (next / retry / continue / start / select). Nothing else moves it.

The fight is reached through the bus rather than through a captured module reference, so saving emberline.fight mid-session replaces the module without leaving this file driving the instance that got replaced.