game.hud — the authored screens
Every screen the player reads, and the flow between them.
local hud = ST.need("game.hud")
What it owns
| screen | when |
|---|---|
| title | the game opens here |
| how to play + calibration | from the title |
| the in-duel HUD | during a duel, in the bottom band |
| the spoken-line plate | whenever anybody says anything |
| pause | ESC during a duel |
| results | when a duel ends |
| credits | after the last duel |
Layout
The screen is 1080 x 1440 — 3:4 portrait. Everything stacks down the tall
axis. The in-duel HUD lives entirely in ST.VIEW.band.hud (1210..1440) so it
never touches the highway's protected corridor; the judgement reads as a
colour bar across the top of that band plus one word inside it.
What it listens to
screen.change, duel.begin, duel.end, note.hit, note.miss,
phase.change, story.line, story.done.
What it publishes
ui.command with action = start / retry / next / quit /
calibrate / credits / pause / resume, and sfx for its own noises.
The calibration
The card on the how-to screen runs a real synthesised metronome
(ST.clickTrack) at 140 BPM, binds ST.clock to it — the same clock the
conductor judges with — and reads the player's taps against it. Two kicks of
lead-in do not count; the next eight do. The mean of those taps is written
into ST.RULES.calibrationSeconds, which the conductor adds to every note
time before judging. A positive value means the player is consistently late
and the game moves toward them.
It refuses to run while a duel is in progress, and releases the clock when it finishes.
The spoken lines
Every line the story slice emits on story.line is printed here, whether or
not its audio generated. { speaker, text, seconds?, voiced? }; the speaker
picks the plate's accent colour, and voiced = false marks the plate so a
missing recording is visible rather than silent.
M.say(line) is the direct call if a slice would rather not go through the
bus.
The look
ui.theme is the palette, the type scale and the primitives; ui.screens
builds every tree as a pure function of state. Neither touches the engine, so
a screen can be rendered and looked at without playing the game.
Scoped to this part · feeds back into the world's score.