4.0 KiB
4.0 KiB
Session Summary
Current State
The repository is now split into two apps that live side-by-side:
- apps/backend
- authoritative ASP.NET Core simulation
- apps/viewer
- Three.js/Vite observer client
- shared/data
- shared scenario data
The complete simulation runs in the backend. The viewer fetches one world snapshot, then subscribes to an SSE delta stream and renders the world as an observer.
Runtime / Networking
The backend currently provides:
GET /api/world- initial authoritative snapshot
GET /api/world/stream- incremental SSE deltas after a sequence number
The viewer currently does:
- fetch the world once
- connect to the stream
- apply deltas into a local render model
- interpolate and briefly extrapolate moving ships for presentation
This supports multiple simultaneous observers on the same world. Interest management is not implemented yet, so every observer still receives full-world deltas.
Viewer Status
The viewer currently supports:
- single-click selection for ships, stations, nodes, planets, and stars
- rectangular marquee selection
- constrained to one group at a time:
- ships
- structures
- celestials
- constrained to one group at a time:
WASDpanning on theXZplane- middle-mouse orbit camera
- smooth wheel zoom across local, system, and universe scales
- presentation fades between zoom bands instead of hard switches
Universe-level presentation is now star-centric:
- solar-system internals fade out as the camera pulls back
- star names remain readable
- system summary panels show icon-plus-count rollups only when entities are present
The viewer also includes plain-text HUD readouts for:
- game state
- network statistics
Simulation Status
The backend simulation already includes:
- autonomous ships
- orbital travel
- docking and undocking
- mining and refinery delivery
- refining / fabrication
- faction growth through ship and outpost production
- pirate pressure and combat
The runtime model still follows the intended layered control architecture:
orderdefaultBehaviorassignmentcontrollerTaskstate
Important Recent Changes
- split the old monolith into
apps/backendandapps/viewer - moved simulation authority fully into .NET
- replaced frontend polling with snapshot-plus-delta SSE replication
- added viewer-side interpolation / short extrapolation for movement
- added a plain-text network statistics readout
- reworked the camera with smoother zoom, orbit, panning, and marquee selection
- cleaned up several viewer HUD elements and removed redundant panel content
Current Known Limitations
- replication is still world-wide
- no observer-scoped interest management yet
- the viewer is still observer-focused
- no command submission UI yet
- system/universe transitions are improved but still need tuning in feel and art direction
- piracy and faction growth are still functional rather than strategically deep
- no persistence for saves, seeds, or reconnect state
Important Files
- apps/backend/Program.cs
- backend API endpoints
- apps/backend/Simulation/WorldService.cs
- authoritative world state and stream coordination
- apps/backend/Simulation/SimulationEngine.cs
- simulation advancement
- apps/viewer/src/GameViewer.ts
- camera, selection, streaming integration, and presentation
- apps/viewer/src/api.ts
- snapshot fetch and SSE stream integration
- shared/data
- scenario and world data definitions
Validation
Validation passing at the end of this session:
cd apps/viewer && npm run build