Commit graph

154 commits

Author SHA1 Message Date
Erik
b72851a3ee docs(phase-2): refine design after DatReaderWriter spike
Verified the real GfxObj data shape against DatReaderWriter's generated
types and WorldBuilder's ObjectMeshManager. Three corrections:

- GfxObj.Surfaces is a list and Polygon.PosSurface indexes into it;
  multiple surfaces per GfxObj are the norm. GfxObjMesh.Build now
  returns IReadOnlyList<GfxObjSubMesh> — one sub-mesh per referenced
  surface. StaticMeshRenderer draws entities by grouping entities by
  GfxObj and then by sub-mesh within each GfxObj. Matches the approach
  WorldBuilder takes.

- LandBlockInfo has both Objects (Stabs — small decorations, rocks,
  trees) AND Buildings (BuildingInfo). LandblockLoader loads both
  lists and maps them uniformly to WorldEntity since both types share
  the Frame shape.

- Stab.Frame and BuildingInfo.Frame carry position+orientation only,
  no scale component. WorldEntity.Scale dropped. WorldEntitySnapshot
  loses its Scale field too. Phase 3+ can add it back if needed.

Closes the one open design question flagged in the original doc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:18:43 +02:00
Erik
7e601073d4 docs: phase 2 design — static meshes, textures, neighbors
Locks the design decisions from brainstorming: full scope (geometry +
textures + 3x3 neighbor grid), dual cameras (orbit default + FlyCamera
toggled by F), minimal plugin API growth (IGameState.Entities snapshot
+ IEvents.EntitySpawned). BCnEncoder.Net handles DXT/BCn decoding,
matching WorldBuilder's approach.

Adds three new namespaces under AcDream.Core (World, Meshing, Textures)
and three new rendering components under AcDream.App (StaticMeshRenderer,
TextureCache, FlyCamera + ICamera). Entities are deduplicated by
GfxObj id at the GPU layer; textures dedup by Surface id. Plugins
get immutable snapshots, not live references.

Rough 18-task sequence captured. Full bite-sized plan comes next via
superpowers:writing-plans.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:16:08 +02:00
Erik
84c76ba6aa docs: phase 1 implementation plan
Ten bite-sized tasks covering: solution reorg into four projects,
TDD-driven PluginManifest parsing + discovery + collectible-ALC
loader (with a real fixture DLL), LandblockMesh pure generator,
Silk.NET window smoke, dat-backed landblock mesh upload, height-
ramp shader + orbit camera, and finally the end-to-end smoke
plugin round-trip. Manual visual smoke only for the GL bits;
xUnit TDD for everything testable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:17:49 +02:00
Erik
c016ab54fd docs: plugin architecture design
Captures the day-1 plugin + scripting contract for acdream:
C# plugins via collectible AssemblyLoadContext with a stable
IPluginHost API, Lua macros via a first-party Macros plugin that
embeds MoonSharp, and a four-stage packet pipeline for raw and
parsed traffic in both directions. Extends the phased MVP so
every core system is exposed through the plugin API in the same
commit that adds it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:11:52 +02:00