The local player now runs server MoveTos through the same verbatim MoveToManager remotes got in V4. One commit, GameWindow + controller, per the no-fan-out rule for coupled slices. P1 gate (V0-pins.md P1, ported verbatim): CPhysics::SetObjectMovement (0x00509690 @0050972e) drops any movement event whose wire autonomous byte is set when the addressed object IsThePlayer - ACE's self-addressed MoveToState reflection (MovementData.cs:162 IsAutonomous=1) never reaches unpack_movement, which is what makes the retail unconditional unpack-head interrupt safe. Gate placed AFTER the sequence gates (retail order). The stale "ACE follows every mt=0x06 with an mt=0x00" comment block dies with the code it excused (its causal story was pre-#75; refuted in V0-pins P1). Run-rate re-anchor (P1 contingency NOT needed - no AD row): the echo tap ApplyServerRunRate is deleted outright. Both retail feeds already exist: PlayerDescription skills via SetCharacterSkills (K-fix7) into InqRunRate (preferred by apply_run_to_command/get_state_velocity), and the mt-6/7 my_run_rate wire write (M13) now performed for the player by the shared RouteServerMoveTo. The tap's InterpretedState.ForwardSpeed overwrite was a pre-R3 mechanism that fought the ported machinery. B.6 auto-walk deleted wholesale (~330 lines): fields, Begin/End/ DriveServerAutoWalk, IsServerAutoWalking, AutoWalkArrived, the autoWalkConsumedMotion gates, the #69 turn-dir edge synthesizer, and the relocated AutoWalkArrivalEpsilon/AutoWalkTurnRateFor constants (AD-26 retired - the invented 5/30-degree bands are gone; arrival is retail's distance predicate; turn-first is the TurnToHeading node). TS-36 retired: Motion.InterruptCurrentMovement binds to MoveTo.CancelMoveTo(ActionCancelled). Movement-key edges (ctor-default params carry the 0x8000 CancelMoveTo bit), Shift (set_hold_run interrupt:true), jump(), StopCompletely, and teleport all cancel a running moveto through the retail chain - verified by controller-level tests, not assumed. MoveToComplete seam WIDENED to natural completion (Core): retail's BeginNextNode empty-queue completion is inline CleanUp+StopCompletely (raw @00529d47) and notifies nothing - the client-addition seam had to fire there (both sticky and non-sticky exits) or AD-27's deferred close-range Use/PickUp re-send never fires. Never fires on CancelMoveTo. AD-27 re-anchored from the deleted AutoWalkArrived event. InstallSpeculativeTurnToTarget rewired through the player's manager (retail 9a/9b client-initiated shape): close-range -> TurnToObject, far -> MoveToObject; AP-23 radius buckets + the #77 CanCharge prediction survive as the params source (row re-anchored). Per-tick: MoveTo.UseTime() at the old DriveServerAutoWalk slot (provisional until R6, per the plan's placement decision); the P4 player-side TargetTracker twin (fields + pre-Update feed) mirrors the remote adapter (AP-79 row widened). HitGround dual-call added on the player landing edge AND the remote landing site - the latter closes a V4 wiring-contract gap the adversarial review caught (retail 2d order: minterp then moveto; without it a landing NPC's moveto never re-arms). Also from the adversarial review: the mt-8 unresolvable-target degrade now performs retail's params.desired_heading = wire_heading substitution (decomp 2f case 8; invisible against ACE per P6, required for the verbatim degrade); the V4 remote MoveToManager binding gets a real curTime clock (the ctor stub advanced 1/30s per READ, skewing the progress/fail-distance windows - note: the pending V4 NPC smoke ran on the skewed clock); TS-33 row extended with the orientation-diff gap (ApproxPositionEqual vs retail Frame::is_equal full-frame compare - a stationary heading snap does not reach the wire; masked against ACE, R7 outbound scope owns the fix). MoveToMath gains HeadingFromYaw/YawFromHeading (the P5 scalar bridge for yaw-authoritative bodies - the player's heading snap must write Yaw, not the quaternion the controller re-derives every frame). Tests: 3,956 green (+8). New: MoveToManagerCompletionSeamTests (arrival fires once with None, no refire, cancel never fires, sticky handoff order) + PlayerMoveToCutoverTests (EnterPlayerModeNow-shape rig: walks to arrival with zero user input and zero MotionStateChanged frames - the #75 invariant by construction; TurnToHeading rotates Yaw and snaps exact; W-edge and jump cancel without firing complete). W6 edge suite retargeted from the deleted echo tap to a direct apply pass (the regression lives in ApplyInterpretedMovement, not the wire trigger). Spec: docs/research/2026-07-03-r4-moveto/r4-port-plan.md section 3 V5. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| .vscode | ||
| docs | ||
| memory | ||
| references | ||
| src | ||
| tests | ||
| tools | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| AcDream.slnx | ||
| analyze_flap_live.py | ||
| CLAUDE.md | ||
| find_burst.py | ||
| launch-a6-issue98-capture.ps1 | ||
| launch-a6-issue98-cottage-gfxobj-dump.ps1 | ||
| launch-a6-issue98-polydump.ps1 | ||
| launch-flap-capture.ps1 | ||
| launch-flap-churn.ps1 | ||
| launch-flap-verify.ps1 | ||
| NOTICE.md | ||
| README.md | ||
acdream
A modern open-source C# / .NET 10 Asheron's Call client.
Faithful port of the retail client's behaviour to Silk.NET with a modern, plugin-friendly architecture. The code is modern; the behaviour is retail.
Status: playable pre-alpha. You can log in to an ACE server, walk and run through Dereth, see other players animate correctly, watch the day-night cycle, hear ambient audio, and take weapons out. Many systems are still stubbed or in-progress — see roadmap.
Stack
- Language: C# .NET 10
- Graphics: Silk.NET (OpenGL 4.3)
- Audio: OpenAL via Silk.NET
- Dat parsing: Chorizite.DatReaderWriter
- Networking: Custom UDP + ISAAC cipher + game-message layer, wire-compatible with ACEmulator server
What works
- Connecting to a local ACEmulator (ACE) server on
127.0.0.1:9000 - Character selection and login
- Rendering Dereth terrain with retail-correct texture blending, per-vertex lighting, and road overlays
- Static scenery (buildings, trees, scenery objects) via EnvCell walker
- Animated characters (own + remote) with walk / run / strafe / jump / turn / attack motions sourced from the retail motion tables
- Network sync with remote players — you can watch other characters animate correctly, including speeds and directional motion
- Day-night cycle driven from the retail Region dat (0x13000000) — correct DayGroup picking via the retail LCG, correct keyframe interpolation, correct per-keyframe sky-object replace
- Weather (rain/snow particles synced from the server via the retail DayGroup name)
- Sky dome, stars, moon, clouds, sun — each rendered from the retail Region's SkyObjects with texture scrolling and alpha fade
- Plugin host with live event replay-on-subscribe
What's stubbed or in-progress
- Indoor transitions (building interiors) — disabled, Phase B.3 pending
- Combat — animation works, damage math not wired
- Lightning visual — the retail PhysicsScript-driven flash is researched
but not wired (see
docs/research/2026-04-23-lightning-real.md) - TimeSync drift — we only sync calendar on login, not periodically, so acdream's in-game clock gradually drifts from retail's
- Landscape draw distance — currently
ACDREAM_STREAM_RADIUS=2(~400m) vs retail's several kilometres
See docs/plans/2026-04-11-roadmap.md for the ordered phase list.
See docs/ISSUES.md for the rolling list of known bugs + small deferred
features (tactical, bug-level; the roadmap is strategic, phase-level).
Building + running
Requires:
- .NET 10 SDK
- A retail Asheron's Call dat directory (Turbine/Microsoft property —
supply your own). Contains
client_portal.dat,client_cell_1.dat,client_highres.dat,client_local_English.dat. - A running ACE (ACEmulator) server on
127.0.0.1:9000(or override via env var)
Launch (PowerShell on Windows — bash has trouble with the apostrophe in "Asheron's Call"):
$env:ACDREAM_DAT_DIR = "$env:USERPROFILE\Documents\Asheron's Call"
$env:ACDREAM_LIVE = "1"
$env:ACDREAM_TEST_HOST = "127.0.0.1"
$env:ACDREAM_TEST_PORT = "9000"
$env:ACDREAM_TEST_USER = "testaccount"
$env:ACDREAM_TEST_PASS = "testpassword"
dotnet run --project src\AcDream.App\AcDream.App.csproj -c Debug
Offline CLI dat inspector (no server needed):
dotnet run --project src/AcDream.Cli -- "C:\path\to\Asheron's Call"
Diagnostic env vars
| Variable | Effect |
|---|---|
ACDREAM_DUMP_SKY=1 |
Per-second dump of the interpolated SkyKeyframe values + per-SkyObject draw info + texture alpha histograms |
ACDREAM_DUMP_MOTION=1 |
Dump every inbound UpdateMotion + resulting SetCycle |
ACDREAM_STREAM_RADIUS=N |
Tune landblock visible-window radius (default 2 = 5×5) |
ACDREAM_NO_AUDIO=1 |
Suppress OpenAL init |
ACDREAM_DAY_GROUP=N |
Force a specific DayGroup index for A/B-testing weather presets |
ACDREAM_RUN_SKILL=N / ACDREAM_JUMP_SKILL=N |
Client-side run/jump skill (default 200) |
Layout
src/
AcDream.App/ rendering + audio + main loop (Silk.NET)
AcDream.Core/ game state, meshing, physics, sky, weather, lighting
AcDream.Core.Net/ UDP + ISAAC + game-message layer
AcDream.Cli/ offline dat-inspector console app
AcDream.Plugin.Abstractions/ plugin host interfaces
AcDream.Plugins.Smoke/ example plugin
tests/
AcDream.Core.Tests/ xUnit tests (742 passing)
AcDream.Core.Net.Tests/ network-layer tests
tools/
RetailTimeProbe/ Win32 P/Invoke ReadProcessMemory probe of
the live retail acclient.exe — dumps
TimeOfDay + sky-lighting globals so we
can compare against acdream's state
SkyObjectInspect/ dat-inspector for Region sky objects
references/ vendored read-only reference code — ACE,
ACViewer, WorldBuilder, holtburger,
AC2D, Chorizite, DatReaderWriter.
Gitignored.
docs/
architecture/ single-source-of-truth architecture doc
plans/ phase roadmaps + per-phase specs
research/ decompile-derived research, per-phase
findings, deep-dive agent reports
audit/ phase-completion audits
Development workflow
All AC-specific behaviour is ported from the decompiled retail client
(docs/research/decompiled/). The workflow is:
- Decompile first. Find the matching function in the decompiled client.
- Cross-reference. Check against ACE's C# port and ACViewer / WorldBuilder.
- Write pseudocode. Translate C to readable pseudocode first.
- Port faithfully. Translate line-by-line, preserving variable names and control flow.
- Conformance test. Add tests using golden values from retail.
- Integrate surgically. Minimise churn in the surrounding pipeline.
Guessing at AC-specific algorithms is explicitly forbidden — see
CLAUDE.md for the full workflow rationale and the list of failure
modes we've paid for in the past.
Reference repos
We cross-reference five external projects for every retail behaviour:
- ACE (ACEmulator) — authoritative server-side protocol
- ACViewer — MonoGame dat viewer; good for character appearance
- WorldBuilder — Silk.NET dat editor; matches our stack
- Chorizite.ACProtocol — clean-room C# protocol library
- holtburger — most complete non-retail client; Rust TUI, full client-side behaviour
- AC2D — C++ AC-client emulator; has the real terrain split formula and 0xF61C movement packet format
See CLAUDE.md for which reference is authoritative for which domain.
Licence
Not yet chosen. All external reference code is vendored under its own
licence; see references/*/LICENSE. The acdream source code itself is
unreleased — not yet distributed to the public. Once the licence
choice is made it will go in a top-level LICENSE file.
The AC dat files and the game's intellectual property remain the property of Microsoft / Turbine. This project does not distribute any of those files or assets — you must supply your own retail install.