match.module
README.md
screens.match
BATTLEBOX's match flow as a module: toTitle, toGarage(keep) / garage (BUILD YOUR BOT from the title, GARAGE after a result), testDrive / endTest / testing, startMatch, confirm (FIGHT from the title, REMATCH from a result screen), tick(dt) and countingBot for the HUD's 10-count.
- title restores the last-used build once per session (
screens.garage.restore) and poses both corners for the faceoff. - garage opens
editor.sessionon the player's build (screens.garage.open). With the 3D build view (editor.view) both corner bots are parked out of shot and the camera holds thebuildshot on the view's stand; without it a temporary turntable (GarageTurntable, materialsscreens.turntable/screens.turntableRim) stands the player's corner bot slowly turning under thegarageshot. FIGHT closes the garage (the build goes toRules.setDesign("HAVOC")andlast.json) and starts the countdown; BACK returns to the title. - test drive puts the build in the player's corner and runs phase
free(bots drive, no clock) with the chase shot and the rival parked out of the way;endTest(Esc / pad B / ◀ GARAGE) returns to the garage with the session and its undo history intact. - countdown / fight / ko / decision: 3-2-1, the 3:00 clock, KNOCKOUT on destroyed or a 10 s immobile count, the judges' decision at 0:00.
It sequences game.rules phases, reset, decide and camera shots and duplicates none of its numbers. A bot that cannot be posed in a frame (mid-rebuild) is logged once and does not stop the flow.