diff --git a/docs/research/2026-05-19-indoor-walking-phase2-pickup-prompt.md b/docs/research/2026-05-19-indoor-walking-phase2-pickup-prompt.md index 804a8c4..2b1eb8a 100644 --- a/docs/research/2026-05-19-indoor-walking-phase2-pickup-prompt.md +++ b/docs/research/2026-05-19-indoor-walking-phase2-pickup-prompt.md @@ -60,32 +60,52 @@ back outside through a door works. - #80: 2nd-floor goes very dark (pre-existing lighting issue, may be part of a broader Cluster B lighting phase) -3. Per CLAUDE.md's work-order autonomy rule, YOU pick the next phase. - Candidates ranked by my best guess at priority: +3. **The user has set a focused track: indoor walking issues, collision, + physics, and dungeons.** M2 (kill-a-drudge demo) is explicitly NOT + the next direction. Stay on the indoor-experience track until they + redirect. - A) Indoor lighting cluster (closes #79/#80/#81/#82) — completes the - "indoor feels right" visual story. The wall-blocking is done; the - visible darkness on upper floors and broken atmospheric lighting - indoors is the next thing the player notices. ~1-2 weeks. + Candidates within that scope, ranked by my best guess at priority: - B) Continue M2 critical path — F.2 (Inventory panel), F.3 (Combat - math + damage flow), F.5a (dev panels), L.1c (combat animation), - L.1b (command router). Kill-a-drudge demo. ~6-10 weeks total but - can be sliced per-phase. + A) **#83 — Walking up stairs broken**. Pure indoor/physics. The + retail step-up logic (`CPhysicsObj::step_up`) doesn't yet handle + indoor cell-BSP polys for stair geometry. Unblocks multi-floor + cottages (the 2nd-floor darkness #80 also depends on actually + reaching the 2nd floor) and dungeons (which are multi-level). + Natural follow-on to Phase 2. ~3-5 days. - C) #88 indoor vibration — quick to fix once diagnosed; pre-existing - annoyance. 1-3 commits depending on root cause. + B) **Dungeon stress test + adaptation**. Phase 2's portal traversal + was developed and verified at Holtburg cottage (a small one-room + building). Dungeons (Subway, Mite Burrow, Carved Stone) are + multi-cell indoor spaces with complex portal graphs. Walk a + character into a dungeon and see what breaks. Findings drive a + follow-up scope. ~1-3 days for the test + variable for fixes. - D) Triage docs/ISSUES.md to clear chronic-open items (#2 lightning, - #4 sky horizon-glow, #28 aurora, #29 cloud thinness, #37 humanoid - coat, #41 remote-motion blips). ~1 hour, surfaces what's actually - blocking M2 vs nice-to-have. + C) **#88 — Indoor object vibration** (bookshelves, open furnaces). + Quality bug noticed during Phase 2 testing. Likely a per-frame + transform recompute or EntityScriptActivator re-firing on cell + changes (less likely after Phase 2 stabilized cell tracking but + still possible). ~1-3 commits depending on root cause. - My recommendation: A. Indoor lighting closes the indoor-experience - loop. The user explicitly mentioned darkness as a noticeable issue - during Phase 2 testing, and the diagnostic infrastructure from - Phase 2 is still warm. But pick based on your read of the codebase - + recent commits. + D) **#89 — Port `BSPQuery.SphereIntersectsCellBsp`**. Retail-faithful + entry timing for outdoor→indoor. Phase 2 ships with the documented + ~0.5m late-entry approximation; this closes the gap. Pure physics + polish. ~2-3 days. + + E) **Indoor lighting cluster** (closes #79/#80/#81/#82). Slightly + adjacent — "indoor experience" but not strictly walking/collision. + Worth considering once stairs (A) lands so you can actually reach + the dark 2nd floor to verify lighting fixes. ~1-2 weeks. + + F) **#78 — Outdoor stabs visible through floor**. Visibility/stencil + issue. Render side. Indoor-adjacent. ~3-5 days. + + My recommendation: **A (stairs)**. Reasons: + - Pure indoor physics/collision — squarely in the user's stated track. + - Unblocks both multi-floor cottages AND dungeons (B is gated on it). + - Continues the natural arc from Phase 1 (walls) → Phase 2 (cell + tracking) → Phase 3 (vertical movement / stairs). + - The Phase 2 diagnostic infrastructure is still warm; reuse it. 4. CLAUDE.md rules apply: - No workarounds; fix root causes. @@ -120,14 +140,27 @@ Key files for the next phase (whichever path A/B/C/D you pick): - **`docs/ISSUES.md`** — current OPEN items (note new #88 + #89 from Phase 2). - **`docs/plans/2026-04-11-roadmap.md`** — shipped table; Indoor walking Phase 2 row is most recent. -If picking **Path A (indoor lighting)**: +If picking **Path A (#83 stairs — recommended)**: -- Start by re-reading the existing Cluster B sketches in the original Cluster A handoff: - `docs/research/2026-05-19-indoor-followup-handoff.md` — section "The 9 follow-up issues" lists #79/#80/#81/#82 as Cluster B. -- Lighting code surfaces: `src/AcDream.App/Rendering/GameWindow.cs::UpdateSunFromSky` (indoor branch around line 8330+), `src/AcDream.App/Rendering/Shaders/mesh_modern.frag` (accumulateLights + indoor ambient), `src/AcDream.Core/Lighting/LightInfoLoader.cs`. -- Probe surface: there is no `[lighting]` probe yet — adding one will likely be the first commit in the brainstorm. +- Retail oracle: `docs/research/named-retail/acclient_2013_pseudo_c.txt` — grep `step_up`, `step_sphere_up`, `find_walkable` for the existing logic. Our `BSPQuery` ports these for outdoor terrain at lines 1278+; the indoor analog needs the same flow against `cellPhysics.Resolved` floor-and-stair polys. +- Touchpoints likely: `src/AcDream.Core/Physics/TransitionTypes.cs` (where the new `TryFindIndoorWalkablePlane` lives — extend to handle step-up across vertical floor polys), `src/AcDream.Core/Physics/BSPQuery.cs::FindCollisions` Path 5/6 (which already handles outdoor step-up; needs indoor counterpart). +- Probe surface: `[indoor-bsp]` already captures every cell-BSP query; new probe `[step-up]` may be helpful. + +If picking **Path B (dungeon stress test)**: + +- Pick a small dungeon. Subway (`@0x0102 ...`) or Mite Burrow are good first targets — both are small enough to walk through quickly but complex enough to exercise multi-cell portal traversal. +- Run the launch with all indoor probes enabled (`ACDREAM_PROBE_INDOOR_BSP=1`, `ACDREAM_PROBE_CELL=1`, `ACDREAM_PROBE_CELL_CACHE=1`). Walk through every room. Note any wall-pass-through, stuck states, or cell-tracking failures. +- Findings drive scope. Probably uncovers stair issues (→ Path A) or sphere-vs-cell timing issues (→ #89). If picking **Path C (#88 vibration)**: - Likely candidates from the bug report: `EntityScriptActivator.OnCreate/OnRemove` re-firing on rapid CellId promotion/demotion (now less likely after Phase 2 stabilized cell tracking, but worth investigating); per-frame transform recompute drift on cell-static `WorldEntity` instances; particle-emitter offset accumulation. - File this as a Phase rather than an issue if the root cause turns out to be the per-frame transform pipeline (multi-commit refactor). + +If picking **Path E (indoor lighting)**: + +- Start by re-reading the existing Cluster B sketches in the original Cluster A handoff: + `docs/research/2026-05-19-indoor-followup-handoff.md` — section "The 9 follow-up issues" lists #79/#80/#81/#82 as Cluster B. +- Lighting code surfaces: `src/AcDream.App/Rendering/GameWindow.cs::UpdateSunFromSky` (indoor branch around line 8330+), `src/AcDream.App/Rendering/Shaders/mesh_modern.frag` (accumulateLights + indoor ambient), `src/AcDream.Core/Lighting/LightInfoLoader.cs`. +- Probe surface: there is no `[lighting]` probe yet — adding one will likely be the first commit in the brainstorm. +- **Note:** verify Path A (stairs) lands first or you can't reach the 2nd floor to test indoor lighting at altitude.