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

Endless

The house of **Endless Nightmare**, as data. No geometry, no entities: `plan(floor, seed)` answers what is on a floor and `EndlessDirector` builds it.

by◐aiden·posted 1d ago
What it does

game.house.Endless

The house of Endless Nightmare, as data. No geometry, no entities: plan(floor, seed) answers what is on a floor and EndlessDirector builds it.

local Endless = require("game.house.Endless")
local plan = Endless.plan(3, seed)
plan.cells        -- every room on the floor, by key
plan.stairs       -- the room that leads deeper
plan.difficulty   -- from GameRules.endlessDifficultyFor(floor)
  • plan(floor, seed) — rooms, the doors between them, what each room is, where the supplies are, and which room is the way down. A pure function of (seed, floor), so two peers build the same house from two numbers and nobody sends a layout across the wire, and so a run can be repeated exactly.
  • cellRect(gx, gz) — a room's interior rectangle in world space.
  • cellAt(x, z) — which grid cell a world position is in.
  • openingsFor(cell, rect) — the doorway each side of a cell needs, in the form the wall builder takes.
  • ORIGIN — where the arena sits (2000 m out), well clear of the story house, so a run of one never stands inside the other. The systems slice moves the player here when a run starts.

Connectivity is by construction: a room is only ever added beside a room that already exists, and a loop is occasionally closed so the house can be circled rather than only retraced. There is no sealed pocket, no door that opens onto a wall, and no supply in an unreachable room — they cannot be generated.

Rooms are reusable shapes, not new geometry: a cell is a rectangle with a doorway per neighbour, exactly the shape the twelve hand-built areas use, so the generator and the story house cannot drift apart. There is no final floor; plan answers for any number.

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

rngFor(seed: number, floor: number) → void

A small deterministic generator. A floor is a pure function of (seed, floor), so the same run is reproducible and two peers on the same floor number build the same rooms.

argtypedescription
seednumber
floornumber

key(gx: number, gz: number) → string

argtypedescription
gxnumber
gznumber

key(gx: number, gz: number) → string

argtypedescription
gxnumber
gznumber

cellRect(gx: number, gz: number) → void

The interior rectangle of a cell, in world space.

argtypedescription
gxnumber
gznumber

cellAt(x: number, z: number) → void

Which grid cell a world position is in.

argtypedescription
xnumber
znumber

plan(floor: number, seed: number) → void

Plan one floor: rooms, the doors between them, what each room is, where the supplies are, and which room is the way down.

argtypedescription
floornumber
seednumber

add(gx: number, gz: number) → void

argtypedescription
gxnumber
gznumber

link(a: ?, b: ?, side: string) → void

argtypedescription
a?
b?
sidestring

openingsFor(cell: ?, rect: ?) → void

The opening each side of a cell needs, in the world coordinate the wall builder wants: the centre of that wall.

argtypedescription
cell?
rect?

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.

5+items
▣
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/Endless.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.