Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 07a07267-3…

hud

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

by◐lolboy21·posted 1mo ago
What it does

hud

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

TODO: describe this module.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

game.ui.hud — UNBROKEN FRONT's heads-up display. Everything here reads `Core.State` or listens on the event bus. Health, magazine, reserve, weapon and lean are values the gameplay systems already write, so the HUD is a display and nothing else — it never computes a number of its own, and it can never disagree with the weapon because it is not a second copy of it. LAYOUT is `design/references/in-play.png`, which is the frame the finished game is held to. That frame puts almost nothing on the glass: health at the lower left, a compass tape on the lower centre line, the magazine and the weapon slots at the lower right. Nothing at the top, no permanent crosshair — the optic in the player's hands is the aim point. Every element added past those four is one the reference does not have, so each is either drawn only when it carries news (a hit marker, a damage direction, a kill feed line, a reload prompt) or kept at the edge as a whisper. It updates only when a value CHANGES. A screen rebuilt every frame is a per-frame cost and a per-frame relayout for something that moves a few times a second at most, so the whole tree is rebuilt against a signature string of every value it shows, and nothing is pushed to the renderer when that string is unchanged. The compass heading is quantised into the signature for the same reason: a player turning their head is a rebuild, a player standing still is free.

pick(a: ?, b: ?, t: ?) → void

Blend a colour between two of the palette by `t`.

argtypedescription
a?
b?
t?

L(id: ?, text: ?, style: ?) → void

Small builders

argtypedescription
id?
text?
style?

row(style: ?, children: ?) → void

argtypedescription
style?
children?

col(style: ?, children: ?) → void

argtypedescription
style?
children?

abs(l: ?, t: ?, r: ?, b: ?, extra: ?) → void

argtypedescription
l?
t?
r?
b?
extra?

bar(id: ?, pct: ?, width: ?, colour: ?, height: ?) → void

A hairline with a fill, as a fraction of its own width.

argtypedescription
id?
pct?
width?
colour?
height?

heading( ) → void

What the player is looking at The player's heading in degrees, 0 = north (-Z), rising clockwise through east (+X). nil before a player exists, which is the honest answer in edit.

compassTape(hdg: ?) → void

The bearing tape: nine stops at 15 degrees apart, centred on the player. The centre stop carries the cardinal name when it lands on one and a tick otherwise, so the tape reads as a bearing rather than as five letters.

argtypedescription
hdg?

buildTree( ) → void

The tree

onStage(inner: ?, left: ?, top: ?, w: ?, h: ?) → void

argtypedescription
inner?
left?
top?
w?
h?

signature( ) → void

The signature — what the tree would look different for

pushFeed(text: ?, headshot: ?) → void

Feed and markers

argtypedescription
text?
headshot?

subscribe( ) → void

unsubscribe( ) → void

build( ) → void

Lifecycle

update(dt: ?) → void

argtypedescription
dt?

show( ) → void

hide( ) → void

clear( ) → void

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

7items
▣
module · born here
❒asset
# core <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
backing path · game/ui/hud.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.