Add walkable housing interiors and cross-hub visitors

This commit is contained in:
dingo
2026-09-10 10:48:26 -04:00
parent b2dd2cb3ba
commit 1bd5d487e2
28 changed files with 721 additions and 52 deletions
+4 -3
View File
@@ -36,8 +36,8 @@ The highest-risk requirements are:
Planning update: the vision now includes corpse-based item/spell resurrection,
key-owned hub housing, crafting rolls/provenance, and portal dungeon instances.
Milestone 7 now implements corpse resurrection for new deaths. Milestone 8b adds
key-owned housing documents and floor-plan controls; walkable interiors and portal
dungeon instances remain. See
key-owned housing documents and floor-plan controls; 8c adds walkable interiors
and leased cross-hub visitor presence. Portal dungeon instances remain. See
`planning/SYSTEMS-ROADMAP.md` for future lifecycle rules and unresolved details.
The milestone 1 [lifecycle and ownership contract](LIFECYCLE-OWNERSHIP.md) maps the
current code to proposed states, transaction boundaries, and migration steps.
@@ -52,7 +52,8 @@ house documents and key ledgers serialize storage/permission/key changes with
the fenced character snapshot, so all hubs access the same retained contents.
The three-second action destroys a key; only completion removing the last valid
key archives a house. Recovery and purge follow the recorded creator death world.
See [milestone 8b](MILESTONE-8B.md) for the concrete interface, bounds, and defaults.
See [milestone 8b](MILESTONE-8B.md) for the lifecycle and [8c](MILESTONE-8C.md) for
indoor movement, rendering, visitor consistency, bounds, and manual tests.
Clients submit bounded intents. The server determines speed, terrain height,
range, cooldown, inventory changes, damage, death, play-time, and passage eligibility.
Movement is interpolated on the client; full prediction/reconciliation is deferred.
+2 -1
View File
@@ -139,7 +139,8 @@ neither an escape item nor a hub switch supplies a fresh allowance.
Implementation checkpoint: [milestone 8b](MILESTONE-8B.md) now implements these
transactions and permission rules with floor-plan controls. Its provisional rules
resolve the open interruption, eligibility, invitation, and occupant choices below
for playtesting. Walkable interiors remain outstanding. The stored state name for
for playtesting. [Milestone 8c](MILESTONE-8C.md) adds walkable interiors and visitor
presence while preserving these ownership boundaries. The stored state name for
`archived_recoverable` is `archived`.
Proposed house states: `active -> archived_recoverable -> purged`.
+3
View File
@@ -1,5 +1,8 @@
# Milestone 8b: housing controls and lifecycle checkpoint
Follow-up: [8c](MILESTONE-8C.md) adds walkable interiors and updates Escape to close
the controls while staying inside. Use Return to hub or the door to leave.
This checkpoint adds usable housing ownership, storage, permissions, and recovery
alongside [8a's world building](MILESTONE-8A.md). Housing is presented as an
interactive floor plan. Walkable 3D interiors, furniture models, in-room avatars,
+80
View File
@@ -0,0 +1,80 @@
# Milestone 8c: walkable house interiors
This wraps the first playable building/housing milestone with a 3D indoor view,
authoritative indoor movement, furniture collision, jumping, visible visitors,
and controller-accessible placement controls. The [8b ownership, storage, key,
permission and recovery rules](MILESTONE-8B.md) continue to apply. The separate
[shared XP curve update](XP-CURVE.md) is already committed and pushed.
## Controls
Enter through Inventory → Housing & keys. Entry closes the controls and shows
the house interior. **WASD, the left stick, or touch movement buttons** walk;
Space/controller jump uses the existing binding. Clicking the floor walks toward
that point. Walls and furniture block movement; jump onto tables and chests.
Click furniture to open its controls. **I**, the controller inventory/gather
binding, or **House controls** opens the floor plan, storage, and permissions.
**Escape now closes the focused controls while you stay in the house.** Choose
**Return to hub**, or click the green exit door, to leave. These have no distance
requirement in this first build. Disconnect/restart and daily-cap eviction still
return you to your saved hub position. No house action grants experience.
Furniture placement/movement uses the floor-plan controls. On a controller,
D-pad up/down changes focus; left/right changes selected choices and numeric
coordinates; the primary button activates buttons. Cancel closes the menu.
Coordinates move in half-metre increments. This is controller form placement,
not a free-moving 3D placement preview. Text naming still uses text input.
## Authoritative room and visitors
Go retains a separate indoor position; the character's hub position is preserved
for exit. Clients send bounded movement/jump intents, never indoor coordinates.
Simulation substeps prevent tunneling through narrow furniture on delayed ticks.
The saved indoor position is checked against the latest committed furniture
layout. If a furniture edit encloses a player, they move to a clear floor position;
if no position exists they return to the hub. A completely blocked room rejects
new entry. Characters do not collide with other characters in this slice.
House geometry and visitor snapshots contain no storage inventories or account
identities. Current local positions are emitted each snapshot. Visitors entering
the same house from different hub processes are visible through a leased database
presence heartbeat, normally refreshed within about one second and expired after
five seconds without updates. Each original world remains the sole owner and
simulator of its characters. No cloned living characters are created. Cross-hub
presence is eventually consistent; it is not a new shared simulation process.
House mutations, membership, presence and world snapshots commit under the existing
world revision fence. Permissions and last-key archive are rechecked before
publishing membership. Furniture geometry is refreshed on save; updates from a
different hub can take a save interval to affect movement collision. Storage and
permission actions continue to read current database state transactionally.
The room uses simple procedural table/chest meshes and the existing player model,
with a cutaway camera and name labels. New production art, advanced animation,
custom room shells, avatar cosmetic/gear presentation polish, and freeform
placement previews are later work. Generated room meshes, labels and textures are
disposed on changes/exit; departed visitors release their labels immediately.
No tested player-capacity claim is increased by adding the visitor view.
## Manual test handoff
1. Enter a house and walk using keyboard/controller. Test walls, table collision,
jumps onto furniture, landing, and click-to-walk. Close a menu with Escape and
verify you remain inside. Use the exit button/door to return to your hub spot.
2. Click a chest, deposit/withdraw items, and move it with floor-plan controls.
Verify stored contents persist and guests remain bound by the six permissions.
3. Enter the same house with an invited player from another hub instance. Check
names and movement appear. Remove the guest invitation and confirm eviction;
disconnect a visitor and confirm their presence disappears.
4. Move furniture into an occupied spot and verify the occupant is relocated
safely. Reconnect or reach the daily cap and verify the hub return.
5. Repeat 8b's non-last/last-key destruction and interrupted-death tests. Ensure
archived houses remove their visitors and never restore previously withdrawn
items on recovery.
Local checks cover indoor collision/jumping, invalid action rejection, saved hub
position, daily limits, cross-hub visitor ownership, revoked access, stale lease
rollback, existing key/recovery lifecycle, TypeScript, production build, and
generated protocol consistency. PostgreSQL integration checks require a configured
test database; browser Playwright remains deferred for manual testing.