Implementation Progress
What has been built, what is in progress, and what is next.
Last updated: 2026-02-23
Priority Order
| # | System | Status |
|---|---|---|
| 1 | Planet economy engine | ✅ Done |
| 2 | Population & food system | ✅ Done |
| 3 | Blueprint system | ✅ Done |
| 4 | Fleet system | ✅ Done |
| 5 | Deterministic combat | ✅ Done |
| 6 | Trade routes | ✅ Done |
| 7 | Espionage | ✅ Done |
| 8 | Buildings system | ✅ Done |
| 9 | Lazy tick system | ✅ Done |
| 10 | Tech tree | ⬜ Not started |
| 11 | Rebellion system | ⬜ Not started |
✅ Done
1 & 2 — Planet Economy Engine + Population/Food
Backend
PlanetEntity— coordinates, planet size (Small/Medium/Large), housing capacity, population, stability (0–100), 5 resource stockpiles (metal/crystal/gas/rare/food), specialization type,last_tick_atEconomicTickService— applies one or more economic ticks to a planet; called lazily on planet access- Pure static calculators:
FoodCalculator,PopulationCalculator,ProductionCalculator,StabilityCalculator,BuildingCalculator - Population growth (+2%/tick) and starvation (−0.5× food deficit) based on net food
- Housing efficiency modifier with five interpolated zones (optimal at ratio 0.75–0.90)
- Stability delta: −2/tick starvation, −1/tick overcrowding, +1/tick recovery
- Resource production from buildings, modified by efficiency × stability × specialization × energy ratio
- API:
POST /api/v1/game/tick,GET /api/v1/planets/{id}/economy,GET /api/v1/game/config
Frontend
PlanetsPage— list all planets, owned planets sorted firstPlanetDetailPage— stockpiles, stability bar, population bar, coordinates, specialization badgeEconomyPanel— production rates, food outlook, per-resource rates, energy section, collapsible
3 — Blueprint System (Hangar)
Backend
FrameEntity— 8 hull classes (5 ships + 3 stations), slot layout, power budget, resource costs, build ticks; seeded as static reference dataModuleEntity— 16 modules across 4 types (Weapon / Defense / Engine / Utility), stats, counter tags, resource costs; seeded as static reference dataBlueprintEntity+BlueprintModuleEntity— player designs with versioning and role assignment- Full CRUD for blueprints; frames and modules are read-only
Frontend
HangarPage— blueprint list with edit/deleteBlueprintDesignermodal — frame picker, slot assignment, module picker with power budget displayBlueprintCard— summary view with role, hull class, version
Visualizer (ships/, port 5174)
- Three.js standalone app — renders ship blueprints in a blueprint-aesthetic 3D viewport
- Real-time preview as modules are assigned to slots
4 — Fleet System
Phase 1: Ship Production
FleetEntity+FleetShipEntity— docked/moving fleet with ship stacks (blueprint → count)ProductionOrderEntity— tick-based build queue; resources deducted upfrontShipProductionService:QueueOrderAsync,AdvanceProductionAsync,CancelOrderAsync- Endpoints:
POST/GET /api/v1/planets/{id}/production,DELETE .../production/{orderId},GET .../production/cost/{blueprintId} - Fleet endpoints:
GET /api/v1/fleets,GET /api/v1/fleets/{id} - Frontend:
ProductionQueueon planet detail,BuildShipsModal,FleetsPage
Phase 2: Fleet Movement
FleetMovementService:DispatchAsync,GetEtaAsync,AdvanceMovementAsync- Fleet speed = sum of Engine module speed values for the slowest ship; default 1.0 if no engines
- Euclidean distance;
ticks_remainingstored for smooth interpolation on the galaxy map - Endpoints:
POST /api/v1/fleets/{id}/dispatch,GET /api/v1/fleets/{id}/eta/{destinationId} - Frontend:
DispatchModalwith live ETA preview, Galaxy Map (/map) with SVG planet circles, fleet route lines, real-time fleet tween
5 — Deterministic Combat
- Pure combat simulation: same fleet compositions always produce the same outcome (no RNG)
- Initiative from weighted-average fleet speed; higher speed attacks first each round
- Round loop: attacker selects targets, damage applied (shield → armor → hull), defender retaliates
- Damage formula:
effective_damage = base_damage × targeting_modifier × counter_modifier - Counter tags:
armor_piercing/shield_breakerweapon tags vspiercing_resistance/breaker_resistancedefense tags (1.25× modifier) CombatEventlog per round; human-readable battle report generated post-combat- Hash verification:
sha256(fleetA_state + fleetB_state + engine_version) - Endpoint:
POST /api/v1/combat/simulate
6 — Trade Routes
TradeRouteEntitywith source planet, destination planet, resource type, min/max stockpile thresholds, fleet assignment, shipment size- Tick trigger: dispatch shipment if
source > max_threshold AND dest < min_threshold AND fleet idle - Resources deducted from source on dispatch; added to destination on fleet arrival
TradeRouteService:CreateAsync,AdvanceTradeAsync(called each tick)- Endpoints:
GET/POST/DELETE /api/v1/planets/{id}/trade-routes - Frontend:
TradeRoutesPanelon planet detail,AddTradeRouteModal
7 — Espionage
- Three intel levels: ship counts → module types → full blueprint layout
- Deterministic resolution:
success_score = attacker_espionage − defender_counterintelligence; success if score ≥ level threshold EspionageMissionEntitywith attacker, target, intel level, ticks remaining, outcomeEspionageService:LaunchMissionAsync,AdvanceMissionsAsync(called each tick),GetIntelReportAsync- Endpoints:
POST /api/v1/espionage/missions,GET /api/v1/espionage/reports/{id} - Frontend:
IntelReportModal
8 — Buildings System
PlanetBuildingEntity— completed buildings: type, level (1–5), slot indexBuildingConstructionOrderEntity— one active order per planet; resources deducted upfront;ticks_remainingdecremented each tickBuildingDefinitions— static catalog of 8 building types with per-level stats (no DB table)BuildingCalculator— pure static: energy ratio, per-building output, housing, specialization modifier- Energy system: Solar Arrays and Nuclear Reactors produce energy; extraction and farming buildings consume it;
energy_ratio ∈ [0.5, 1.0]scales all outputs - Hydroponic Farm stability floor (min 0.5 stability modifier) prevents unrecoverable death spirals
IBuildingService/BuildingService:ConstructAsync,UpgradeAsync,DemolishAsync,CancelConstructionAsync,AdvanceConstructionAsync- Buildings are wired into
EconomicTickServicetick loop; construction advances each tick - API:
GET/POST /api/v1/planets/{id}/buildings,POST .../buildings/{id}/upgrade,DELETE .../buildings/{id},DELETE .../buildings/construction,GET /api/v1/buildings/definitions - Frontend:
BuildingsPanel,BuildingCard,ConstructBuildingModalon planet detail page; energy bar in panel header
9 — Lazy Tick System
TICK_INTERVAL_SECONDSenv var (default 300 = 5 minutes) →GameConfiguration.TickIntervalSecondsITickClock/TickClocksingleton —ElapsedTicks(last, now),Advance(last, n)GameStateEntity— singleton row trackinglast_global_tick_atfor global events (movement, trade, espionage)PlanetEntity.last_tick_at(nullable timestamptz) — per-planet tick timestampIEconomicTickService.TickPlanetIfDueAsync(id)— applies all overdue planet ticks at once; construction and production advance by the same number of ticks; called automatically at the start ofGET /planets/{id}GET /api/v1/game/config— returns{ tickIntervalSeconds, lastGlobalTickAt, nextTickAt }POST /api/v1/game/tick— forced full tick of all planets (admin/testing)
Planets Pipeline (planets/)
- Node.js + Puppeteer pipeline generating WebM planet videos from GLSL shaders
- CLI supporting single-file and batch modes
- Output to
planets/output/
⬜ Not Started
10 — Tech Tree
- Industrial, Fleet Engineering, Administration branches
- Persistent unlock state per player
- Modifiers fed into existing calculator services (efficiency bonuses, new module unlocks, stability buffers)
11 — Rebellion System
- Trigger at
stability < 20sustained for multiple ticks - Production halted entirely; planet neutralized
- Fleet intervention required to restore order