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

HouseBuilder

The twelve areas of **The House That Knows You**, as data and one builder. `HouseBuilder.build()` is called from `game.house.sceneContent`, which the scene build calls, so what it makes is baked into `scenes/house.scene/scene.json` and is there the moment the world opens.

by◐aiden·posted 1d ago
What it does

game.house.HouseBuilder

The twelve areas of The House That Knows You, as data and one builder. HouseBuilder.build() is called from game.house.sceneContent, which the scene build calls, so what it makes is baked into scenes/house.scene/scene.json and is there the moment the world opens.

The plan is data

  • ROOMS — each area's interior rectangle: x0..x1, z0..z1, y0..y1. The entrance hall is HALL, and is built by the scene skeleton, not here.
  • DOORS — a doorway is declared by (a, side, at, other): room a cuts an opening on the wall named by side, centred at at measured along it. It is declared by room-and-side rather than by a coordinate because two rooms never share a wall: interiors are spaced so neighbouring walls abut and never coincide, and each room cuts its own. Two coplanar walls look perfect in a still frame and shimmer the moment the camera moves.
  • STAIRS — the three places the house changes level, each with the room it starts in, the room it arrives in, and the item that locks it. The hole a stair needs is derived from the same entry, so a stair and its hole cannot disagree.
  • PROPS — what each room is furnished with; hide = true marks a place the player can get inside.
  • UNLIT_ROOMS — the basement, secret room, attic and storage room carry no light on purpose. They are torch territory.

What it exposes

  • build() — build it all. Called from the scene build.
  • area(id) — the centre of an area, for any slice that needs to place something in a room. roomOf(id) gives the rectangle.
  • doorInfo(id) — a doorway's lock, for the systems slice.
  • hidingPlaces() — every hide_<room>_<n> entity, by name.

What it names, so other slices can find it

room_<area> is each room's root; light_<area> its bulb; door_<id> a door leaf; door_stair_<id> a locked stair door; hide_<area>_<n> a hiding place; prop_<area>_<n> furniture; spawn_resident_<area> and patrol_<area> the two anchors the monsters slice uses.

The furniture is blocked out: named, in the right place, at the right size, in a plain material, so the game runs and the polish pass can put the real prop exactly there.

Interface

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

conforms to

zero/source-extract/v2

strict

ModelBoxColliderLight

scalePlan( ) → void

Building helpers THE EXPANSION, applied to the plan. Every coordinate above is authored in the house's original units; this is the one place they are scaled to what is actually built (x and z only — RULES.HOUSE.scale). A uniform horizontal scale is what makes this safe: every position AND every room's extents move by the same factor, so the relationships the house depends on survive it exactly. Two rooms that abutted still abut (their walls are WALL_T thick, scaled to match), a doorway is still centred in the wall it is cut through, and a prop still stands the same distance in from its room's corner. Nothing is added or removed, so every door, key, objective and hiding place still leads where it led — and the monsters' waypoints (game/monsters/NavGraph) and the pickups' placements (which are room-relative) follow these numbers without an edit of their own. Deliberately NOT scaled: heights, so the storey keeps its rise and the player's eye, the torch and the stair rise stay tuned; doorway and stair WIDTHS, because a doorway is 1.15 m in a mansion as much as in a cottage and a scaled one would no longer meet the entrance hall's openings; and the furniture, which is real furniture at real sizes.

box(name: ?, position: ?, size: ?, material: ?, parent: ?, collider: ?) → void

argtypedescription
name?
position?
size?
material?
parent?
collider?

centre(rect: ?) → void

argtypedescription
rect?

area(id: string) → void

The centre of an area, for other slices. Returns nil for a name this house does not have.

argtypedescription
idstring

roomOf(id: string) → void

argtypedescription
idstring

openingsFor(roomId: string, side: string) → void

Every opening this room needs on one of its walls, sorted along the wall.

argtypedescription
roomIdstring
sidestring

wall(name: ?, room: ?, side: ?, material: ?, parent: ?, explicit: ?) → void

One wall of a room, cut by the openings that belong on it. The wall runs along `axis` at a fixed coordinate; openings become real gaps. `explicit` is the opening list to use, and defaults to the ones this room's doorways declare — which is how the Endless generator builds a room that is not in the plan at all.

argtypedescription
name?
room?
side?
material?
parent?
explicit?

piece(suffix: ?, from: ?, to: ?) → void

argtypedescription
suffix?
from?
to?

slab(name: ?, rect: ?, y: ?, material: ?, parent: ?, opening: ?) → void

A floor or a ceiling, with an optional rectangular opening in it (where a stair comes through).

argtypedescription
name?
rect?
y?
material?
parent?
opening?

part(suffix: ?, x0: ?, x1: ?, z0: ?, z1: ?) → void

argtypedescription
suffix?
x0?
x1?
z0?
z1?

skirt(name: ?, room: ?, y: ?, material: ?, parent: ?, opening: ?) → void

argtypedescription
name?
room?
y?
material?
parent?
opening?

furnish(roomId: ?, room: ?, parent: ?) → void

argtypedescription
roomId?
room?
parent?

openingAt(roomId: string, plane: string) → void

The hole a stair needs: in the ceiling of the room it starts in, and in the floor of the room it arrives in. Derived from M.STAIRS, so a stair and its hole can never disagree.

argtypedescription
roomIdstring
planestring

build( ) → void

Build it. Called from the scene build, so what it makes is baked into scene.json and is there when the world opens.

doorInfo(id: string) → void

What this module knows about a doorway, for the systems slice: whether it is locked and by what.

argtypedescription
idstring

buildCell(name: string, rect: ?, sides: ?, opts: ?) → void

For the Endless generator: build one room that is not in the plan. `rect` is any interior rectangle. `sides` says where the doors are — `{ north = { { at = 0, width = 1.15 } }, east = { ... } }` — and a side that names none is a solid wall. This is the same code that builds the twelve, so a generated room has the same walls, floor and light as a hand-placed one, and the two can never drift apart.

argtypedescription
namestring
rect?
sides?
opts?

hidingPlaces( ) → 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.

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

33+items
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◇
component · born here
❒asset
# game.house.HouseDoor A door leaf that swings on its own hinge. It is what stands in the doorway of every room in the house, so a doorway reads as shut rather than as a hole. `HouseBuilder` attaches it to each `door_<id>` leaf, with the door's lock. ## Who opens it Not this component. It owns the **swing** and the **lock data**; the systems slice owns the **interaction** — whether the player holds the key, what the prompt says, and the message when a door refuses. The systems slice sets `open = true` when the player may pass. So the house never has to know about inventory, and the inventory never has to know about hinges. ## Fields | Field | What it is | |---|---| | `open` | Whether the leaf is swung aside. **Sync** — a door one player opens is open for everyone. | | `lockedBy` | The `GameRules.ITEMS` id that opens it, or `""`. Empty means it is never locked. | | `swing` | How far the leaf turns, in degrees. | | `hinge` | Which edge it turns about, `1` or `-1`. | | `width`, `axis` | The leaf's size and which way its width runs, so the hinge can be found from them. | | `speed` | Degrees a second while it swings. | ## The hinge is the whole problem A door is a box, and a box turns about its own **centre** — which swings the leaf straight through both walls. So the leaf's position is carried around its hinge: the hinge sits at one edge, and opening is that point staying still while the rest of the leaf travels around it. `awake` finds the hinge from the leaf's position, width and axis; every frame of the swing re-derives the position from the closed one, so a door that is interrupted halfway still ends exactly shut or exactly open.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# game.GameRules The constants and rules of **The House That Knows You** — the one module every part of the game reads, so two systems written in different sessions agree on what a room is called, how loud a sprint is, how long a torch battery lasts and which ending the player earned. It holds **no behaviour and no entities**: pure data plus a handful of pure functions. Require it and read it; never write to it. ```lua local RULES = require("game.GameRules") ``` ## What is in it - **`ART_DIRECTION`** — the one sentence every generation prompt reuses word for word, and **`REFERENCES`** — the pictures the game is judged against. - **`PALETTE`** — that sentence as numbers, for the interface and for materials. - **`HOUSE`** — the wall height, the wall thickness, the doorway size, the room module, the storey height and the player's own dimensions. Every prop in the game is sized against these. - **`AREAS`** / **`AREA_BY_ID`** — the twelve areas, each with its floor, its nominal centre on the ground plan and the item that unlocks it. - **`OBJECTIVES`** — the twelve-step chain, in order, each naming the area it happens in and the item it needs. - **`ITEMS`**, **`REQUIRED_CLUES`**, **`CLUE_COUNT_FOR_TRUTH`** — what can be picked up, and what the ending is decided on. - **`ENDINGS`** and **`selectEnding(cluesFound, secretRoomOpened)`** — the three endings and the rule that picks one, stated once so the interface and the systems cannot disagree. - **`SURVIVAL`** — speeds, stamina, health, torch battery, interaction ranges. - **`DIFFICULTY`** — easy, normal, nightmare. These change the monster's persistence, reach and the supply density **only**; all three run the same monster logic. - **`MONSTERS`** and **`MONSTER_STATES`** — THE RESIDENT and THE BROODMOTHER, and the states both run: patrol, investigate, chase, search, attack, recover. - **`NOISE`** — the interface between what a player *does* and what a monster *hears*. A system emits a noise id; the monster AI turns it into a reach. Nothing else may write a raw radius. - **`SPIDERS`** — the baby-spider event: five presses, six seconds, the slow-motion tutorial, the prompts, the damage. - **`ENDLESS`** / **`endlessDifficultyFor(floor)`** — Endless Nightmare, and a floor number that never stops climbing. - **`MODES`**, **`MAX_PLAYERS`**, **`DATA`** — the game modes and the keys shared state lives under. ## Who calls it Every slice: the house builder, both monsters, the survival systems, the interface and the audio director. Every component that runs in play reads its numbers from here rather than carrying its own copy.
▲ 0↑ born
backing path · game/house/HouseBuilder.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.