Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld 5164eb76-1…

Screens

Two screens, both owned by the **Screens** component (which the slice's module spawns on every scene load — a UI needs a persistent owner for its callbacks):

by◐Cxrn·posted 19d ago
What it does

screens — everything the player reads

Two screens, both owned by the Screens component (which the slice's module spawns on every scene load — a UI needs a persistent owner for its callbacks):

ScreenShows
mko_menuThe title, the CONTROLES window, and the circuit select.
mko_hudThe lap/point counter, the millisecond timer, the item slot, the countdown, and the finish card.

The flow

title  --J-->  controles  --Comenzar/J-->  select  --a circuit-->  countdown  -->  race  -->  finish

J advances (its own menu.inputMap), and every button is a real click target: comenzar, pick_cheep, pick_mumu, pick_arcoiris, again.

Choosing a circuit calls Core.selectCircuit(id) + Core.beginRace(); the tracks lay the circuit and the kart is placed on its line. The menu screen is hidden and its scheme released while the race runs, and the HUD takes over.

The menu map deliberately does not suppress the driving scheme: the kart already ignores the wheel unless a race is on, so a menu that is up can never be a kart that cannot move.

Look

The palette of design/references/02-title-screen.png: a blue title bar, white panels, chunky type, and an orange COMENZAR button, with the type over the live world rather than over a flat colour.

API

local S = Core.system("screens")
S.show("title" | "controls" | "select")
S.view()                  -- which page is up

Interface

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

conforms to

zero/source-extract/v2

Screens — everything the player reads: the title, the CONTROLES window, the circuit select with its best times, the countdown, the race HUD and the finish card. A UI is a component because a callback needs a persistent owner: every `onClick` in these trees arrives at `onCallback` below. The entity this sits on is spawned by the slice's module on every scene load, so the screens come back with the world. The look: candy-bright, chunky, rounded, with a blue title bar and an orange button — the palette of design/references/02-title-screen.png.

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

argtypedescription
style?
children?

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

argtypedescription
style?
children?

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

argtypedescription
text?
style?

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

argtypedescription
style?
children?

keyCap(key: ?) → void

argtypedescription
key?

titlePage( ) → void

controlsPage( ) → void

bestText(id: ?) → void

argtypedescription
id?

circuitCard(c: ?, index: ?) → void

argtypedescription
c?
index?

selectPage( ) → void

menuTree( ) → void

chip(text: ?, colour: ?, size: ?) → void

argtypedescription
text?
colour?
size?

hudTree( ) → void

showMenu( ) → void

buildHud( ) → void

releaseMenuClaim( ) → void

Release whatever claim this component holds on the menu scheme. Called before every take, so a claim lost to a hot reload — or a second one from a re-show — can never leave the menu armed twice or not at all.

setMenuLive(live: boolean) → void

argtypedescription
liveboolean

M_advance( ) → void

J goes on: title -> controls -> the circuit the cursor is on.

M_start(id: string) → void

argtypedescription
idstring

awake( ) → void

start( ) → void

update(dt: number) → void

argtypedescription
dtnumber

onCallback(id: string, _data: any) → void

argtypedescription
idstring
_dataany

onDestroy( ) → 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 The shared contract of **Mario Kart OrigoZ**. Every slice reads its rules here, so no slice hard-codes a number that belongs to the game. `require("game.core")` from anywhere in this world. ## What it holds | Field | What it is | |---|---| | `TITLE`, `PROMPT`, `ART` | The game's name, the *pulsa J para jugar* prompt, and the art-direction sentence — word for word from the reference pass, reused by every prompt. | | `CIRCUITS` | The three circuits: id, name, laps, layout (`ring` / `square` / `ribbon`), racing surface, what lies beyond the edges, and half-width. | | `KART` | How a kart feels: max speed, acceleration, braking, turn rates, hop and gravity, drift multipliers, trick spin. | | `SURFACE` | What each surface does to you: `road` 100%, `water` 75%, `grass` 50%, `space` falls. | | `SPARK` | The drift charge table: blue at 1.0s (0.5s boost), orange at 2.5s (1.25s), rainbow at 4.0s (2.5s). | | `BOOST` | Trick 0.75s, mushroom 2.0s, feather 2.0s. | | `ITEMS` | Crate respawn (8s) and the mushroom / feather odds. | | `RESCUE` | How Lakitu puts you back: drop height, lift speed, lift duration. | | `PHASE`, `flow`, `race` | The flow state machine and the live race clock. | | `records` | The best time on each circuit, kept in `runtime_data.world` — shared and durable. | ## API - `M.circuits()`, `M.circuit(id)`, `M.circuitIndex(id)` - `M.register(name, api)` / `M.system(name)` — how slices reach each other - `M.on(name, fn)` / `M.emit(name, payload)` — the slices' event bus (`phase`, `circuit`, `lap`, `crate`, `boost`, `rescue`, `finish`) - `M.setPhase(p)`, `M.selectCircuit(id)`, `M.openControls()`, `M.beginRace()`, `M.startRace()`, `M.tick(dt)`, `M.reachPoint(total)`, `M.finishRace()` - `M.records.get(id)` / `M.records.set(id, ms)` / `M.records.all()` - `M.formatTime(ms)` → `"00:45.678"`, `M.countdownLabel(seconds)` - `M.clamp`, `M.lerp`, `M.approach` ## Who reads what - **kart** — `KART`, `SURFACE`, `SPARK`, `BOOST`, `RESCUE`, `race`. - **tracks** — `CIRCUITS`, `SURFACE`, `reachPoint`, `PHASE`. - **items** — `ITEMS`, `BOOST`, `FEATHER_LIFT`, `emit("crate")`. - **screens** — `flow`, `race`, `records`, `formatTime`, `PHASE`. - **audio** — `on("phase")`, `on("boost")`, `on("crate")`, `on("finish")`.
▲ 0↑ born
backing path · game/screens/Screens.component

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.