[PR #421] [MERGED] Pixelforge 0.8.0: interiors, beds, rooms and floors (#420) #959

Closed
opened 2026-10-20 17:32:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/421
Author: @kolacheee
Created: 8/18/2026
Status: ✅ Merged
Merged: 8/18/2026
Merged by: @kolacheee

Base: staging ← Head: feat/pixelforge-rooms-beds


📝 Commits (10+)

  • bb7d9eb feat(pixelforge): a vista beat that exercises the host's narration-collapse request
  • a7b37ef chore(pixelforge): merge staging (0.7.0 shipped) and open 0.8.0
  • 5e5dda9 feat(pixelforge): see through a roof you are standing under
  • 50c9fc8 feat(pixelforge): tall buildings and a sanctuary you can walk into
  • d12c05f refactor(pixelforge): drop the narration-collapse CSS workaround
  • 862ff81 refactor(pixelforge): key the keeper tier on holding a building, not on being an elder
  • f0a22e4 feat(pixelforge): homes and shops you can enter, and beds to find people in
  • 8fe95f3 feat(pixelforge): bedrooms, guest rooms and bunks
  • fa5b50b feat(pixelforge): families keep their bedrooms, and an inn is built to a capacity
  • 3962634 feat(pixelforge): a workplace is a home, and everyone gets a bed

📊 Changes

20 files changed (+6261 additions, -480 deletions)

View changed files

➕ artifacts/pixelforge-0.8.0.zip (+0 -0)
📝 packages/pixelforge/atlas.json (+8 -1)
📝 packages/pixelforge/build/build-art.mjs (+78 -0)
📝 packages/pixelforge/client.js (+1534 -200)
📝 packages/pixelforge/docs/brief-schema.md (+80 -11)
📝 packages/pixelforge/manifest.json (+9 -9)
📝 packages/pixelforge/src/00-prelude.js (+4 -0)
📝 packages/pixelforge/src/10-art.js (+94 -0)
📝 packages/pixelforge/src/18-brief.js (+19 -4)
📝 packages/pixelforge/src/20-world.js (+1237 -111)
📝 packages/pixelforge/src/25-schedule.js (+36 -7)
📝 packages/pixelforge/src/30-sim.js (+39 -0)
📝 packages/pixelforge/src/40-render.js (+51 -1)
📝 packages/pixelforge/src/55-maps-export.js (+8 -1)
📝 packages/pixelforge/src/70-hud.js (+25 -75)
📝 packages/pixelforge/src/90-element.js (+20 -0)
📝 packages/pixelforge/test-brief.mjs (+3018 -59)
📝 packages/pixelforge/tiles-sci-fi-colony.png (+0 -0)
📝 packages/pixelforge/tiles.png (+0 -0)
📝 scripts/build-pixelforge-package.mjs (+1 -1)

📄 Description

Linked issue

Closes #420

Why this change

0.7.0 sent NPCs somewhere to rest at night, but there was nowhere to go: dwellings were facades, so a resident's "home" was a box on their own doorstep. The player watched the settlement pace outside its front doors until dawn. This release makes living visible — you can walk into a house at night and find people asleep in beds.

What changed

Interiors. Dwellings and shops become real rooms, entered through the door that already existed. A shop is deliberately not an empty room — counter, stock, and the owner working behind it; an empty shop reads worse than a locked door.

Rooms. A generic partitioner subdivides an interior into rooms with wall runs and doors, dispatching furnishing to a per-purpose table. Bedrooms are its first and only consumer today; kitchens and workshops later are a descriptor plus a furnisher, not a signature change. Rooms are partitions, not zones — a six-person household must not add four zones.

Beds and bunks. One sleeping place per resident. Houses get 1–2 beds a bedroom, inns get guest rooms of 1–4, and an interior whose sleepers outrun its rooms becomes an open dormitory — inferred, so an orphanage or a barracks needs no new brief field. Bunks are driven by density and arrangement, never by who is sleeping: an orphanage of children and a barracks of adults compile to identical tiles, and the cast kind is never threaded into the sleeping layout at all.

A housing model that adds up. A tradesman lives and works in the same building with their family, so one household costs one building. A guard post and a hall are duty stations — nobody lives there, and their owners keep ordinary houses. Housing is then derived from who still needs it. This fixed a real failure: with a five-person cast and three trades, nobody on an outpost or hamlet had a bed at all (0/5), because specials consumed every lot. Now 5/5 at every scale.

Owner's quarters. A building that houses its owner reserves them a private room — an innkeeper should not be bunked in with her own staff, nor sleep in a let room. Where the two conflict, everyone having somewhere to sleep outranks the owner having privacy.

Floors. Upper storeys and cellars as zones joined by stair pairs, ids derived from the parent and capped at one up and one down. Upper storeys are gated (the inn always; a house only at 4+ sleepers or a merged block) because that gate is what keeps zone count in hand. Cellars: workshop and inn always, houses by prosperity. The sanctuary gets a bell tower.

A church, tall buildings (height was previously all roof — every body row was already solid wall, just hidden under it), and a transparency bubble so a roof stops swallowing the player standing under an eave — about 62 walkable-but-roofed tiles per settlement, broken since buildings gained overhangs.

Pre-existing bugs fixed along the way: a settlement's wilds arrival tile was never reserved from tree scatter, so a trunk could land exactly where the portal delivers the player (24 unwalkable arrivals in 960 worlds); an interior place that never claimed a building lot compiled a named, NPC-populated room with no door in either direction; and the stock cozy-village innkeeper had been sleeping on the floor of her own inn.

Package and security impact

  • Affected package IDs: pixelforge only.
  • Engine compatibility: unchanged (2.4.3 ≤ v < 4.0.0). No new permissions or entrypoints.
  • No save-format change and zero new save fields. Placement re-derives from the already-saved clock; new zone ids are additive, so every existing save still resolves, and the restore path lands the player at spawn if a saved zone no longer exists.
  • World Maps: a building is ONE location. Named brief places export exactly one row each, as before; every generated dwelling, shop and sub-floor is excluded. Exported row counts are unchanged. This matters because that route is additive with no delete.
  • Catalog: unchanged — pixelforge is marked incomplete (#410), so its rebuild writes no catalog entry.

Validation

  • node packages/pixelforge/test-brief.mjs passes — brief validator + compiler: all cases passed
  • Prettier and ESLint clean on every packages/pixelforge/src/*.js
  • client.js sha256 and byte count match manifest.json (all 11 entries verified)
  • Determinism: same seed + brief rebuilds byte-identically
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Live-playtested in a running Engine twice during development — the church, the tall facade, the transparency bubble, the cutscene seam and the daypart schedules were confirmed on screen by the maintainer.

Not yet seen on screen: stairs, cellars, the bell tower, the reshaped inn, and the bunk / stairsUp / stairsDown / bell tiles. Geometry, reachability and occupancy are proven headlessly; legibility is not. Bunks in particular are functionally correct (both berths slept in, every sleeper individually talk-targetable) but hard to read at 16px — recorded for the art pass rather than fixed here.

Every behavior added in this release was verified by breaking it and confirming a real assertion fires — 28 mutations on the sleeping/housing work, 15 on floors. Three tests passed for the wrong reason during development and were rewritten: one counted wall tiles instead of proving enclosure, one would have passed against the very bug it was written for, and one swept only where NPCs happened to land and survived the rule being deleted.

z1 exteriors are byte-identical across the interiors, rooms and floors work. The housing model does move buildings — fewer are built — which is quantified in the commits and is acceptable while the package is unlisted.

Documentation impact

  • Updated packages/pixelforge/docs/brief-schema.md — the new sanctuary place kind, the interiors and housing arithmetic in §4.5, and §8's "one building, one location". The old spec described a residential-filler formula the compiler never implemented.
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

Screenshots from the mid-development playtests are in the linked issue thread. The floors work has no screenshots yet — see the note above.

Summary by CodeRabbit

  • New Features
    • Added sanctuaries and expanded interiors with bedrooms, bunks, shelves, altars, bells, stairs, upper floors, cellars, belfries, and richer furnishings.
    • Improved housing, resident schedules, sleeping locations, work areas, and innkeeper behavior.
    • Added roof visibility around the player and an introductory cutscene caption.
    • Added support for exposed facades and windows.
  • Bug Fixes
    • Improved household allocation and resident handling.
    • Prevented private rooms and arrival areas from being used incorrectly.
    • Excluded designated interior zones from World Maps exports.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/421 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/18/2026 **Status:** ✅ Merged **Merged:** 8/18/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/pixelforge-rooms-beds` --- ### 📝 Commits (10+) - [`bb7d9eb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bb7d9eb0c4f4d76e43cd4dd9a03ece22f45c6957) feat(pixelforge): a vista beat that exercises the host's narration-collapse request - [`a7b37ef`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a7b37ef142b377f360defa4602cb6edaee769f95) chore(pixelforge): merge staging (0.7.0 shipped) and open 0.8.0 - [`5e5dda9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5e5dda99b0236b03912577da88a1fcb4e765a13e) feat(pixelforge): see through a roof you are standing under - [`50c9fc8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/50c9fc8736f4ba08534ef60b3c3b3667e1985486) feat(pixelforge): tall buildings and a sanctuary you can walk into - [`d12c05f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d12c05fa6e20343e396a60bb795ea8b5fdc100ff) refactor(pixelforge): drop the narration-collapse CSS workaround - [`862ff81`](https://github.com/Pasta-Devs/Marinara-Agents/commit/862ff813aed6082e06101152fae2e656cc33b90c) refactor(pixelforge): key the keeper tier on holding a building, not on being an elder - [`f0a22e4`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f0a22e434005789208e8ca3dfd358f6ff74c1f70) feat(pixelforge): homes and shops you can enter, and beds to find people in - [`8fe95f3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8fe95f333f027dccb70be2bb854afc64e034e21d) feat(pixelforge): bedrooms, guest rooms and bunks - [`fa5b50b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fa5b50b4abb5d453f82e5320994ed9f7c2d11c7f) feat(pixelforge): families keep their bedrooms, and an inn is built to a capacity - [`3962634`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3962634232769960d3159fc41a84b0d695dddcd0) feat(pixelforge): a workplace is a home, and everyone gets a bed ### 📊 Changes **20 files changed** (+6261 additions, -480 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/pixelforge-0.8.0.zip` (+0 -0) 📝 `packages/pixelforge/atlas.json` (+8 -1) 📝 `packages/pixelforge/build/build-art.mjs` (+78 -0) 📝 `packages/pixelforge/client.js` (+1534 -200) 📝 `packages/pixelforge/docs/brief-schema.md` (+80 -11) 📝 `packages/pixelforge/manifest.json` (+9 -9) 📝 `packages/pixelforge/src/00-prelude.js` (+4 -0) 📝 `packages/pixelforge/src/10-art.js` (+94 -0) 📝 `packages/pixelforge/src/18-brief.js` (+19 -4) 📝 `packages/pixelforge/src/20-world.js` (+1237 -111) 📝 `packages/pixelforge/src/25-schedule.js` (+36 -7) 📝 `packages/pixelforge/src/30-sim.js` (+39 -0) 📝 `packages/pixelforge/src/40-render.js` (+51 -1) 📝 `packages/pixelforge/src/55-maps-export.js` (+8 -1) 📝 `packages/pixelforge/src/70-hud.js` (+25 -75) 📝 `packages/pixelforge/src/90-element.js` (+20 -0) 📝 `packages/pixelforge/test-brief.mjs` (+3018 -59) 📝 `packages/pixelforge/tiles-sci-fi-colony.png` (+0 -0) 📝 `packages/pixelforge/tiles.png` (+0 -0) 📝 `scripts/build-pixelforge-package.mjs` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #420 ## Why this change 0.7.0 sent NPCs somewhere to rest at night, but there was nowhere to go: dwellings were facades, so a resident's "home" was a box on their own doorstep. The player watched the settlement pace outside its front doors until dawn. This release makes living visible — you can walk into a house at night and find people asleep in beds. ## What changed **Interiors.** Dwellings and shops become real rooms, entered through the door that already existed. A shop is deliberately not an empty room — counter, stock, and the owner working behind it; an empty shop reads worse than a locked door. **Rooms.** A generic partitioner subdivides an interior into rooms with wall runs and doors, dispatching furnishing to a per-purpose table. Bedrooms are its first and only consumer today; kitchens and workshops later are a descriptor plus a furnisher, not a signature change. Rooms are **partitions, not zones** — a six-person household must not add four zones. **Beds and bunks.** One sleeping place per resident. Houses get 1–2 beds a bedroom, inns get guest rooms of 1–4, and an interior whose sleepers outrun its rooms becomes an open dormitory — inferred, so an orphanage or a barracks needs no new brief field. **Bunks are driven by density and arrangement, never by who is sleeping**: an orphanage of children and a barracks of adults compile to identical tiles, and the cast kind is never threaded into the sleeping layout at all. **A housing model that adds up.** A tradesman lives and works in the same building with their family, so one household costs one building. A guard post and a hall are *duty stations* — nobody lives there, and their owners keep ordinary houses. Housing is then derived from who still needs it. This fixed a real failure: with a five-person cast and three trades, **nobody on an outpost or hamlet had a bed at all** (0/5), because specials consumed every lot. Now 5/5 at every scale. **Owner's quarters.** A building that houses its owner reserves them a private room — an innkeeper should not be bunked in with her own staff, nor sleep in a let room. Where the two conflict, everyone having somewhere to sleep outranks the owner having privacy. **Floors.** Upper storeys and cellars as zones joined by stair pairs, ids derived from the parent and capped at one up and one down. Upper storeys are gated (the inn always; a house only at 4+ sleepers or a merged block) because that gate is what keeps zone count in hand. Cellars: workshop and inn always, houses by prosperity. The sanctuary gets a **bell tower**. **A church**, tall buildings (height was previously all roof — every body row was already solid wall, just hidden under it), and a **transparency bubble** so a roof stops swallowing the player standing under an eave — about 62 walkable-but-roofed tiles per settlement, broken since buildings gained overhangs. **Pre-existing bugs fixed along the way:** a settlement's wilds arrival tile was never reserved from tree scatter, so a trunk could land exactly where the portal delivers the player (24 unwalkable arrivals in 960 worlds); an interior place that never claimed a building lot compiled a named, NPC-populated room with no door in either direction; and the stock cozy-village innkeeper had been sleeping on the floor of her own inn. ## Package and security impact - Affected package IDs: `pixelforge` only. - Engine compatibility: unchanged (2.4.3 ≤ v < 4.0.0). No new permissions or entrypoints. - **No save-format change and zero new save fields.** Placement re-derives from the already-saved clock; new zone ids are additive, so every existing save still resolves, and the restore path lands the player at spawn if a saved zone no longer exists. - **World Maps:** a building is ONE location. Named brief places export exactly one row each, as before; every generated dwelling, shop and sub-floor is excluded. Exported row counts are unchanged. This matters because that route is additive with no delete. - Catalog: unchanged — `pixelforge` is marked incomplete (#410), so its rebuild writes no catalog entry. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [x] `node packages/pixelforge/test-brief.mjs` passes — `brief validator + compiler: all cases passed` - [x] Prettier and ESLint clean on every `packages/pixelforge/src/*.js` - [x] `client.js` sha256 and byte count match `manifest.json` (all 11 entries verified) - [x] Determinism: same seed + brief rebuilds byte-identically - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Live-playtested in a running Engine twice during development — the church, the tall facade, the transparency bubble, the cutscene seam and the daypart schedules were confirmed on screen by the maintainer. **Not yet seen on screen:** stairs, cellars, the bell tower, the reshaped inn, and the `bunk` / `stairsUp` / `stairsDown` / `bell` tiles. Geometry, reachability and occupancy are proven headlessly; legibility is not. Bunks in particular are functionally correct (both berths slept in, every sleeper individually talk-targetable) but hard to read at 16px — recorded for the art pass rather than fixed here. Every behavior added in this release was verified by **breaking it and confirming a real assertion fires** — 28 mutations on the sleeping/housing work, 15 on floors. Three tests passed for the wrong reason during development and were rewritten: one counted wall tiles instead of proving enclosure, one would have passed against the very bug it was written for, and one swept only where NPCs happened to land and survived the rule being deleted. `z1` exteriors are byte-identical across the interiors, rooms and floors work. The housing model does move buildings — fewer are built — which is quantified in the commits and is acceptable while the package is unlisted. ## Documentation impact - [x] Updated `packages/pixelforge/docs/brief-schema.md` — the new `sanctuary` place kind, the interiors and housing arithmetic in §4.5, and §8's "one building, one location". The old spec described a residential-filler formula the compiler never implemented. - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) Screenshots from the mid-development playtests are in the linked issue thread. The floors work has no screenshots yet — see the note above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added sanctuaries and expanded interiors with bedrooms, bunks, shelves, altars, bells, stairs, upper floors, cellars, belfries, and richer furnishings. * Improved housing, resident schedules, sleeping locations, work areas, and innkeeper behavior. * Added roof visibility around the player and an introductory cutscene caption. * Added support for exposed facades and windows. * **Bug Fixes** * Improved household allocation and resident handling. * Prevented private rooms and arrival areas from being used incorrectly. * Excluded designated interior zones from World Maps exports. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#959
No description provided.