Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage metropolisUi.package·originates fromworld 0a0b119f-a…

hud

The in-play HUD as a pure function of the game's view.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

hud

The in-play HUD as a pure function of the game's view.

  local Hud = require("~.screens.hud")
  local tree = Hud.build(view, env)

view: what metropolisGame's game:view() returns (README, "HUD data contract"): paint, pursuit, money,
      objective, mural, district, clock, scrubs, player; and two things the host adds from the scene:
      aim = { hex, inRange, painting, hold = 0..1 }?   the reticle on a wall (the tool's colour; the signing hold)
      marks = { { x, y, kind, stage, value?, icon? } }   screen points over watchers' heads (and places)
env:  { frame = Layout.frame(...), text = function(key, vars) -> string,      -- the game's copy
        glyph = function(control) -> prompts glyph | nil,                       -- from the input system
        prompts = { { control, text, hold? } },    -- what the player can do here, most important first
        notes = { { id, icon, text, tone, age } }, -- notifications, newest last
        banner = { name, rule, line, colour, age } | nil,                       -- district banner while it shows
        patterns = false }                                                       -- pigment patterns on

Regions and what each answers:
  top left     attention   am I being watched, by how much, and what happens next
  top centre   compass     who is watching and where they are
  top right    purse       sous, renown, rank, the hour
  right        objective   what the mission wants now; scrub crews on their way
  bottom left  paint       tool, colours and how much of each, room in the satchel
  bottom centre the wall   coverage, accuracy and tier of the wall under the reticle; what a control does here
  bottom right notes       things that just happened
Every region is anchored to its edge, so the HUD holds at any size; at "narrow" and "short" frames the
objective and notes shrink and the compass narrows (see Layout).

The interface is documented in the header of init.luau; this file repeats it for the asset browser.

Interface

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

conforms to

zero/source-extract/v2

metropolisUi.screens.hud — the in-play HUD as a pure function of the game's view. local Hud = require("~.screens.hud") local tree = Hud.build(view, env) view: what Present.hud(game:view(id), t) returns (modules.present; README, "HUD data contract"): paint, arms, colour, target, vehicle, pursuit, money, objective, mural, district, clock, scrubs, player; and two things the host adds from the scene: aim = { hex, inRange, painting, hold = 0..1 }? the reticle on a wall (the tool's colour; the signing hold) marks = { { x, y, kind, stage, value?, icon? } } screen points over watchers' heads (and places) env: { frame = Layout.frame(...), text = function(key, vars) -> string, -- the game's copy glyph = function(control) -> prompts glyph | nil, -- from the input system prompts = { { control, text, hold? } }, -- what the player can do here, most important first notes = { { id, icon, text, tone, age } }, -- notifications, newest last banner = { name, rule, line, colour, age } | nil, -- district banner while it shows patterns = false } -- pigment patterns on Regions and what each answers: top left attention am I being watched, by how much, and what happens next top centre compass who is watching and where they are top right purse sous, renown, rank, the hour right objective what the mission wants now; scrub crews on their way right vehicle what she is driving, how fast, whether it has been called in, the van's stock bottom left paint tool, colours and how much of each, room in the satchel; above it the arm in hand, what is loaded and what is left; above that her own colour while it is not whole beside the reticle the target's cover: each part's paint, and what happens when it is painted out the screen's edges grey in from the sides as her colour is stripped (settings: wash_effect = "meter" turns it off) bottom centre the wall coverage, accuracy and tier of the wall under the reticle; what a control does here bottom right notes things that just happened Every region is anchored to its edge, so the HUD holds at any size; at "narrow" and "short" frames the objective and notes shrink and the compass narrows (see Layout).

attention(p: any, env: any) → any

argtypedescription
pany
envany

compass(p: any, view: any, env: any) → any

argtypedescription
pany
viewany
envany

purse(view: any, env: any) → any

argtypedescription
viewany
envany

tin(pg: any, most: number, patterns: boolean) → any

argtypedescription
pgany
mostnumber
patternsboolean

paint(view: any, env: any) → any

argtypedescription
viewany
envany

arms(view: any) → any

the arm in hand: its name, what is left in it, the pigment loaded and what that pigment does

argtypedescription
viewany

colour(view: any) → any

her own colour: shown only while it is not whole

argtypedescription
viewany

kit(view: any, env: any) → any

bottom left: her colour, the arm, the paint

argtypedescription
viewany
envany

wash(view: any) → any

the screen's edges grey in as her colour is stripped

argtypedescription
viewany

target(view: any, env: any) → any

beside the reticle: how painted the thing she is aiming at is, part by part

argtypedescription
viewany
envany

vehicle(view: any, width: number) → any

what she is driving

argtypedescription
viewany
widthnumber

wall(view: any, env: any) → any

argtypedescription
viewany
envany

objective(view: any, env: any) → any

argtypedescription
viewany
envany

notes(env: any) → any

argtypedescription
envany

banner(env: any) → any

argtypedescription
envany

grab(p: any, env: any) → any

argtypedescription
pany
envany

reticle(view: any, env: any) → any

the reticle: where the tool points on a wall, in the colour loaded; hollow when the wall is out of the tool's range, with the signing hold drawn round it while that runs

argtypedescription
viewany
envany

marks(view: any, env: any) → any

an eye over the head of everyone who is watching: how much they have seen (the same meters as the compass, where the watcher stands on the screen)

argtypedescription
viewany
envany

build(view: any, env: any) → any

Build the HUD tree. See the header.

argtypedescription
viewany
envany

add(node: any?) → void

argtypedescription
nodeany?

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.