docs(issues): #147 city/perimeter walls FIXED (9743537); correct premise + re-scope terrain residual

The "#145 far-town frame" premise was wrong: #146's bldOrigin probe proved
Arwic buildings are correctly framed. The walls were portal-less buildings
skipped by the collision cache; the terrain-3%-grounded sub-question is
re-scoped LOW (no fall-through observed; likely a contactPlaneValid nuance).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-24 16:25:23 +02:00
parent 9743537e62
commit 2b48310c2a

View file

@ -48,20 +48,22 @@ Copy this block when adding a new issue:
## #147 — Far-town (Arwic) collision broken at login: terrain barely grounds + city/perimeter walls never block ## #147 — Far-town (Arwic) collision broken at login: terrain barely grounds + city/perimeter walls never block
**Status:** OPEN **Status:** 🟡 city/perimeter walls **FIXED + user-verified** (`9743537`, 2026-06-24); terrain-grounding sub-question OPEN but re-scoped LOW (likely not a real defect).
**Severity:** HIGH (collision largely absent in far towns; #145-frame family) **Severity:** MEDIUM (walls were the HIGH part — fixed; terrain residual unverified)
**Filed:** 2026-06-24 **Filed:** 2026-06-24
**Component:** physics — far-town streaming-relative collision frame (#145 family) **Component:** physics — building collision-shell registration (walls); far-town terrain grounding (residual)
**Description (user-observed 2026-06-24):** In Arwic (a far town reached via the Town Network), the city/perimeter walls have NO collision even on a FRESH login there — not portal-churn, it's fundamental. Buildings' own collision channel does fire (`[bldg-channel]` emits at Arwic), but the player walks through the city walls and the terrain barely grounds. Distinct from #146 (which is portal-in-only at Holtburg). **Description (user-observed 2026-06-24):** In Arwic (a far town), the city/perimeter walls had NO collision even on a FRESH login (you walked straight through them); houses blocked fine. The `ACDREAM_CAPTURE_RESOLVE` capture also showed the player grounded only **3%** of resolves at Arwic vs **100%** at Holtburg.
**Root cause (capture-confirmed symptom; #145-family root):** The `ACDREAM_CAPTURE_RESOLVE` capture (`a-wall-resolve.jsonl`, 255,832 player resolves) shows the player is grounded only **3% of resolves at Arwic (0xC6A9)** vs **100% at Holtburg/dungeon** — the terrain collision query misses the ground almost entirely (the player doesn't fall only because zero-move resolves return the "no terrain loaded → pass-through" branch instead of a contact plane). This is the streaming-relative-frame misalignment at a far town: positions are stored relative to `_liveCenter`, the far-town frame/origin is wrong, so terrain + static-wall collision queries hit the wrong place. The physics digest already names the fix as **#145 Option B** — port retail's cell-relative `Position` frame and make `_liveCenter` render-only (multi-commit, brainstorm-gated). The city-perimeter-wall static class may also need its own collision-registration check. **⚠️ Premise corrected — this was NOT the #145 far-town frame.** #146's `bldOrigin` probe proved Arwic *buildings* are correctly framed (anchored ~12 m from the player, not km off). So the streaming frame works fine at far towns; the walls were a different, tractable bug.
**Files:** `src/AcDream.Core/Physics/CellTransit.cs` (outdoor pick + `TryGetTerrainOrigin` frame), `src/AcDream.Core/Physics/PhysicsEngine.cs` (terrain sample/frame), `src/AcDream.App/Rendering/GameWindow.cs` (`_liveCenter` placement seam). **Root cause — CITY WALLS (FIXED `9743537`):** a town perimeter wall is stored in `LandBlockInfo.Buildings` as a **doorless shell**`Issue147ArwicBuildingsDumpTests` shows **16 of Arwic's 30 buildings are portal-less**, ringing the town at 24 m intervals (x=12/132, y=12/108). The building-collision cache loop **skipped them**`if (building.Portals.Count == 0) continue;` (a filter meant only for the transit/entry feature, `CellTransit.CheckBuildingTransit`) — so their collision shell was never registered, even though retail's `find_building_collisions` (0x006b5300) tests the shell BSP independent of the portal list. Fix: cache portal-less buildings too (empty portal list, shell BSP intact). User-verified: walls now block (`Collided`/`Slid`).
**Research:** capture `a-wall-resolve.jsonl` (Arwic 3% grounded vs Holtburg 100%); `claude-memory/project_physics_collision_digest.md` #145 banner; `docs/research/2026-06-21-145-cell-relative-physics-frame-handoff.md`. **SCOPE AS A BRAINSTORMED #145 SUB-PHASE — not a one-commit fix; no guess-patches (DO-NOT-RETRY collision area).** **Root cause — TERRAIN 3% GROUNDED (OPEN, LOW):** a SEPARATE question, NOT confirmed as a real defect. The player never falls through Arwic terrain (z stable); the low `contactPlaneValid` rate is plausibly a flag/measurement nuance (server-held z + settled zero-move resolves not re-setting a contact plane) rather than missing terrain collision. Before treating it as a bug: re-capture `ACDREAM_CAPTURE_RESOLVE` at Arwic post-wall-fix and check jump/slope feel. If it IS real, it's #145 cell-relative-frame territory.
**Acceptance:** in a far town (Arwic), terrain grounds like Holtburg (~100% of resolves) and city/perimeter walls block — matching retail. **Files:** `src/AcDream.App/Rendering/GameWindow.cs` (building-cache loop ~6958, portal-less skip removed); `tests/AcDream.Core.Tests/Physics/Issue147ArwicBuildingsDumpTests.cs` (dat fixture). Terrain residual: `CellTransit.cs` / `PhysicsEngine.cs` frame.
**Acceptance:** city/perimeter walls block in far towns — **DONE**. Terrain-grounding residual: confirm whether it's a real defect before acting.
--- ---