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.
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 isHALL, and is built by the scene skeleton, not here.DOORS— a doorway is declared by(a, side, at, other): roomacuts an opening on the wall named byside, centred atatmeasured 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 = truemarks 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()— everyhide_<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.
Scoped to this part · feeds back into the world's score.