Formalize Phase L.2 as the active holistic movement/collision program, align the roadmap and architecture docs, file tactical physics follow-ups, and refresh collision memory away from rewrite-from-zero guidance. Co-authored-by: OpenAI Codex <codex@openai.com>
4.9 KiB
Collision System Port - Status and Plan
Current State (2026-04-29)
The collision system is no longer a pure placeholder and should not be treated as "delete everything and start over." A partial retail transition port exists:
PhysicsEngine.ResolveWithTransitionis the active player movement resolver.BSPQuerycontains a partial retail-style BSP dispatcher.TransitionTypescarries the activeSpherePath,CollisionInfo, transition, step, contact, and partial slide logic.PhysicsDataCacheloads GfxObj, Setup, and CellStruct physics data.ShadowObjectRegistrygives the resolver a broadphase over nearby objects.TerrainSurfaceuses triangle-aware terrain contact.
This foundation is useful, but it is not complete retail collision parity. The project now tracks the remaining work as Phase L.2 - Movement & Collision Conformance:
- Plan:
docs/plans/2026-04-29-movement-collision-conformance.md - Roadmap owner:
docs/plans/2026-04-11-roadmap.md - Tactical follow-ups:
docs/ISSUES.md#30-#34
Durable Lesson
Do not guess at AC physics, movement packets, terrain/cell ownership, or collision constants. The previous patchwork failures came from simplified approximations:
- static overlap instead of swept-sphere transition behavior
- custom object collision instead of retail
CSphere/CCylSphere - incomplete BSP dispatch
- ad-hoc push-out instead of retail slide / edge / precipice handling
- server "no rubber-band" treated as proof of local collision correctness
The named retail decomp is now the primary source. Search
docs/research/named-retail/acclient_2013_pseudo_c.txt by class::method
before using older decompiled chunks or reference repos.
Active Approach
Continue by conformance lanes rather than rewriting blindly:
- Truth & diagnostics (L.2a). Add local placement/contact/cell, object-hit, outbound-packet, server echo, and correction-delta probes.
- Movement wire/contact authority (L.2b). Fix contact byte and full-cell truth before using ACE acceptance as evidence.
- Transition parity (L.2c). Port edge-slide, cliff-slide,
precipice-slide, step-up/down slide, and
NegPolyHitdispatch. - Shape fidelity (L.2d). Finish
CSphere/CCylSpheresemantics, live-entity shapes, and building object identity. - Cell ownership (L.2e). Port
CELLARRAY,find_cell_list,check_other_cells,adjust_check_pos, low-cell updates, andcell_bsp. - Real-DAT and live observer conformance (L.2f). Promote every synthetic case to real-world fixtures and retail-observer checks.
What To Preserve
CollisionPrimitives.cslow-level helpers, while auditing remaining shape gaps against named retail.PhysicsDataCache.csDAT-backed collision data loading.ShadowObjectRegistry.csbroadphase concept.TransitionTypes.csdata structures and partial transition port.BSPQuery.cspartial dispatcher as the current porting surface.PhysicsBody.cs,MotionInterpreter.cs, andPlayerWeenie.csfoundations.
Known Gaps
- Full
CELLARRAYand adjacent-cell ownership are missing. cell_bspis not yet a first-class runtime owner.- Building portal transit and building entry/exit collision are incomplete.
edge_slide,cliff_slide,precipice_slide, andNegPolyHitbehavior are incomplete.- Live entity shape fidelity is simplified.
- Outbound movement contact/cell fields can be overconfident.
- Routine local/server correction diagnostics are missing.
Retail Anchors
Primary:
docs/research/named-retail/acclient_2013_pseudo_c.txtdocs/research/named-retail/acclient.hdocs/research/named-retail/symbols.json
Key names:
CTransition::find_transitional_positionCTransition::transitional_insertCTransition::step_upCTransition::step_downCTransition::edge_slideCTransition::cliff_slideSPHEREPATH::step_up_slideSPHEREPATH::precipice_slideSPHEREPATH::adjust_check_posCTransition::check_other_cellsCObjCell::find_cell_listCPhysicsObj::is_valid_walkableCBuildingObj::find_building_collisionsCCellStruct::sphere_intersects_cellCCylSphere::intersects_sphereCSphere::intersects_sphereCSphere::slide_sphere
Older fallback:
docs/research/decompiled/chunk_00530000.cdocs/research/decompiled/chunk_00500000.cdocs/research/acclient_function_map.md
Reference aids:
references/ACE/Source/ACE.Server/Physics/references/holtburger/for movement wire behaviorreferences/AC2D/for the older client-side movement packet reference
Mandatory Workflow
For every AC-specific function:
- Grep named retail first.
- Cross-reference ACE / holtburger / AC2D where relevant.
- Write readable pseudocode before porting.
- Port faithfully; do not simplify.
- Add conformance tests.
- Integrate surgically into the active L.2 lane.
- Verify with synthetic tests, real-DAT fixtures, and live observer evidence.