fix(portal): synchronize destination presentation state

This commit is contained in:
Erik 2026-07-16 21:17:13 +02:00
parent 4b1bceefbb
commit e95f55f25b
42 changed files with 2815 additions and 288 deletions

View file

@ -44,6 +44,76 @@ Copy this block when adding a new issue:
---
## #218 — Portal silhouette pose, destination reveal, and indoor observer snap
**Status:** IN-PROGRESS — root fixes implemented 2026-07-16; pending connected visual gate
**Severity:** HIGH
**Filed:** 2026-07-16
**Component:** portal VFX / streaming / physics / outbound movement
**Description:** The purple player silhouette in portal space sampled the tail
of the recall action instead of the finished Ready pose. Some outdoor exits
briefly revealed grey/unloaded landblocks during the view-plane zoom. A retail
observer watching acdream enter a dungeon saw movement while commands were
active, but stopping snapped acdream back to the dungeon entrance.
**Root cause / status:** These were three lifecycle truths hidden by the same
portal gate. Hidden entities skipped part-pose composition entirely, so
`HandleEnterWorld` changed the sequence cursor to Ready without publishing that
pose before the zero-time Hidden PES emitted the silhouette. Portal readiness
checked collision residency but not actual mesh/texture render readiness; the
captured destination additionally failed whole landblock builds when dense
procedural scenery exceeded the obsolete 256-id namespace. Finally,
`PhysicsBody.CellPosition` advanced only outdoors: indoor resolves updated the
controller cell but left the canonical outbound frame at the portal entrance.
The implementation now samples Hidden sequence poses without advancing time,
joins render and collision readiness before world reveal, uses a collision-free
`0x8XXYYIII` 4,096-entry scenery namespace, and commits every successful indoor
transition's full cell/frame before movement serialization. Render readiness
tracks both static GfxObjs and EnvCell shell geometry through completed WB
uploads and requires the complete priority ring to be Near-tier. Stale worker
completions carry a hard-recenter generation, so even overlapping old loads and
unloads cannot overwrite the replacement window. A Near load demoted before
its first publication is converted to the equivalent terrain-only Far payload
instead of leaving a hole. Mesh upload no longer manufactures a second logical
owner; static and synthetic EnvCell geometry pins release symmetrically, while
zero-owner late uploads stay evictable. EnvCell publication replays its
schema-aware preparation request after those pins are installed, closing an
eviction race without routing synthetic ids through generic GfxObj decode. The
bounded CPU cache retains texture payloads and re-stages evicted meshes exactly
once instead of returning a never-uploaded or blank cache hit. A self-contained
promotion that supersedes a queued Far load now publishes directly as a real
Near landblock, so readiness cannot wait forever for a base the streamer
intentionally cancelled; later Far completion cannot overwrite that Near tier.
Near-to-Far now tears down the full Near-only App/Core layer while preserving
terrain, and repeated current-generation Near completions are ignored before
they can duplicate statics, scripts, pins, or callbacks. Static collision is
removed by owner before prefix cleanup, including footprints flooded across a
landblock seam, while server-live/dynamic registrations remain refloodable.
Full unload uses the same owner rule; surviving owners seeded across the seam
track withdrawn prefixes so a later reload restores their missing collision
rows.
**Files:** `src/AcDream.Core/Physics/AnimationSequencer.cs`;
`src/AcDream.App/Rendering/GameWindow.cs`;
`src/AcDream.App/Streaming/StreamingController.cs`;
`src/AcDream.App/Streaming/GpuWorldState.cs`;
`src/AcDream.App/Rendering/Wb/LandblockSpawnAdapter.cs`;
`src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs`;
`src/AcDream.Core/World/ProceduralSceneryIdAllocator.cs`;
`src/AcDream.Core/Physics/PhysicsBody.cs`;
`src/AcDream.App/Input/PlayerMovementController.cs`.
**Research:** `docs/research/2026-07-16-portal-completion-pseudocode.md`.
**Acceptance:** Recall/portal Hidden particles outline the finished standing
pose; outdoor exits reveal only fully rendered terrain/scenery; and a retail
observer sees acdream run and stop repeatedly inside a dungeon without any
snap back to the entrance.
---
## #217 — Character windows did not receive live 64-bit experience updates
**Status:** DONE — 2026-07-13, connected gate user-confirmed