hud
The heads-up displays of BLOCKBUSTER 767. Pure builders, like `game.ui.cards`: metrics in, a view table in, a widget tree out.
hud
The heads-up displays of BLOCKBUSTER 767. Pure builders, like game.ui.cards:
metrics in, a view table in, a widget tree out.
| Builder | What is on screen |
|---|---|
wind(m, view) | Score and planes left, the heading-trim dial, and the LAUNCH prompt in the language of the device the player is actually holding. |
flight(m, view) | Score, the last award drifting up and fading, the chain chip while a chain is alive, the speed gauge with the boost and dive marks, and the airframe part by part — a part that has snapped off is struck through, which is the only place the damage model is visible while flying. |
resting(m, view) | What stays up through the wreck beat: the score and the planes, and nothing that reads a live airframe, because there is not one. |
Where the HUD is allowed to be
The on-screen touch controls are drawn by the engine from the flight map's live
bindings, and they claim two regions: the stick takes the left 40% of the width
below 40% of the height, and the buttons take the right edge below 45%. So every
element here lives inside a top band of 0.38 of the live height, and nothing
reaches into the lower screen. That rule is a share of the height, so it holds
on a phone, a laptop and a television — measured at 1080x1440 the HUD's lowest
pixel is at 510 against a stick zone starting at 576 and a button band starting
at 648.
Reading it over a sunlit playroom
The band carries a wash that fades out down its height, and every readout also carries its own text shadow. Without both, cream type disappears the moment the camera swings onto the window wall.
The score pop
The most recent award drifts up and fades on a tween computed in Luau rather than on a keyframe animation: the pop has to restart on every award, and an immediate-mode tree gives a keyframe no restart edge to key off.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
num(v: any, d: number) → number
Every field is read through one of these. A view built before this pass — and the one the engine hands back mid-reload — is missing the newer fields, and a HUD that raises on a nil is a HUD that takes the game with it.
| arg | type | description |
|---|---|---|
| v | any | |
| d | number |
flag(v: any) → boolean
| arg | type | description |
|---|---|---|
| v | any |
text(v: any, d: string) → string
| arg | type | description |
|---|---|---|
| v | any | |
| d | string |
marks(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
throwSolve(speed: number, elevation: number, city: { number }?) → Throw
Solve the trimmed throw: where it comes down, where the drawn arc ends, and the points between. `city` is `{zNear, zFar, heightMax}` of the standing skyline, or nil while nothing is known about it — with a city the arc stops on the first face it meets.
| arg | type | description |
|---|---|---|
| speed | number | Metres per second the throw leaves at. |
| elevation | number | Radians of nose-up trim. |
| city | { number }? | `{zNear, zFar, heightMax}`, or nil. |
examples
local t = Hud.throwSolve(12, 0.2, { 0, 21.5, 13 })heightAt(t: number) → number
| arg | type | description |
|---|---|---|
| t | number |
arcSpec(t: Throw, city: { number }?) → Art
| arg | type | description |
|---|---|---|
| t | Throw | |
| city | { number }? |
px(z: number) → number
| arg | type | description |
|---|---|---|
| z | number |
py(y: number) → number
| arg | type | description |
|---|---|---|
| y | number |
tapeSpec(altitude: number, band: { number }?) → Art
| arg | type | description |
|---|---|---|
| altitude | number | |
| band | { number }? |
py(y: number) → number
| arg | type | description |
|---|---|---|
| y | number |
place(id: string, justify: string, child: any) → any
A full-width row that lets its one child keep its own width. A flex child in a column stretches across the container unless a row holds it, so every chip and gauge here is placed through one of these rather than through `alignSelf`.
| arg | type | description |
|---|---|---|
| id | string | |
| justify | string | |
| child | any |
svg(id: string, markup: string, w: number, h: number, extra: any?) → any
| arg | type | description |
|---|---|---|
| id | string | |
| markup | string | |
| w | number | |
| h | number | |
| extra | any? |
breathe(cycles: number) → any
A breath that ENDS. An infinite keyframe re-lays the tree out for as long as the screen is up; this one fades a prompt a few times and then leaves it lit, which is all a waiting prompt has to do.
| arg | type | description |
|---|---|---|
| cycles | number |
meter(m: Theme.Metrics, id: string, w: number, h: number, frac: number, gradient: string) → any
One painted bar — the idiom the speed gauge established, reused by the boost-fuel gauge under it.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| id | string | |
| w | number | |
| h | number | |
| frac | number | |
| gradient | string |
chip(m: Theme.Metrics, id: string, label: string, tone: string) → any
A named pill. `tone` is how the player is meant to read it: `called` is the shot they asked for, `down` is a landmark already flattened, `idle` is a standing one, `hint` is instruction rather than state.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| id | string | |
| label | string | |
| tone | string |
scoreBand(m: Theme.Metrics, view: any) → any
The score, and one wind-up key per plane still to come.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any |
landmarkStrip(m: Theme.Metrics, view: any, id: string) → any
The three landmarks, in the order the city elected them. One that has gone over is dimmed; the one the player called is outlined in gold.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any | |
| id | string |
chainChip(m: Theme.Metrics, view: any) → any
The chain chip: only on screen while a chain is actually alive, so the multiplier reads as an event rather than as furniture.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any |
scorePop(m: Theme.Metrics, view: any) → any
The most recent score, drifting up and fading — a manual tween rather than a keyframe animation, because the pop has to restart on every award and an immediate-mode tree gives a keyframe no restart edge to key off.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any |
speedBand(m: Theme.Metrics, view: any, tapeH: number) → any
Speed as a painted wooden gauge with the boost and dive marks beside it, the boost fuel the wind bought draining under it, and the altitude tape standing at the right with the city's height drawn across it.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any | |
| tapeH | number |
partsBand(m: Theme.Metrics, view: any) → any
The airframe, part by part. A part that has snapped off is struck through, which is the only place the damage model is visible while flying.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| view | any |
bandRoot(m: Theme.Metrics, id: string, children: { any }) → any
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | |
| id | string | |
| children | { any } |
bandContent(m: Theme.Metrics) → number
What the band has to spend on instruments once the type in it is paid for. A line box is taken at 1.15 of its font size, which is the ratio the faces in `Theme.font` measure at; the estimate only decides how much room the pictures get, and both callers clamp what comes out of it.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics |
line(fs: number) → number
| arg | type | description |
|---|---|---|
| fs | number |
wind(m: Theme.Metrics, view: WindView | AnyView) → any
The launcher's instruments: how far the key is wound, where the nose is trimmed, and where that throw goes against the city that is still standing.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | The live metrics. |
| view | WindView | AnyView | What the launcher looks like right now. |
examples
ui.updateScreen("bb_hud", Hud.wind(Theme.metrics(), view))flight(m: Theme.Metrics, view: FlightView | AnyView) → any
Everything the toy is doing on its way into the city.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | The live metrics. |
| view | FlightView | AnyView | The airframe and the round as they stand. |
examples
ui.updateScreen("bb_hud", Hud.flight(Theme.metrics(), view))resting(m: Theme.Metrics, view: RestingView | AnyView) → any
What stays on screen while the tally plays: the score and the planes, and nothing that reads a live airframe, because there is not one any more.
| arg | type | description |
|---|---|---|
| m | Theme.Metrics | The live metrics. |
| view | RestingView | AnyView | The score and which plane it was. |
examples
ui.updateScreen("bb_hud", Hud.resting(Theme.metrics(), view))Landmark = { key: string, label: string, standing: boolean }WindView = {FlightView = {RestingView = { score: number, plane: number, planes: number }AnyView = { [string]: any }Throw = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.