Spaces:
Paused
Paused
Commit History
-
Round-trip worker logistics + manual worker→building assignment
Claude +1: Claude Opus 4.8Unverified signatureWorkers no longer run empty legs, and the player can put a worker on a specific building. The old separate supply/haul-for-factories jobs become one SERVICE round trip: in a single loop a worker carries a needed INPUT from the treasury to a factory AND carries its finished OUTPUT back — neither leg wasted. Pure producers (the Rig, the forward drop-offs) keep the one-way HAUL. - haul.js: rewritten around updateService/assignService (round trip) + updateHaul/ assignHaul (pure producers only, recipe buildings excluded). Adaptive legs — with no input to fetch it goes straight for the output; with no output it just delivers. - commands.js: issueServiceBuilding — assign workers a standing `manual` service order. - input.js: right-clicking a completed friendly factory / Rig / drop-off with selected workers assigns them to service it (they keep serving it until re-ordered). - sim.js: idle worker → haul (pure producers) else service (factories); dispatch service. - persist.js/types.js: `…d443e60 -
Workers trainable on biomass as an alternative to ore
Claude +1: Claude Opus 4.8Unverified signatureA worker now carries an `altCost` ({biomass: 50}) alongside its ore price — an either/or, so a biomass-rich but ore-poor claim can still grow its workforce. - entities.js: worker.altCost. - production.js: queueProduction(state, id, type, alt) charges the alternative price when asked and tags the queued job (job.alt); cancelProduction refunds whichever commodity was actually charged. - hud.js: the Command Center shows a second "Produce Worker (50 biomass)" button beside the ore one; the affordability signature tracks altCosts so it greys live. Tests: production.test.js (biomass charged not ore, job tagged, cancel refunds biomass). Full suite 597 green, tsc clean. AI path unchanged (it queues via the ore cost only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AEQUVetLk31Jj7niDQAsXLccc9661 -
Combustion Generator: cheap gas/biomass power on a tight grid
Claude +1: Claude Opus 4.8Unverified signatureA fuel-burning alternative to the Reactor. It grants half the Power (energyGrants 10 vs 20) over a much smaller grid (powerRange 0.55 shrinks its efficiency zones), and only while it's fed — it burns gas OR biomass (whichever the stockpile has more of) at combust.rate/sec from the treasury, the mirror of the Reactor's free-but-pricey grid: cheap to raise, ongoing fuel bill. Out of fuel or paused, it grants nothing. - entities.js: `combustor` def (energyGrants 10, powerRange 0.55, combust spec); the Reactor gains powerRange 1 as the reference reach. - industry.js: powerEfficiency now scales each source's distance by its powerRange (nearestReactorDist → bestGridDist), so a Generator's zones sit tight and a consumer must huddle close; powerCap and the grid only count ACTIVE sources; updateCombustors burns fuel each tick and sets the transient `powered`/`fuel`. - sim.js: settle Generators before any consumer reads powerCap. - persist.js: strip the transient powered/fuel from saves…08cde58 -
Plasma Rig: surface deposits telegraph the seam below (educated-guess placement)
Claude +1: Claude Opus 4.8Unverified signatureThe rig's vein and richness were pure position hashes — blind. Now the SURFACE resource deposits near a spot bias what's underground, so late-game rig placement is an educated guess off the visible map rather than a gamble. - rigVein is a deterministic weighted-random pick biased by nearby deposits: a rig among ore fields usually strikes ore, but a small hashed floor on every vein keeps a surprise possible (and a barren spot a genuine gamble). - locationRichness blends surface DENSITY (proximity-weighted deposit size) with the old tile/planet hash — dense surface digs a richer seam. - Both read node.max (the original deposit size), so a rig's vein/richness never drift as the surface nodes are mined out — stable for the life of the rig. The "guess" gap is honest: the sim surveys ALL nodes (deterministic ground truth) while the new rigSurvey — used by the placement UI — reads only the VISIBLE/charted deposits, so an unscouted cache stays a surprise. - render.js: the Plasma Rig…6772f54 -
Logistics Phase C: finite forward drop-offs + gather reroute (player-only)
Claude +1: Claude Opus 4.8Unverified signatureThe last piece: collection buildings get finite storage too. A PLAYER's forward drop-offs (Refinery/Foundry/Arsenal) now have a finite intake buffer (storeCap 100). A gatherer banks its haul into that buffer; when it's full, nearestGatherDrop skips it so the gatherer reroutes to the next collection point — and the Command Center, the bottomless treasury/warehouse, never fills. Phase A haulage clears a forward buffer to the CC automatically. Goods now flow strictly through the warehouse: gather → forward drop-off buffer → haul → CC treasury → supply → factory → haul → CC. Haulage delivers and supply picks up at the nearest Command Center (nearestCommandCenter), never sideways between drop-offs. Factories are excluded from gather drop-offs (isGatherDropOff): their `store` is refined output, not a raw-intake bin. - entities.js: storeCap on refinery/foundry/arsenal; isGatherDropOff helper. - gather.js: player forward-drop-off banks to the building's buffer (capped, leftover reroutes); …89beffa -
Logistics Phase B: factory input larders + a real supply network
Claude +1: Claude Opus 4.8Unverified signatureFactories stop sipping from an infinite global pool: each now draws its inputs from a FINITE local larder (building.input) and banks output into a finite buffer (building.store), both capped at 80 by default for any building with a recipe (storeCapOf/inputCapOf). updateProduction runs a factory only while it's been supplied AND has output room — it stalls starved or backed-up, exactly like the Plasma Rig. Worker haulage gains a supply leg (engine/haul.js): an idle player worker picks the nearest own factory low on an input the treasury can provide, carries a cargo from the Command Center into its larder. Output is cleared by the Phase A haul path, which now covers factories automatically. Idle workers try haul first (clear backlogs, refill the treasury) then supply (feed the starving). Both capped at 2 per building, deterministic nearest-by-id, player-only. The industry chain is now a genuine network routed through the treasury: raws → CC → supply → smelter → metals → haul → CC → sup…832f494 -
Logistics Phase A: finite rig output buffer + worker haulage
Claude +1: Claude Opus 4.8Unverified signatureStorage stops being an infinite sink and workers get a job that lasts to the end of the game. The Plasma Rig (a leaf producer of raw goods — the safest surface to prove the mechanic, since its output feeds no other factory) now banks each dig into a FINITE local buffer (building.store, capped at def.storeCap 120) and stalls the moment it's full. Those goods aren't spendable until hauled to a Command Center. New worker haulage (engine/haul.js): an idle PLAYER worker auto-assigns to the nearest own producer whose buffer is ≥34% full (≤2 haulers per producer, ties broken by id), walks there, loads a cargo, carries it to the nearest drop-off, and banks it into the treasury 1:1 — no gather multiplier, since the rig already extracted it. Run short on haulers and the buffer fills and the rig stalls: logistics is now a live demand on labour, exactly as intended. - entities.js: storeCapOf / storeTotal / storeRoom helpers; storeCap on the rig def. - rig.js: bank to store (top off the final dig…91ad84b -
Grid efficiency: a factory/rig far from a Reactor draws more Power
Claude +1: Claude Opus 4.8Unverified signatureEnergy is a per-tick flow, not a hauled good, so "logistics" for power is a PLACEMENT decision: the closer a consumer sits to a Reactor, the cheaper it is to power. powerDraw now scales each consumer's base draw by a distance-to-nearest- Reactor tier (on-grid ×1.0 → isolated ×2.3, engine/industry.js POWER_TIERS), so clustering factories/rigs around a Reactor lets the same Reactors run more of them — a remote one bleeds capacity to transmission loss and throttles the whole grid. No workers, no new stored state — pure distance math, deterministic and DOM-free. A non-positional stub or a Reactor-less owner reads as the neutral on-grid tier, so every existing industry test is unchanged. Visual cues mirror the Spaceport's jump radius: - a selected Reactor shows its efficiency zones as concentric tinted bands (render.js drawPowerGrid / drawReactorBands) - placing a factory/rig/Gate ghost draws the nearest Reactor's zones, a connector to it, and tags the ghost with the tier it would lan…50718c9
-
Plasma Rig: deep-core extraction — unlimited raws at a probabilistic yield tier
Claude +1: Claude Opus 4.8Unverified signatureA new Odyssey building (engine/rig.js) that mines a raw commodity forever instead of from a finite node. Each dig cycle strikes a probabilistic tier — low, medium, good, or overwhelming — whose odds rise with the rig's spot AND the planet, so placement matters. It's costed as an engine, not free money: - "plasma to dig" = a heavy Power draw routed through industry.js's grid, so it competes with factories/the Gate and its digs slow when power is short. - "nuclear to exploit" = radioactives burned per dig; out of them, it stalls. - "AI to pilot" + manufactured materials = an expensive build cost ({ ore: 500, machinery: 8, electronics: 5, ai: 3 }), gated behind aifoundry + reactor. Which raw a rig mines (its "vein") is fixed by where you build it. Determinism-safe: every roll is a hashStr of the rig id + its dig counter (no Math.random, no clock), so a same-seed galaxy strikes the same seams on replay; the engine-purity + determinism guards stay green. dig state persists on the bui…db667bc -
Market: make every commodity tradeable (derive the sets from COM.tier)
Claude +1: Claude Opus 4.8Unverified signatureTRADEABLE was a hardcoded 12, so the whole manufactured tail — chemicals, medicine, drones, goods, weapons, luxury, and crucially the strategic goods (AI cores, antimatter, plasma torpedoes) — had no price entry and couldn't be bought or sold at all. Now TRADEABLE is the whole commodity catalog (Object.keys(COM)), and the RAW (abundance-priced, wide buy spread) and PRODUCED (industry-priced, glut-able) sets derive from data.js COM.tier — so a deposited raw and a manufactured good are each priced the right way with no hand-kept list to drift. The market panel already filters to commodities you hold or that are deposited here, so it stays relevant; it just no longer excludes anything. This gives the strategic goods a credit sink to go with their local ones (Gate / Leviathan), so a surplus is never a dead counter. Backward-compatible: an old save's market reprices from the seed on load and overlays its saved pressure, so new commodities simply start at neutral pressure. Full suite green …358dc6c -
Odyssey freighters: a player-managed cargo hold (load/unload), shipped on a jump
Claude +1: Claude Opus 4.8Unverified signatureCargo ships used to be capacity-only — a jump auto-picked the most valuable goods and the player had no say in what shipped. Each freighter now carries a `freight` hold (commodity → qty, capped at its cargoHold) that the player fills and empties by hand: - loadFreighter/unloadFreighter (engine/galaxy.js) move goods between the current world's stockpile and a freighter's hold, clamped to room and stock; freightUsed / freightRoom report fullness. - A jump now delivers each staged freighter's hold to the destination colony. A freighter left EMPTY still auto-fills most-valuable-first (the zero-effort default is unchanged — all existing cargo tests pass), while a hand-loaded one ships exactly what the player chose (e.g. cheap spice over machinery). - The hold rides on the unit, so it serializes for free; cleanEntity sanitizes it on load (real commodities only, positive, clamped to cargoHold) since a save is untrusted. Named `freight`, not `hold`, to stay clear of the combat ho…6325132 -
Decompose runAI into an orchestrator + named phase functions (byte-identical)
Claude +1: Claude Opus 4.8Unverified signatureAddress the second architectural-review finding: runAI was a 453-line function carrying the AI's entire economy/build/tech/expand/military decision tree inline — the hardest file in the repo to reason about or change safely. Pure extract-method. runAI is now a 33-line orchestrator that snapshots the world once (aiContext) and calls the phases in their load-bearing order: aiFoundOrSurvive → aiExpand → aiBaseAndTech → aiProduceAndFortify → aiResearch → aiMilitary (→ aiOffense) → focus fire Each phase is a named, single-concern function taking (state, ctx); the shared per-cycle snapshot and the running ore holdbacks (oreReserve / foundryReserve / refineryReserve that one phase banks and the next must respect) travel on the ctx object, typed by a new AiContext typedef in engine/types.js. No phase exceeds ~96 lines. Behaviour is provably unchanged: the action-budget accounting makes every statement's order load-bearing, so the extraction preserves that order exactly. A same-seed skirm…3553703 -
Add JSDoc typedefs + // @ts-check for the core sim shapes (no build step)
Claude +1: Claude Opus 4.8Unverified signatureAddress the top architectural-review finding — an untyped mutable `state` bag threaded through ~360 functions, where a mistyped or renamed field reads undefined silently and the same-seed determinism test can't see it. Now that class of bug is a check-time error. Zero runtime cost and no build step: the shipped code stays plain ES modules. - engine/types.js: JSDoc @typedefs for the core shapes (State, Unit, Building, Player, AiState, Resources, Cargo, Order, ResourceNode, GameMap, Fog, Market, Diplomacy, Galaxy, …). No runtime code, never imported — global typedefs the checker and any editor's TS language service resolve project-wide. - jsconfig.json + `npm run typecheck` (tsc, noEmit): checking is OPT-IN per file via a `// @ts-check` pragma, so coverage grows file-by-file. Editors check the annotated files live with no install; the script needs a tsc available. - Enabled + annotated on the core data + hot path: state.js (the factories bind the types to the real objects), …e3658fa -
Tier 5: group the AI controller's bookkeeping under state.ai (no behaviour change)
Claude +1: Claude Opus 4.8Unverified signatureMove the 13 flat state.aiThink / state.aiScoutId / state.aiWaveCount / … fields into a single grouped state.ai object, decluttering the top-level state (which is the shared sim world) from the AI *controller's* private scratch state. This is the safe half of the two deferred Tier-5 refactors; the entity-id-counter move was deliberately skipped (moving it per-state would reintroduce cross-planet id collisions — the current single reset-per-construct counter is correct). Kept strictly behaviour- and format-neutral: - The save WIRE shape is unchanged: serPlanet still writes `ai:{aiThink,…}` and rehydrate still reads `P.ai.aiThink`, so every existing save loads untouched — no GALAXY_SAVE_VERSION / SAVE_VERSION bump. Only the live in-memory shape nests. - The think/wave/attack-schedule fields (previously set lazily on first AI tick and read `|| 0` / `?? …`) are now initialised in createGameState, so state.ai has a complete, self-documenting shape. Values are identical to the old …f1048a5 -
Tier 5: harden the test net (roster sweep, full-state compare, static + DOM guards)
Claude +1: Claude Opus 4.8Unverified signatureAdd the coverage a no-build-step, determinism-critical codebase needs to fail loudly instead of silently shipping a white screen or a desync. - test/_helpers.js: shared full-precision fingerprints (entitySnapshot / galaxySnapshot) that capture every sim-owned fact in a fixed, order-immune field layout, plus jumpReadyGalaxy() — the recurring "poised to jump" setup. - determinism roster sweep: same-seed replays must be byte-identical on EVERY settleable world, not just ferros — each world has its own map/terrain/AI, so a nondeterminism bug could hide on one the headline test never touches. - galaxy continues-identically at FULL precision: the existing check compares a rounded, count-only fingerprint; this compares exact positions/hp/orders/ economies/stance/pressure, so an un-persisted transient that shifts the sim by an epsilon surfaces. (It did during development — an unset-vs-0 AI wave counter the engine treats identically; normalised in the fingerprint, not the sim.)…302a725 -
Tier 5: dedup and derive engine helpers (byte-identical replays)
Claude +1: Claude Opus 4.8Unverified signatureRemove copy-paste and stale magic numbers from the engine, keeping every change deterministic (same-seed replays stay byte-for-byte identical, the determinism + engine-purity guards stay green). - rng.js: centralise the string hash (h=7, h*31+c) as hashStr(). It lived byte-identical in four modules (combat/gather/movement/separation) for a worker's orbit angle, an avoidance dodge, a spread-fire pick and the coincident-pair nudge — one home so a change can't drift between copies. - movement.js: derive MAX_UNIT_RADIUS from the roster instead of a stale literal (10, "Breacher") that under-sized the avoidance query the moment a wider hull (Bulk Freighter, 15) was added; separation.js's SEP_RADIUS now keys off it too. A larger query returns a superset the exact-distance check still filters identically, so replays are unchanged. - movement.js: add keepEscortStation() next to escortSlot() and route the three identical escort branches (combat ship, worker, support drone) thr…8583c67 -
Tier 4: UI/audio/save cost — HUD topbar guard, audio-clock notes, stringify-once
Claude +1: Claude Opus 4.8Unverified signature- HUD topbar (hud.js): signature-guard the resource/supply/credits/power/stance readout the same way the selection panel is guarded — it was torn down and rebuilt (~8 createElement/ appendChild) every 150 ms even when nothing changed. Now the DOM is only rebuilt when a displayed value actually moves; the clock + idle count stay cheap per-tick text writes. - Sound (sound.js): schedule multi-note cues (the under-attack second blip, the victory/defeat jingles) on the sample-accurate WebAudio clock via a `when` offset on tone(), instead of setTimeout callbacks the browser throttles under main-thread load — exactly during a big battle — which smeared the rhythm. All four setTimeout wrappers removed. - Autosave (engine/persist.js, saveload.js): add serializeGameString/serializeGalaxyString that return the JSON string directly, and have the 12 s autosave use them — so the fog-heavy payload is stringified ONCE instead of stringify→parse→stringify. serializeGame/serializeGalaxy …b6d76f7 -
Tier 4: per-tick sim cost — grid int keys, fog squared-dist, galaxy scan cadence
Claude +1: Claude Opus 4.8Unverified signature- Spatial grid (engine/grid.js): replace the per-unit / per-query "cx,cy" STRING cell key (allocated + hashed every tick on the hot broad-phase path) with a packed integer key (cx+PAD)*STRIDE+(cy+PAD). Cells bucket the same units in the same order and queryNeighbors visits the same cells in the same fixed loop, so candidate lists are byte-identical — the determinism test stays green. - Fog reveal (engine/fog.js): compare squared distances (dx*dx+dy*dy vs sight*sight) instead of a Math.hypot per candidate cell, and hoist the row index + dy out of the inner loop. - Galaxy scans (engine/galaxy.js): the conquest/milestone/relief checks change on a minutes timescale but ran every frame — throttle to ~1/sec (tick 1, then tick % 20) on the same deterministic integer schedule the background round-robin uses. Odyssey-only path. All verified byte-identical: determinism + engine-purity + fog + balance + odyssey + wonder tests green (549 total). No behaviour change on the skirmish r…4559046 -
Tier 2 Odyssey meta: colony re-alerts, roster repair, war notices, full conquest
Claude +1: Claude Opus 4.8Unverified signatureFive meta-layer gaps the review surfaced (the relief-clock and activeId-structural throws were already fixed in Tier 1): - sweepColonies (galaxy.js): a standing colony resets the colonyLost latch, so retaking and rebuilding a world re-arms its alerts. Before, a world lost once was muted forever — a second razing never re-announced and the rebuilt colony's under-attack pings stayed suppressed. - Background war declaration (galaxy.js + boot.js): a neighbourHostile event on a background world used to be silently drained (no consumer), so the first warning was the colony already dying. sweepColonies now surfaces it as a "hostile" note and boot.js shows a clickable "neighbour turned hostile — click to reinforce" toast. - Roster repair on load (persist.js): deserializeGalaxy appends any ODYSSEY_WORLDS missing from a save's frozen roster. A pre-Phase-4 save froze `worlds` at nine, permanently hiding the newer worlds from the starmap AND — since the background scheduler keys…e692ca2 -
Tier 2 AI: Odyssey overlay so archetype temperaments actually diverge
Claude +1: Claude Opus 4.8Unverified signatureIn the play-forever Odyssey the three AI archetypes had collapsed into one: the skirmish desperation-timeout never fires, diplomacy guarantees a long opening peace, and the PROBE_MIN floor flattened every muster — so a "Warlord World" hosted the same passive, 3-unit-probing, 4-worker-forever neighbour as a patient research capital. Each archetype now carries an `odyssey` overlay (aiArchetypes.js), read ONLY when state.diplomacy exists: - Rusher: half the grace window, 2x grievance, bigger probes (5), and — vital for a mode with no end — a sustained economy (6 workers) that actually expands. It now turns hostile sooner and harasses harder, as its world advertises. - Economist: stays patient (full grace) but out-scales harder — fatter worker economy, earlier/greedier expansion, slightly bigger probe floor. Wiring: ai.js reads the effective field via a guarded `arch()` helper (workerTarget, expandWhenNodesBelow, probe floor); diplomacy.js scales grace/creep/grievance by the overla…206e424 -
Tier 2 balance: Bastion out-ranges the Skiff; Aegis projects a real anvil aura
Claude +1: Claude Opus 4.8Unverified signatureBastion (entities.js): range 24 → 44 so it now reaches PAST the Skiff it hard- counters (Skiff range 40) — a player-microed Skiff can no longer sit at 40 and orbit forever outside the reach of its counter. Kept under the AI's KITE_MIN_RANGE 50 so it still stands and trades. bonusVs skiff trimmed 14 → 10 to hold the head-on TTK. The rock-paper-scissors auto-battle triangle still closes (balance.test.js). Aegis (entities.js + sim.js + combat.js): the tank finally does its job. It now projects a guardAura — a cryo-armour bubble that multiplies DOWN the damage nearby allies take — so it soaks wherever it stands, with no need to pre-position it as a literal wall and no dependence on enemy targeting. sim.js collects the (rare, Tier-3) aura projectors once per tick into state.anvils; combat.js attackDamage applies the multiplier in O(anvils), usually zero. Speed 40 → 48 so it can keep formation with the line it shields. Deterministic (tick-start position snapshot, like the grid) and transien…30197bc -
Tier 2 economy: close the credit printer, cap the annuity, revive Verdani
Claude +1: Claude Opus 4.8Unverified signaturemarket.js: - Raw inputs (ore/crystals/etc.) now cost a wide 1.5x buy spread vs the 1.15x refined-goods spread, so a local credits→ore→refine→metals→credits loop can't round-trip for free — profit needs a real inter-world price gap. - Produced goods gain a slow, deep "glut" term (decays over ~8 min, separate from the ~17s price pressure): dumping factory output on one world saturates its price, so the credit printer is bounded and you're pushed to the intended make-here / sell-there haul loop. - sell()/buy() walk the price across TRADE_LOT chunks, so a bulk trade is priced marginally (each lot after the prior lot's slippage) instead of the whole quantity at the pre-trade price — a future "Sell All" can't dump at full price. The 25-per-click UI trades one lot, so its numbers are unchanged. galaxy.js: - New-world jump fuel scales with frontier distance (data.js planet x) instead of a flat 400 — a real, growing credit sink; return jumps stay free. - Passive colony income…ed7688d -
Tier 1 review fixes: save-load hardening, engine guards, UX bugs
Claude +1: Claude Opus 4.8Unverified signatureAddresses the Tier-1 (correctness & safety) findings from the codebase review. Save/load safety (engine/persist.js, saveload.js): - Validate values on load, not just JSON shape: drop entities of unknown type (an undefined def threw on the first tick, freezing the game AFTER load's try/catch returned), coerce numeric fields to finite/in-range (a string "time" concatenated; a NaN coord poisoned the spatial hash), and recompute the entity-id counter past every loaded id so a low/missing nextEntityId can't mint a colliding id. All identity for a valid save, so determinism is untouched. - Persist aiWaveCount — omitting it reset the AI economy-raid cadence on every reload, breaking continue-identically for Tactical games. - deserializeGalaxy now throws on structural nonsense (no worlds/planets, or an activeId with no planet) BEFORE the caller tears down the live game, and filters the world roster to real world ids. - autoSave returns success; "Save & Exit" falls back to a …a4bbde9
-
Icon pass: reuse the game's data icons for research, planets, market
Claude +1: Claude Opus 4.8Unverified signatureCarry the same iconography the rest of the game uses into the places that were text-only, reusing existing emblems as much as possible: - makeButton now supports an emoji icon ({emoji}) alongside the sprite icon ({kind,type}), sharing the .btn-icon tile. - Research buttons: TECHS and doctrine UPGRADES gain an `ico` — reusing the commodity icons where a node maps to a good (metals ⛓️, electronics 🖥️, antimatter 🌀, AI cores 🧠) and thematic emblems otherwise (⚡🔩🤖🛠️ / assault ⚔️, bulwark 🛡️, logistics 📦). Shown on the Research buttons, the "Researching …" row, and the "researched" rows. - Starmap: each world shows its controlling-faction emblem (data.js FACTIONS ico — ⚖️ Core, ⛏️ Miners, 🌾 Agri, 🔬 Syndicate, 🛰️ Frontier). - Market rows: prefix the commodity's data icon + proper name (🪨 Ore, 💎 Crystals …), matching the resource readout. Buildings/units already use their map sprite as the button icon. `ico` is inert data (like name/desc), so 517 tests still pass.…28e5839 -
Fix: cargo-ship buttons at the CC did nothing (missing from produces list)
Claude +1: Claude Opus 4.8Unverified signatureThe Command Center's HUD menu offered Hauler / Heavy Hauler / Bulk Freighter, but command.produces still only listed worker/ranger/colonyship — so queueProduction rejected the click and nothing happened. Added the three cargo ships to command.produces; they stay out of skirmish via the existing odysseyOnly gate in queueProduction. Added a regression test (the CC's produces list includes the cargo ships and queueProduction actually queues a Hauler). 517 pass. Browser-verified: clicking Produce Hauler queues and builds it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AEQUVetLk31Jj7niDQAsXLd39a77e -
Odyssey freight: cargo ships in three sizes set the jump's cargo hold
Claude +1: Claude Opus 4.8Unverified signatureReplaces the flat 300-unit auto cargo hold with real freight logistics: a jump's cargo hold is the combined capacity of the CARGO SHIPS you stage for it. No cargo ship, no freight — hauling goods between worlds now means building shipping. - entities.js: three Odyssey-only cargo ships, Spaceport-gated, role "freighter" (unarmed — escort them): Hauler (hold 250, 1 supply), Heavy Hauler (650, 3), Bulk Freighter (1600, 6). Bigger holds cost more ore, supply, and Spaceport jump-capacity, so shipping scales with investment. - galaxy.js: freightCapacity(riders) = summed cargoHold of the staged cargo ships; cargoManifest(from, capacity) + loadCargo fill most-valuable-first up to it; jumpCapital uses the staged ships' capacity (CARGO_CAPACITY removed). - hud.js: Command Center produces the cargo ships (locked until a Spaceport exists, with sprite icons + a "cargo N" stat in the tooltip); the Spaceport panel's cargo hold now reflects the staged ships' capacity. - render.js: the n…97f8989 -
Fix: coming back from a portless world no longer drags the fleet home
Claude +1: Claude Opus 4.8Unverified signatureThe catch-22 fallback evacuated EVERY unit off a portless world, so hopping back to a base to fetch a colony ship dragged the whole fleet you'd transported over back with you — not what you wanted (you meant to leave it there). Now a no-Spaceport fallback is a pure CONTROL SWITCH: it moves no units, so the force you left stays put. The catch-22 is still solved (you hop back for a colony ship and bring the ship TO the stranded force, rather than the force home). To actually ferry units off a world you still build a Spaceport and stage them — the normal, deliberate path. The Spaceport launch (staged, capacity-capped) is unchanged, so reinforcement hops still work. Updated the stranded-fallback test to assert the transported fleet stays on the world left behind (res.riders === 0), not evacuated. 515 pass. Browser-verified: a 5-ship fleet jumped to a new world stays there when you come back home. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/c…7c036e8 -
Fix Odyssey catch-22: a portless world can fall back to a held one
Claude +1: Claude Opus 4.8Unverified signatureBug: jump an army to a new world without a colony ship and you're stranded — no Command Center means no worker to build a Spaceport, and no Spaceport means no way to jump back for the colony ship. Softlock. Fix: a Spaceport on the CURRENT world still lets you jump anywhere, but WITHOUT one you can always FALL BACK to a world where you hold a base (a Command Center or a colony ship). Only opening a NEW frontier needs a Spaceport here. - galaxy.js: canJumpTo(galaxy, destId) — the gate (Spaceport here → anywhere; else → only a world with a player foothold). jumpCapital handles the no-Spaceport fallback by EVACUATING the whole stranded force (there's no pad to meter it). - starmap.js: onWorldClick uses canJumpTo; the header hint explains the fallback when you have no Spaceport. Also fixes a latent id-collision this recovery flow exposes: createGameState resets the global entity-id counter to 1 per world (for deterministic seeding), so once a galaxy holds >1 world, the next thing b…6261999 -
Escort order: right-click a friendly ship to guard and follow it
Claude +1: Claude Opus 4.8Unverified signatureRight-clicking a friendly ship with a group selected now puts the group into a protective escort formation: each unit takes a stable slot on a ring around the target and follows it wherever it's ordered, holding station until given another order. A combat escort still auto-acquires threats that come near the target, then reforms — so it actually protects the ship, not just trails it. - movement.js: escortSlot() — the deterministic per-unit point on the ring around the guarded ship (the ring expands to seat the whole group). Null when the target is gone, so callers drop the order. - commands.js: issueEscort() assigns each unit an {type:"escort", targetId, slot, slots} order (stable slots → deterministic formation). - combat.js / sim.js: handle "escort" for combat, worker, and support units — a persistent follow (never cleared on arrival). Combat escorts fall through the normal auto-acquire first, so they defend then reform. - input.js: a right-click on a friendly UNIT (not bu…b1fda0e -
Add app versioning, auto-update check, save-compat signal, load sanitization
Claude +1: Claude Opus 4.8Unverified signature- Versioning: version.js is the source of truth (APP_VERSION semver, bump per release/merge) plus pure, tested helpers (parseVersion/compareVersions/isNewer/ saveImpact). version.json is the deployed release manifest. A version chip shows in the topbar and the setup menu. - Auto-update check (update.js): a long-lived tab can outlast a deploy, so it fetches version.json (cache-busted) on load + every 30 min and, when the deployed release is newer than this build, raises a dismissible banner with Reload / Later. Network/parse errors are silent. - Backward-compat signal: the banner tells the truth about save data — comparing the manifest's minimum readable save-format versions against the player's stored saves (saveImpact), it says whether they carry over ("✓ Backward compatible") or would be orphaned ("⚠ won't load — export to a file first"), nudging a file Save. - Load sanitization (engine/persist.js sanitizeSave, run at the top of both deserializers): a save from a …755b556 -
Odyssey: never lose — a wipeout sends relief; surrender is the only end
Claude +1: Claude Opus 4.8Unverified signaturePer follow-up: as long as the player hasn't surrendered, life goes on. - No defeat at all. checkGalaxyLoss is gone; checkGalaxyRescue replaces it: if you ever hold no foothold anywhere (every Command Center razed, no colony ship left), a RELIEF colony ship is dispatched to your active world's landing zone so you can re-found and fight on — instead of a game over. A sim-time cooldown (RELIEF_COOLDOWN) bounds the churn if relief keeps getting farmed, and its arrival raises a toast. Deterministic (sim-time gate, no clock/RNG). - Surrender is the one terminal state. surrenderGalaxy ends the run on the player's explicit choice; a new "🏳 Surrender Odyssey" button in the galaxy map (two-click confirm, arms red) drives it via boot.surrenderOdyssey. The game-over screen shows surrender copy ("you lay down your flag"); the old win/defeat Odyssey copy is retired (the sandbox has neither). - victory.js: the per-world checkEndlessLoss comment updated — a galaxy never loses, it…76e5854 -
Odyssey: 3-tier Spaceport (supply-capacity jumps), no wins, milestone fireworks
Claude +1: Claude Opus 4.8Unverified signatureThree changes to the open-world Odyssey, per request. 3-tier Spaceport with population-limited jumps: - A Spaceport now has a tier (1..3), upgradeable in place for escalating ore (upgradeSpaceport), like the Capital fortification. Its jump capacity — measured in ship POPULATION (supply), not head-count — scales 12 → 24 → 40. - A jump lifts only up to the pad's capacity (jumpManifest, closest-to-the-pad first, skip-not-break fill); a fleet larger than that crosses over several jumps, the overflow waiting at the origin pad. jumpCapital carries the manifest and reports what it left behind. - HUD: tier + capacity line, a live staged-fleet manifest (what lifts, what waits), and an upgrade button. render.js draws tier pips on the pad. No win conditions — play forever: - The Antimatter Gate and Domination no longer END the run. checkGalaxyProgress and checkDomination now emit one-time progress milestones instead of a victory; checkEndlessWin is suppressed for galaxy states (…947d9db -
Odyssey: free travel between held worlds, no colony-ship jump mandate
Claude +1: Claude Opus 4.8Unverified signatureJumps no longer require a colony ship on the pad. A Spaceport alone can launch, carrying whatever you stage — a colony ship (to settle new ground), an army (to reinforce a colony), or nothing (to hop back and control a world you already hold). Returning to any world you've visited is free; only reaching a NEW world costs the JUMP_COST fuel. - galaxy.js: canJump = a completed Spaceport (drop the vessel gate); jumpCost(galaxy, destId) = 0 for a held world, JUMP_COST for a new one; jumpCapital de-mandates the colony ship and charges jumpCost. - Defeat becomes galaxy-wide (checkGalaxyLoss, run in stepGalaxy): you're beaten only when no Command Center and no colony ship stands on ANY world — so an army-only hop, or a trip to fetch a forgotten colony ship, is never an instant loss while a base holds elsewhere. - victory.js: checkEndlessLoss skips galaxy states (state.inGalaxy), so the per-world check can't fire a false defeat on a world you don't hold; it still governs a stand…51531fb -
Odyssey: the Spaceport jump carries a colony ship, not a deployed base
Claude +1: Claude Opus 4.8Unverified signatureThe interplanetary jump was still teleporting a deployed Command Center to the destination (the origin lost its base). With colony ships as the mobile "seed of a base", that's wrong: a deployed base is permanent. The jump now carries a COLONY SHIP. engine/galaxy.js: - jumpVessel(state) replaces jumpableCC: the jump needs a player colony ship staged within JUMP_LOAD_RADIUS of a completed Spaceport (canJump = !!jumpVessel). - jumpCapital relocates the staged expedition (the colony ship + any army loaded with it), the credit fuel and the cargo hold — and NO deployed base. The origin keeps ALL its buildings and becomes a background colony; deploy the ship at the destination to found your base there. Refused (no fuel spent) if no colony ship is on the pad. - The Capital is reframed: like every deployed base it's permanent and never travels (its double-HP fortification still stands). hud.js/starmap.js: the Spaceport panel and starmap now say "send a Colony Ship" and lock the jump…a6b556b -
Odyssey: colony ships — start with a mobile ship, deploy it into a base
Claude +1: Claude Opus 4.8Unverified signatureReframes Odyssey expansion. Both sides now START with a mobile Colony Ship instead of a placed Command Center; you DEPLOY it in place to found your first base (which can then be upgraded to the Capital). New bases are no longer built from scratch by a worker — you build a Colony Ship at a CC, move it to the site, and deploy it there. Core (engine/colony.js, engine/entities.js, engine/state.js): - colonyship UNIT — odysseyOnly, non-combat (unarmed, never auto-acquires, transparent to the army/threat scans, but still shootable so it's a real escort risk), hp 600, cost 500 ore (a mobility premium over the CC's 400), supply 3. - deployColonyShip(state, id): validates the footprint (canPlaceBuilding), consumes the ship, mints a COMPLETED Command Center + disembarking colonists (3 workers). Instant and pure — no clock/RNG. hasColonyShip is the shared foothold predicate. - seedPlayer seeds a colony ship for endless; the SKIRMISH branch (a placed CC + 3 workers) is byte-identical, s…24f7ec5
-
Odyssey: upgrade a Command Center into the anchored Capital
Claude +1: Claude Opus 4.8Unverified signatureFollow-up to multiple CCs: you can now improve ONE Command Center into your Capital — a fortified anchor — while the "smaller" (non-capital) CCs are what relocate between worlds. engine/galaxy.js: - upgradeToCapital(state, building): pay CAPITAL_UPGRADE_COST (400 ore), mark the CC as the Capital, and scale its HP by CAPITAL_HP_MULT (×2 → 2000). One Capital per owner, never on a constructing CC. Deterministic; the flag + raised HP ride the building object, so they persist across save/load for free. - jumpableCC(state): the first non-capital player CC — the one a jump relocates. - canJump now requires a Spaceport AND a jumpable (non-capital) CC. - jumpCapital relocates the jumpable CC and refuses (no fuel spent) when the only CC is the anchored Capital. hud.js: the CC panel shows "◆ Upgrade to Capital" (or, once upgraded, an anchored-fortress note); the Spaceport panel locks its jump buttons with a clear reason and warns when your only CC is the Capital. Capital/jumper state fo…4cfb896 -
Odyssey/RTS UX: pausable factories, box-select prefers fighters, sub-select by type
Claude +1: Claude Opus 4.8Unverified signatureThree requested quality-of-life changes. Pause producers (engine/industry.js + hud.js): a Smelter (or any factory) can eat ore faster than you want. A selected factory now has a Pause/Resume button; a paused factory consumes no inputs, banks no output, and frees its reserved Power for the rest of the grid (or a charging Gate). The status line reads "Paused". The flag rides the building object, so it persists across save/load for free. Box-select prioritises the army (input.js): a drag-box that catches any fighter now drops the workers from the selection, so sweeping across your base to grab your army no longer drags the miners along. A box with no fighters still selects workers as before. Sub-select by type (input.js + hud.js): when a mixed group is selected, the aggregated type rows ("3× Bastion", "12× Skiff") are now buttons — click one to narrow the selection to just that type. Single-type selections render as before (nothing to sub-select). Tests: +1 industry (a paused factory …332cd22 -
Odyssey Tier-4 "the finale": AI sieges a charging Gate, war provocation, tribute agency
Claude +1: Claude Opus 4.8Unverified signatureThe economic (Antimatter Gate) win was a ~2.5-min passive wait — nothing shot at the Gate, and on a rich world the neighbour might not even be at war. Tier 4 turns it into a DEFENDED finale, adds a diplomacy lever, and removes the late-game plateau. Siege targeting (engine/ai.js): once the AI can SEE the player's charging Gate, every wave converges on it — razing the galaxy-ender outranks even an economy raid. Shares one detector, chargingPlayerWonder (engine/wonder.js). Fog-gated (the AI must have eyes on the Gate) and Odyssey-only: in a skirmish state.diplomacy is undefined, so the target pick is byte-for-byte the original — skirmish replay untouched. War provocation (engine/diplomacy.js): a charging Gate sinks the neighbour's stance target from just-past-war (charge→0) to fully hostile (charge→1), flowing through the existing hostility() channel so muster, committed fraction AND wave cadence all escalate as the Gate nears firing. Only ever lowers the target, so on an already- depl…1204447 -
Odyssey Tier-3 "make it legible": factory panels, iconed topbar, grouped build menu, hostile heads-up
Claude +1: Claude Opus 4.8Unverified signatureThe chain and the economy were running but invisible. This is the UX pass that surfaces them — no sim changes to the win paths, only what the HUD shows. #8 Factory selection panels: clicking a Smelter/Assembly Plant/… used to read only "420/420 hp". It now shows the recipe (2 ore → 2 Metals · ⚡2) and a colour- coded status answering "why isn't my antimatter rising?": Running (with live output rate), Throttled N% — low Power, Starved — needs <input>, or Stalled — no Power. A Reactor gets its own line (Grants ⚡20 Power) since it runs no recipe. The status mirrors updateProduction's own limits exactly and rides the panel signature so it stays live without a per-tick rebuild. #10 Topbar + build menu legibility: resource readouts are now iconed and empty stockpiles are suppressed (a fresh Odyssey no longer shows "ai: 0, antimatter: 0" across a dozen unmade goods) — ore always stays visible. The ~18-building Odyssey build menu is grouped Economy / Military / Endgame / Travel, keeping the e…820fa12 -
Odyssey Tier-2: the Domination victory — a military win path + the Gate/fleet fork
Claude +1: Claude Opus 4.8Unverified signatureThe review found the open-world meta-layer (jump, colonies, cargo, army) was optional scenery: you could win the single-world Antimatter Gate without ever building a Spaceport, and the Leviathan/Star Dock had no purpose (it costs the same strategic goods as the Gate but there was no military win). Razing a neighbour's Command Center did nothing — a free "decapitate then turtle" exploit. This adds a second, galaxy-wide win: DOMINATION. Raze the neighbour's Command Center on DOMINATION_TARGET (4) worlds and you conquer the galaxy. A world is "pacified" the moment its AI capital falls; pacification is sticky (a rebuilt capital can't un-take it) and win-progress. This creates the game's central strategic fork — the tall, single-world economic win (the Gate) vs the wide, multi-world military campaign — and makes the jump, a mobile army, and the Leviathan base-cracker all load-bearing. - engine/galaxy.js: galaxy.pacified (a Set), checkDomination() in the stepGalaxy tail (twin of checkGal…7acc706 -
Odyssey Tier-1 "make it playable": fix the threat curve + cheap wins
Claude +1: Claude Opus 4.8Unverified signatureA gameplay review (instrumented headless runs + a critique team) found Odyssey's threat curve and win curve ~6x out of sync: war reliably began at ~minute 4 (two economies mine the shared world to the old 23%-depletion war threshold that fast, and "peace" only gated the AI's ATTACKING, not its arming), so a turtling economy player was dead by minute 6-12 — while the Antimatter Gate win needs ~25-35 min. The whole economy was, in practice, unreachable. - engine/diplomacy.js (#1, the critical fix): a 7-minute GRACE window floors the scarcity target at cordial so a fresh economy can establish, and a much gentler souring curve (war at ~47% depletion, full hostility only near total depletion, slower drift) moves the war into the mid/late game. Empirically: war onset moves from ~min 4 to ~min 8-21, and a base with a reasonable defensive core now SURVIVES the full 35-min win window across seeds (previously the CC fell by min 6-12). #2 ("pressure, not exterminate") falls out for f…e46bcce -
Fast-follow: cargo-on-jump — make here, sell there
Claude +1: Claude Opus 4.8Unverified signatureCloses the honest gap Phase 4 flagged: jumps carried the CC + units + credits but not goods, so cross-world goods arbitrage was impossible. A jump now hauls a capacity-bounded CARGO HOLD of MANUFACTURED goods to the destination, so a run of production on one world can be sold on another (produced goods price differently by world — engine/market.js), completing the make-here/sell-there loop. - engine/galaxy.js: CARGO_CAPACITY (300), cargoManifest (pure — what a jump would haul, most-valuable-first: machinery > electronics > alloys > metals), and loadCargo, called in jumpCapital; the jump summary now includes the cargo. Raws are too cheap to bother and strategic goods stay committed to the origin (which also keeps the hold empty until you've industrialized, and leaves every existing jump test untouched). - hud.js: the Spaceport jump panel previews the cargo hold ("300/300: 100 machinery, 200 alloys — hauled to sell at the destination"). - test/cargo.test.js: goods haul to th…f13e05b -
Fast-follow: complete the Strategic tier — AI Cores, Plasma Torpedoes, the Leviathan
Claude +1: Claude Opus 4.8Unverified signatureFinishes the Strategic tier the Phase-3 MVP deferred, and gives the two new goods two purposes (a superweapon and the endgame wonder) — the shared-currency tension the design called for. - techtree.js: the `aicores` node (Machine Minds) unlocks the two remaining forges. - entities.js: AI Foundry (electronics+crystals → AI Cores) and Torpedo Works (antimatter+alloys+radioactives → Plasma Torpedoes), both odysseyOnly fixed-recipe factories (zero industry.js change — pure data); the Star Dock, which trains the Leviathan — an Odyssey-only capital ship costed in AI Cores + Plasma Torpedoes you must MANUFACTURE (can't be bought). It deliberately exceeds the skirmish specialists (flagged odysseyOnly so the skirmish-roster balance invariants scope around it), but 8 supply + a strategic-good price keep it in check. - The Antimatter Gate now feeds on the WHOLE tier (ai + antimatter + plasmatorp), clamped to the scarcest — so the win demands the full strategic economy, and every …b50413b -
Odyssey Phase 4: faction & planet specialization (where you settle matters)
Claude +1: Claude Opus 4.8Unverified signatureFinal phase of the economy import: a world's stats now shape its economy, so choosing where to settle/jump is a real economic decision. Reconciled from a three-way brainstorm — the honest finding is that jumps carry the CC + credits but NOT cargo, so literal "make here, haul there, sell there" is impossible; Phase 4 delivers per-world production/market CHARACTER instead, and defers cargo-on-jump. - engine/industry.js: planetIndustryScale — a world's `industry` rating (1..10) scales factory speed, the RATE twin of Phase 2's researchTimeScale (same clamp [0.5,2], pivot 5). Forge (10) runs 2×, Oort (2) 0.5×. Applied to updateProduction only, so it's a no-op on the skirmish path. - engine/market.js: finished goods (metals/alloys/electronics/machinery) now price by the world's industry — cheap where they're mass-made, dear on a frontier world that can't — continuous with the old flat 1.5× at the industry-5 pivot. This gives a low-industry world a real niche (top prices for manu…016957e -
Odyssey Phase 3: the Strategic tier + the endgame win (Antimatter Gate)
Claude +1: Claude Opus 4.8Unverified signatureOdyssey has been endless and loss-only. Phase 3 gives it a destination: complete the chain to the Strategic tier and fire the Antimatter Gate to win the galaxy. Reconciled from a three-way brainstorm toward the skeptic's "ship the win, one clean vertical slice" — one strategic good, the wonder, and the win machinery. - engine/wonder.js (new): updateWonder — the Antimatter Gate charges by consuming antimatter over a power-throttled chargeTime (competes with your factories for the grid), clamped to stock so it stalls when starved and never goes negative. Goods are spent as fed, so a razed Gate loses the whole investment. Odyssey-only, a no-op off a `wonder` building — skirmish tick untouched. - engine/victory.js: checkEndlessWin — the twin of checkEndlessLoss; a full-charge player Gate wins. Wired into sim.js's endless branch (win-first) and the building loop (updateWonder). - engine/galaxy.js: checkGalaxyWin in the stepGalaxy tail — a Gate left charging on a background CO…15e011a -
Odyssey Phase 2: the research tree (Datacenter + deeper industry)
Claude +1: Claude Opus 4.8Unverified signatureSecond slice of the economy import: an Odyssey-only research tree that gates and deepens the production chain — paid in gathered commodities and developed over time, no separate tech currency (the game's law: the resources you gather are the resources you spend). Reconciled from a three-way design brainstorm. - engine/techtree.js (new): TECHS (6 nodes — 3 unlock the buildable spine, 3 are industry passives), researchTech (start a project: prereq/afford checks, pay, timer), updateResearch (dt-driven progress → banks the node into player.upgrades, a no-op for any non-Datacenter — same inert pattern as updateProduction), researchTimeScale (a world's tech rating makes it develop faster — Syndicate hubs out-research), techMult (the tech-tree twin of upgradeMult for passives). - Research lives in player.upgrades — the SAME bag the doctrines use — so nodes gate buildings via the existing prereqsMet with zero new gating machinery, and committedDoctrine/upgradeMult (which guard o…fb3a2d7 -
Odyssey Phase 1: the production chain (Reactor → Smelter → Assembly Plant)
Claude +1: Claude Opus 4.8Unverified signatureFirst slice of importing the turn-based game's economy into the RTS: an Odyssey-only production spine that turns raw hauls into refined goods worth real credits. Proves the gather → refine → payoff loop end to end. - engine/industry.js (new): Power is a per-tick FLOW modelled on supply.js — Reactors grant capacity (energyGrants), factories draw it (a recipe's energy × prodRate), both recomputed on demand so a razed Reactor throttles industry with zero bookkeeping. updateProduction runs a building's recipe continuously and fractionally, consuming inputs from the global stockpile (intermediates are just more float keys in player.resources) and banking output, throttled by available power and clamped to inputs in stock. Deterministic, DOM-free. - entities.js: Reactor / Smelter (ore→metals) / Assembly Plant (metals→alloys), all ore-costed and flagged odysseyOnly. - sim.js: updateProduction wired into the building loop — a no-op for any building without a recipe, so the byt…5de119a -
Persist the Odyssey AI wave-cadence clock (aiNextWaveAt)
Claude +1: Claude Opus 4.8Unverified signatureAdversarial review of the previous commit found that the aggression ramp's new per-world field state.aiNextWaveAt — the Odyssey offense cadence, set to a future time in ai.js and read as `state.time >= (aiNextWaveAt ?? 0)` — was not serialized. On reload it came back undefined, so a hostile world became wave-ready immediately and fired its next probe up to a full cadence early, breaking the save/load "continue-identically" invariant. The round-trip tests missed it because they only run a few seconds of peaceful sim, so no wave is ever scheduled. Add aiNextWaveAt to serPlanet's AI block and rehydratePlanet's restore, and a targeted regression test (a scheduled future cadence must survive a save/load, not reset to wave-ready). Full suite 396 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AEQUVetLk31Jj7niDQAsXL189f332 -
Odyssey: perf throttling, galaxy save/load, aggression ramp, cleanups
Claude +1: Claude Opus 4.8Unverified signatureImplements the three remaining review items (each brainstormed by a subagent, then reconciled into one plan). Perf — background-world throttling (engine/galaxy.js, boot.js): - stepGalaxy() advances the whole galaxy per frame: the active world at full cadence, background colonies on a coarser fixed step (BG_STEP×dt) spread round-robin by roster index. Keyed to an integer galaxy.tick, so it's deterministic (no wall-clock, no Map-order dependence) and conserves each colony's sim time. boot.js's loop calls it instead of ticking every world every frame. Galaxy save/load (engine/persist.js, saveload.js, boot.js, setup.js, hud.js): - serializeGalaxy/deserializeGalaxy extend the existing seed+delta persistence: a shared serPlanet/rehydratePlanet core (maps regenerate from seed; entities, node amounts, fog memory, AI bookkeeping restored), plus per-world market pressure + diplomacy stance and the galaxy meta (credits, active world, tick, entity counters, the shared global id…7e2a606 -
Odyssey improvements: felt diplomacy, colony income, honest starmap
Claude +1: Claude Opus 4.8Unverified signatureFollow-up on a review of the Odyssey mode — the three highest-impact fixes, so the living-galaxy systems actually manifest in play. Diplomacy now lands within a session (engine/diplomacy.js): - Sharper scarcity curve (full → +0.45, ~30% mined out → hostile) and a faster drift, so a neighbour measurably sours as a world depletes — reaching Wary/war around the mid-game instead of effectively never (measured: still Cordial at 10 min before; Wary by ~10 min now, and faster once the player is also mining). - Player aggression is a second driver: every enemy ship you destroy on a world drops the stance at once, read from the change in the neighbour's unit count so catch-up substeps can't double-count. You can now break the peace yourself, and forgiveness comes only from the drift back. Colonies are assets, not husks (engine/galaxy.js): - A held background colony sends home passive income each tick (COLONY_INCOME_PER_BUILDING per surviving player building), so the worlds y…b1db01d