Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld 3a9e3328-0…

Interact

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

by◐lauramarka·posted 1mo ago
What it does

Interact

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

TODO: describe this component.

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.interact.Interact — the interaction system. ONE SYSTEM, NOT ONE SCRIPT PER OBJECT. Anything interactive is an ENTRY in a registry: a place in the world, how close you must be, what it says when you are close enough, and what happens when you press the key. Nothing about the player is baked into an object, and nothing about an object is baked into the player — so a new interactive thing is one `register()` call and no new code. interact:register({ label = "Open the gate", x = -5, z = 6, radius = 2.2, action = "door", target = gateEntity }) WHAT IT PUBLISHES, and why over the bus: the prompt has to be DRAWN by the screens slice and the story has to REACT to what was touched. So this slice owns neither. It emits: "prompt" (label) or (nil) when nothing is in range "interact" (action, entry) when the key is pressed "beat" (beatKey) for a story moment an object triggers THE KEY. `E` is read from the input map, but a component that polls raw input and a component that answers a call are the same component here: `press()` is the action, and the input binding calls it. That keeps the system testable without a keyboard, which is how it was verified.

ModelBoxCollider

register(entry: { [string]: any }) → number

Add something interactive. The one call that makes a new object usable — nothing else in this file needs to know it exists.

argtypedescription
entry{ [string]: any }name, label, x, y, z, radius, action, and an optional target entity.

examples

interact:register({ name = "gate", label = "Open the gate", x = -5, z = 6, radius = 2.2, action = "door" })

buildRegistry( ) → void

The village as it stands: the house door, the things in the yard, the water, the stall and the shop. Positions are the world slice's own, so this does not guess at geometry it did not build.

buildDoor(entry: ?) → void

A door that actually swings. The leaf is built here rather than in the world slice because it is the interaction system that owns what a door DOES; the world only declares where the opening is. Without this the doorway is a hole.

argtypedescription
entry?

toggleDoor(name: ?) → void

argtypedescription
name?

press( ) → string

Perform the interaction on whatever is in range. Safe to call with nothing in range — it does nothing and says so.

examples

interact:press()

playerPosition( ) → void

distance(a: ?, b: ?) → void

argtypedescription
a?
b?

awake( ) → void

start( ) → void

update(dt: ?) → void

Cheap: one position read and a distance per registered thing, and the bus only hears about it when the thing in range CHANGES — not every frame.

argtypedescription
dt?

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
# game.Game The spine of **Hidden Love — A Bangladeshi Romance Story**. One shared module holding the constants and the rules, so no two slices have to agree by convention. ```lua local Game = require("game.Game") Game.bus.on("chapter", function(n) print(n) end) ``` Nothing here touches the engine at require time — it is data and pure functions, safe to require from a scene entrypoint, a component, a module or an `execute` chunk. ## What it holds | Field | What it is | |---|---| | `ART` | The art-direction sentence, verbatim from the reference pass. Every generated prompt reuses it word for word. | | `TITLE` / `SUBTITLE` / `ENDING_TITLE` | The title card and the closing card. | | `CAST` | The seven named people: who they are, what they wear, and the reference image for the two leads. | | `CHAPTERS` | The twelve chapters in order — `place`, `who`, `beat`, `objective`. The storyline is this table. | | `PLACES` | The seven sets the world slice builds, each with the reference image it answers to. | | `METERS` / `TIERS` | friendship, trust, closeness — and the three ways the same ending can land. | | `MOUNTS` | The names of the scene's mount entities a slice attaches to. | | `SLICES` | The five slice modules the entrypoint requires and mounts. | | `bus` | `on` / `off` / `emit`. How slices talk without requiring each other. | ## The rule the whole game runs on Every chapter reaches the end. The meters decide how *warm* the telling is, not whether it finishes — `warmth(state)` is the mean of the three meters as 0..1, and `tier(state)` names what that earns at the finale. ## State and saving `Game.newState()` is the whole save: chapter, the three meters, the choices taken, flags, the phone log, and time in chapter. `Game.SAVE_PATH` is where it is written, under `/zero/source/local/`. `Game.addMeter(state, key, amount)` clamps and announces on the bus; move the relationship through it and never by assignment, so everything watching stays in step. ## Mounting The scene lays down one entity per key in `Game.MOUNTS` and the entrypoint hands them to each slice's `mount(refs)`. A slice that is not present yet is not an error — the scene loads without it.
▲ 0↑ born
backing path · game/interact/Interact.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.