Modern open-source C# .NET 10 Asheron's Call client. Faithful port of retail client behaviour to Silk.NET with a plugin API.
Fifth and final Phase A.1 hotfix. Replaces the previous "drop on miss" semantics in GpuWorldState.AppendLiveEntity with a per-landblock pending bucket that survives the race where a CreateObject arrives before its landblock has been streamed in. Root cause: The post-login spawn flood (40+ NPCs/items) drains in a single WorldSession.Tick() call. The synchronous streamer enqueues all 25 visible-window landblocks in one shot but StreamingController.Tick was capped at MaxCompletionsPerFrame=4, so only 4 landblocks landed in GpuWorldState on the first frame. The center landblock 0xA9B4FFFF may or may not have been in those first 4 (HashSet iteration order is undefined). Spawns whose target landblock wasn't yet loaded were silently dropped by AppendLiveEntity. Re-ordering the OnUpdate (streaming first, live second) didn't fix it because the cap still limited to 4 per frame; spawns for landblocks #5+ kept dropping until the queue drained, by which point the spawn flood was over. The reordering was correct but insufficient. The cap was a relic of the original async streamer design (limit GPU upload spikes per frame). With the synchronous streamer there's no backlog to spread, so the cap was pure latency for no benefit. Setting it to int.MaxValue restores "drain everything you just enqueued" semantics. The pending-spawn list is the *correct* architecture fix that makes the system robust against any future ordering bug, not just the cap: - AppendLiveEntity for an unloaded landblock parks the entity in a per-landblock pending bucket instead of dropping it. - AddLandblock drains pending entries for its landblock and merges them into the loaded record before storing. - RemoveLandblock drops pending entries for the same landblock — if the player moved away, the spawns are no longer relevant; the server resends them via CreateObject when the player returns. Diagnostic counter PendingLiveEntityCount exposes the bucket size so future regressions are visible without spelunking. 7 new GpuWorldStateTests pin the contract: - AppendLiveEntity_LandblockAlreadyLoaded_AppendsImmediately - AppendLiveEntity_LandblockNotLoaded_ParksInPending - AddLandblock_DrainsPendingEntriesForThatLandblock - AddLandblock_DoesNotDrainPendingForADifferentLandblock - RemoveLandblock_DropsPendingForThatLandblock - RemoveLandblock_LoadedThenRemoved_DropsItsEntities - IsLoaded_ReturnsTrueForLoaded_FalseForPendingOnly Also removes the diagnostic Console.WriteLine I added in the previous debugging round and the old LiveAppendsResolved/Dropped counters that were never read by anyone. 219 tests green (212 + 7 new). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| docs | ||
| src | ||
| tests | ||
| .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.