hud
The instruments CINNAMON is driven by.
local Hud = require("game.screens.hud")
ui.registerScreen("ns_hud", Hud.build(St.metrics(), rules.ledger(), true, caption), 20)
Two rails flank the play area, because the run is vertical and so is the screen it is filmed on:
- LIGHT, on the left, is where the rover stands against the dawn line —
hot at the bottom, cold at the top, the copper band bracketed between them,
with the rover's marker riding it. Its gradient stops are cut at the same
distances
NS.bandAtcuts the bands, so the marker and the colour under it always agree. - ROUTE, on the right, is how far up the corridor the rover has come, with Peary Station's dome at the top of it.
The middle of the frame is left to the game. Under it sit the two things that can end a run: the cargo's temperature, filled left from centre in frost and right in ember, and the xylidine, with the number of hops it still buys. A caption sits above them, and a band alarm washes the frame's edge when the cargo is cooking or freezing.
build(m, ledger, live, caption, bare) takes the metrics, a rules ledger (an
empty table is fine — the instruments read STANDBY), whether a run is under
way, the narration line on screen, and bare, which draws the caption alone
for the opening, when the frame belongs to the camera.
Every meter is laid out with flex weights rather than positions, so the same tree reads at 1080x1440, on a phone, and across a television. The bottom block clears the bottom tenth of the frame, where a cutscene's letterbox bar and a phone's home indicator land.
Scoped to this part · feeds back into the world's score.