Log inGet started
World

Hullbreaker

Branchmain
Branchesmain
Commitcdbe4bf730

README.md

hud

The helmet of HULLBREAKER, as a widget tree. Two pure functions of a run snapshot:

local HUD = require("game.hud")
HUD.visor(v)   -- the in-run instrument layer
HUD.card(v)    -- the full-frame card: briefing, won, lost

RunDirector builds the snapshot once a refresh and hands it in. Neither function reads game.rules itself, so the whole HUD can be rendered for any state — including states a run has not reached — by passing a made-up snapshot. That is what makes it checkable without playing to the moment.

The snapshot

phase, deadReason · o2, o2Max, integrity, integrityMax, fuel, fuelMax · banked, quota, carrying · instability, instabilityMax, cutsMade · torchHeat, torchHeatMax, torchLocked, cutting, cutProgress · pieceCount, elapsed, blink · skiff = { visible, offscreen, x, y, dist, angle }.

What is on the glass

  • Top left — the suit. Air remaining as the largest number in the frame (it is the run timer), then suit integrity and propellant.
  • Top right — the haul. Tonnage banked against quota, with a violet ghost fill showing what is on the clamp but not yet banked; the cargo line; hull instability as nine pips, and which hazards that arms.
  • Bottom centre — the torch. Heat, state, and the cut-node progress while a node is under the beam.
  • Centre — the reticle, and the skiff marker: a chevron at the skiff's projected screen position, clamped to a ring inside the visor and turned to point the short way round when the skiff is off-screen or behind you. It hides inside 14 m, where you can see the skiff anyway.
  • Top centre — one banner, for the only things that matter more than what you were doing: suit breach, air critical, quota met, air low.

Layout notes that were paid for

  • The tree is composed against a fixed 1280×720 logical canvas (ui.screenSize()), not against capture pixels.
  • A wrapping label only takes the width of a container, never of a row it shares. Put one straight into a horizontal and it lays out one glyph per line — which is why the text half of a bullet is its own box with a stated width.
  • A percentage width on a button resolves against the screen, not the parent, so the card's buttons carry a stated pixel width.
  • The mono face has no ▸ and no ₂; a missing glyph paints as a hollow box, so the bullet mark is a drawn 5 px square and the caption reads "AIR REMAINING".

The palette and the primitives every panel is built from are in ui.hbstyle.