Modern open-source C# .NET 10 Asheron's Call client. Faithful port of retail client behaviour to Silk.NET with a plugin API.
Two linked issues both rooted in skipping parts of the retail physics chain. ## 1. Remote staircase on slopes — Euler never integrated between UPs TickAnimations called rm.Body.update_object(now) for remote integration, but PhysicsBody.update_object gates on MinQuantum = 1/30s (retail FUN_00515020 early-return). At our 60fps render tick (~16 ms), deltaTime < MinQuantum on almost every frame → early return AND LastUpdateTime never advances → position effectively never integrates. Remote Position changed only on UP hard-snap, producing visible teleport strides uphill (the "staircase" the user reported). Fix: call UpdatePhysicsInternal(dt) directly for the remote tick — the same pattern PlayerMovementController.cs:358 uses for the local player. Wire ResolveWithTransition in afterwards so the remote's Euler-advanced position gets swept through the same retail collision chain (find_env_collisions + find_obj_collisions + step_down + 6-path BSP dispatcher) that the local player already goes through. New field RemoteMotion.CellId tracks the remote's cell across frames; set from UpdatePosition.p.LandblockId and updated from transition output. ## 2. Local player floating on downhill slopes — ContactPlane not persisted Running a character down a slope faster than ~0.5 m/s vertical: per-frame Euler moves feet horizontally (no Z component since velocity is world-XY). After Euler, feet are above the new-XY terrain. ValidateWalkable takes the "above surface" branch without setting a contact plane, DoStepDown probes ~4 cm down (the retail StepDownHeight default), fails to find the surface 8-10 cm below, and the character stays at the old Z. Over a sustained descent this accumulates into a visible hover. Retail's PhysicsObj carries ContactPlane + ContactPlaneCellID as persistent fields (ACE PhysicsObj.cs:2598-2604 get_object_info → InitContactPlane). Each transition call seeds CollisionInfo.ContactPlane from the previous frame's plane. That seed is what lets AdjustOffset project horizontal velocity onto the slope surface — so the Euler offset acquires a Z component matching the slope and the sphere tracks terrain without needing step-down to do the catch-up every frame. Fix: add PhysicsBody.ContactPlane* fields mirroring PhysicsObj's. Extend ResolveWithTransition with an optional `body` parameter; when provided, seed the transition's CollisionInfo from body.ContactPlane at the start, copy back (preferring current, falling back to LastKnown) at the end. Both local (PlayerMovementController) and remote (TickAnimations) pass their body. Verified live: DIAG samples showed pre/post/resolved Z all exactly equal before the MinQuantum bypass (Euler frozen). After bypass, deltas dropped to floating-point noise on slopes for remotes. Local hover on downhill resolved in separate visual pass. All 717 tests green. No API breaks (ResolveWithTransition's body param is optional, backwards-compatible). Cross-refs: - decompile: FUN_00515020 update_object, FUN_005111D0 UpdatePhysicsInternal, FUN_005148A0 transition init - ACE: PhysicsObj.cs:2586-2621 get_object_info, Transition.cs:613-620 InitContactPlane Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| docs | ||
| memory | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| AcDream.slnx | ||
| CLAUDE.md | ||
| README.md | ||
acdream
Experimental modern open-source Asheron's Call client in C# / .NET 10.
Status: pre-alpha, not playable. Phase 0 only — dat file asset inventory.
Stack: .NET 10, Chorizite.DatReaderWriter for dat parsing. Silk.NET + Avalonia planned for rendering/UI (not yet wired up).
Requires: A retail Asheron's Call install (Turbine/Microsoft property — supply your own). Set ACDREAM_DAT_DIR environment variable to the directory containing client_portal.dat, client_cell_1.dat, client_highres.dat, and client_local_English.dat, or pass it as the first CLI argument.
Layout
src/AcDream.Cli/— console app that dumps asset counts from a dat directoryreferences/— local read-only reference material (ACE, ACViewer, WorldBuilder, DatReaderWriter, holtburger, retail AC install). Gitignored.
Run
dotnet run --project src/AcDream.Cli -- "C:\path\to\Asheron's Call"
Or set ACDREAM_DAT_DIR and run without args.