Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 850de0df-a…

screen

Blockhaven's two screens, authored as widget trees:

by◐zain10_gaming·posted 25d ago
What it does

screen

Blockhaven's two screens, authored as widget trees:

  • the title — BLOCKHAVEN in chunky block lettering (one styled label per letter, so the word cascades in) over the jumping toy avatar and a shower of gold coins, with the tagline pill and one gold PLAY button over the live city;
  • the HUD — the coin count from the pickupsKit ledger and the three outfits of FITZ & CO., each with its price until it is bought and a tick after.

game/screen.module builds the trees and nothing else: Screen.titleTree({ W, H }) and Screen.hudTree({ W, H, coins, delta, ownedCount, owned, outfits }). Every size is worked out from the width the UI lays out on, so the same tree reads at a desktop window and at a phone-sized one.

Screen.build(env) is what scenes/main.scene/build.luau calls. It spawns the ScreenHost entity and attaches game.ScreenHost, the component that registers both screens, polls the ledger and the wardrobe, and answers the PLAY callback — so the engine takes the screens down with that entity.

Coin counts come from require("pickupsKit.api").get(player, "coins"). Outfits owned come from require("game.avatar"): the ids found in its worn table, plus every id that went through its apply(player, id) call — which this component wraps so a purchase shows on the HUD the moment it happens.

Interface

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

conforms to

zero/source-extract/v2

nonstrict

hex(c: ?) → void

argtypedescription
c?

label(text: ?, style: ?) → void

argtypedescription
text?
style?

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

argtypedescription
style?
children?

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

argtypedescription
style?
children?

svg(body: ?, style: ?) → void

argtypedescription
body?
style?

fadeUp(delay: ?, distance: ?) → void

An entrance: fade and rise, held on the first keyframe until its delay.

argtypedescription
delay?
distance?

bob(delay: ?, distance: ?, seconds: ?) → void

A slow bob, for something that hangs in the air.

argtypedescription
delay?
distance?
seconds?

coinArt( ) → void

The game's own objects, drawn as vectors: the gold coin from golden-coin.png, the star that scores the wardrobes, and the toy avatar on player-character.png caught mid-jump.

starArt( ) → void

tickArt(colour: ?) → void

argtypedescription
colour?

avatarArt( ) → void

The player, as the character reference draws it: rounded yellow cube head with a painted smile, sky-blue shirt with a gold star, navy shorts, lemon arms and legs — arms up and legs tucked, the way the title screen has it.

letter(ch: ?, size: ?, index: ?) → void

One letter of the wordmark. Each is its own label so the word can cascade in letter by letter and every glyph carries a thick cream outline over a stack of gold offsets — a block of painted wood, not a text string.

argtypedescription
ch?
size?
index?

wordmark(text: ?, size: ?) → void

argtypedescription
text?
size?

floatingCoin(size: ?, left: ?, top: ?, delay: ?) → void

A gold coin hanging in the air, bobbing on its own beat.

argtypedescription
size?
left?
top?
delay?

titleTree(o: ?) → void

argtypedescription
o?

chipStyle(chipH: ?, extra: ?) → void

A dark glass chip with a cream rim: the shape the in-play reference puts in the corner of the screen, sized off the numeral it carries.

argtypedescription
chipH?
extra?

outfitChip(outfit: ?, owned: ?, k: ?, chipH: ?, compact: ?, index: ?) → void

One outfit of FITZ & CO.: a painted swatch, its name, and either its price or the tick that says it is on the wardrobe.

argtypedescription
outfit?
owned?
k?
chipH?
compact?
index?

hudTree(o: ?) → void

argtypedescription
o?

build(env: ?) → void

build.luau calls this once while the scene is authored. The entity it hands back carries the host that registers and drives both screens.

argtypedescription
env?

Sub-parts

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

Showing up to 3 levels deep. Open a part to see what it holds further down.

11+items
▣
module · born here
❒asset
# Blockhaven The `Blockhaven` module defines the core constants and rules for the game world, including its color palette, city layout, outfit prices, and obstacle course parameters. It is read by every other module in the game to ensure consistency across the city, shop, and HUD, and is not meant to be modified by them.
▲ 0↑ born
◇
component · born here
❒asset
# game.ScreenHost Blockhaven's screens in play: the title screen until the player presses PLAY, then the in-play HUD. Attach it to one entity (the scene's `ScreenHost`) with no settings: ```lua host.component.add("game.ScreenHost", {}) ``` It registers the two screens `game/screen.module` authors, on layers 600 (the title) and 40 (the HUD), and swaps between them on the PLAY callback. The screens belong to this component's instance, so they go when the entity does. The HUD shows the coins the pickupsKit ledger holds for this peer (`require("pickupsKit.api").get(player, "coins")`) and the three outfits of `game.Blockhaven.OUTFITS`, each with its price until it is owned. Ownership is read from `game/avatar`: the ids in its `worn` table, plus every id passed to its `apply(player, id)`, which this component wraps. Siblings it expects: the pickupsKit ledger (its `PickupHUD` is hidden while this HUD is up, so there is one coin counter in the corner, not two) and `game/avatar` for the wardrobe.
▲ 0↑ born
backing path · game/screen.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 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.