Spaces:
Paused
Paused
Commit History
-
Tier 4 combat: Sentinel Turret and the Breacher siege unit
Claude +1: Claude Fable 5Unverified signatureStatic defense and the answer to it, shipped together so neither creates a degenerate strategy on its own. Sentinel Turret: a crystal-costed building (the first repeatable crystal sink) that acquires and fires through a new updateBuildingCombat in the sim's building loop. Combat's fire path is refactored into a shared performAttack used by units and turrets alike, so Overcharged Weapons already multiplies turret damage and all kill/event bookkeeping stays in one place. attackDamage stays strictly additive — a new bonusVsBuildings class bonus is 0 for every unit-vs-unit pairing. Breacher: a radioactive-costed Barracks unit deliberately outside the Skiff/Bastion/Lancer triangle. It outranges the turret and hits every building for a flat class bonus (prefersBuildings targeting), but has the worst anti-unit DPS in the game and dies to a single Skiff at half its cost — a turtle-breaker that is helpless without an escort. acquireTarget is refactored around a nearestEnemy helper; the defau…e6d8701 -
Tier 4 foundation: placement validation, buildable expansion CC, guaranteed ore
Claude +1: Claude Fable 5Unverified signatureAdd engine/colliders.js as the single source of truth for building placement: canPlaceBuilding rejects overlap with buildings, live resource nodes, and map bounds (units are deliberately ignored — they move, and separation already untangles them), and findPlacement does a deterministic outward ring search so the AI can slide a fouled build spot to nearby valid ground. issueBuild now validates placement before charging, so a rejected spot never leaks resources. The AI routes its barracks/refinery spots through findPlacement in the same change, so validation can't stall its build order. Make the Command Center buildable (400 ore, 30s) instead of free and instant; the starting CC is still seeded complete. Multi-CC dropoff and all-CCs victory already worked, so an expansion is a real second base with no further plumbing. generateMap guarantees a lean mirrored ore cluster near each base on any world whose deposit table yields no ore (distance-triggered, so ore-bearing maps stay byte-iden…1c88bda -
Tier 3: repeated AI waves + counter-building, combat feedback, minimap, build validation
Claude +1: Claude Sonnet 5Unverified signatureAI: - Replace the one-shot attack flag with a home-army/committed-army split, so the AI launches repeated waves for the rest of the match instead of attacking exactly once and then sitting on an ever-growing army. - Every third unit built reacts to whatever combat type the player fields most, building its hard counter (derived from the bonusVs tables, not hardcoded) instead of blindly following the archetype's mix -- the Skiff/Bastion/Lancer triangle now actually matters to the AI's play. Combat feedback: - attackHit/entityKilled sim events now carry enough info for a new effects.js (transient, client-side) to drive tracer lines and death flashes, drained each render frame the same way sound events already were. Situational awareness: - A minimap (fog, deposits, units/buildings, camera viewport) that doubles as a click-to-jump camera shortcut. - An "Under Attack" banner + alarm sound + world/minimap ping when the AI lands a hit on the player, throttled so a siege …cae3dc6 -
Add the Lancer: close the rock-paper-scissors triangle
Claude +1: Claude Sonnet 5Unverified signatureSkiff/Bastion was a single hard counter, not a real RPS cycle. The Lancer is a third combat unit (long-ranged, armor-piercing, squishier than a Bastion) whose bonus damage targets Bastion specifically, while Skiff's existing speed/cost edge is repurposed with a new bonus against Lancer — so each unit counters exactly the matchup that would otherwise be its worst, and nothing beats all three at once. - entities.js: new lancer unit def, bonusVs wired for all three legs of the cycle, added to Barracks' production list - render.js: distinct 4-pointed star silhouette so all three combat types plus Worker read apart at a glance - main.js: Produce Lancer button - aiArchetypes.js/ai.js: bastionRatio replaced with a generic unitMix cycle per archetype (all three now include Lancer), and the AI's army filter/attack-wave logic generalized off UNITS[type].role instead of hardcoded Skiff/Bastion checks - new combat.test.js/entities.test.js coverage proving each leg of the cycle and tha…89c12eb -
Tier 2: rally points, Refinery upgrades, AI archetypes, and sound
Claude +1: Claude Sonnet 5Unverified signatureFour features, in dependency order (smallest/most self-contained first): ## Rally-point UI (engine/commands.js, input.js, render.js) Right-click a single selected production building (Command Center or Barracks) to set where it sends newly produced units — the engine already stored an arbitrary rally point per building and read it fresh at spawn time, there was just no way to change it. Shows a dashed line + marker for the currently selected building only, to avoid cluttering the view with every building's rally line at once. ## Refinery + upgrades (engine/entities.js, production.js, combat.js) A new building (built by a Worker like the Barracks) researches two one-time, player-wide purchases: Reinforced Plating (crystals, -15% damage taken) and Overcharged Weapons (radioactives, +20% damage dealt). Both are live multipliers applied in combat.js's damage calculation rather than baked into unit stats at spawn, so they affect a player's whole army immediately, not just future product…9eded26 -
Tier 1: camera + zoom, fog of war, and a Skiff-countering unit
Claude +1: Claude Sonnet 5Unverified signatureThree independent features, the biggest-leverage items from a brainstormed improvement list, built in dependency order (fog of war's reveal effect only means something once you can actually pan around to see it). ## Camera + zoom (camera.js, new) The whole 1600x1000 map used to be squeezed into one screen — units were tiny dots. The canvas is now a fixed-resolution viewport with a camera (pan via WASD/arrows, zoom via mouse wheel toward the cursor, clamped to map bounds) instead of a 1:1 map-to-canvas mapping. render.js draws through a camera transform; input.js's toWorld() converts screen->world through it too, so selection/commands keep working exactly as before. Fixed a latent bug while wiring this up: attachInput() was never cleaning up its event listeners, so every "Choose another battlefield" replay stacked a fresh full set on the same canvas/window — added an AbortController-based destroy(). ## Fog of war (engine/fog.js, new) A coarse grid tracks which cells are currently in…34ea8bc -
Multiple workers can assist a build; fix skiffs getting stuck fighting
Claude +1: Claude Sonnet 5Unverified signatureTwo independent fixes, both about giving the player more control: 1. Multiple workers can now speed up the same construction. Right- click a worker onto an already-founded (constructing) friendly building to send it in as an extra builder — no new cost, it's not founding a second building. updateBuildingConstruction now scales its rate by how many same-owner workers are actually standing on site (capped at 4, so massing a crowd on one site has a limit), while a lone founding worker still builds at the original, unchanged pace. issueAssistBuild (commands.js) is the new player-facing command; BUILD_REACH is now shared between production.js and sim.js so "counts as on-site" and "close enough to stop walking" agree. 2. Skiffs (and any future combat unit) could not be redirected once an enemy wandered into aggro range: updateCombat called acquireTarget unconditionally whenever there wasn't an explicit 'attack' order, so a plain 'move' order got silently…e735d2f -
Give units proactive local avoidance, not just after-the-fact separation
Claude +1: Claude Sonnet 5Unverified signaturePreviously the only anti-stacking logic was separation.js's reactive pass, run after movement each tick to push already-overlapping units apart. Units still walked straight through each other to get there — correct eventually, but visibly "stepping on" one another en route. stepToward() now senses same-owner units ahead of it (within a radius beyond their combined size) and steers laterally around them while moving, so a group naturally routes around a neighbor instead of overlapping it and getting shoved apart afterward. Opposing-owner units are still ignored, same as separation.js, so combat can still close to weapon range. Caught a real deadlock while testing this: pure radial repulsion (push directly away from the neighbor) has zero sideways component when the neighbor sits exactly on the straight-line path — by symmetry there's no "which way to dodge" signal, so a unit just stalls dead behind it forever. Fixed by steering perpendicular to the direction of travel instead of radia…9175b1f -
Fix stacked resource nodes: same overlap bug, at map-gen time
Claude +1: Claude Sonnet 5Unverified signature"resources are stacked" — each commodity type picked its cluster y-position independently (its own t = i/(count+1) spacing), with no coordination between commodities, so an ore cluster and a crystals cluster could land on the exact same point. Confirmed: on Ferros Prime with rng()=>0.5, an ore node and a crystals node generated at distance 0.0 on both mirrored sides. Same fix shape as the unit-separation pass: generateMap now runs a relaxation pass after placing every commodity's clusters, pushing any two nodes closer than their combined render radius apart, regardless of what they are — not a per-commodity spacing tweak. Verified zero overlapping pairs across all three map choices and several seeds, including the exact seed that reproduced the bug. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmJ8vc9jxc6TUegK9F2YJffc36f9 -
Add a general same-owner unit separation pass to actually fix stacking
Claude +1: Claude Sonnet 5Unverified signatureThe formation-spread fix only covered the two places that explicitly issue a group order (player right-click, AI's attack wave) — it missed the actual case the user hit: production.js sends every freshly spawned unit to the exact same building.rally point directly, with no formation spread at all, so units piling up after production still stacked solid. Rather than patch each spawn/order site individually, engine/sim.js now runs a generic applySeparation() pass every tick: any two same-owner units (any type, however they got there) that end up overlapping get pushed apart proportional to the overlap. This is a correction pass independent of orders, so it catches stacking from any source — rally points, group moves, gather nodes, future code that assigns positions some other way — instead of needing a fix at every place that sets a destination. Different-owner pairs are left alone so opposing units can still close to weapon range. 6 new tests cover pairwise separation, the coincident-…a8d58c2 -
Fix skiff visibility and group-move stacking
Claude +1: Claude Sonnet 5Unverified signatureThe triangle shape from the last commit was there but nearly invisible: its outline color (#05070f) was literally identical to the canvas background, so anti-aliasing blurred its corners into what read as just another circle. Outline is now a light color that actually contrasts, and the triangle draws bigger (radius x2). Separately, any multi-unit move or attack-move sent every unit to the exact same point, so a group converged into one visually stacked pile mid-transit — including the AI's own attack wave, which set each skiff's order directly rather than going through the shared command helpers. issueMove/issueAttackMove now spread a group across a small grid centered on the clicked point, and ai.js routes its attack order through issueAttackMove instead of hand- rolling it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmJ8vc9jxc6TUegK9F2YJ3ea9b20 -
Fix worker stacking on a shared node; add a battlefield picker
Claude +1: Claude Sonnet 5Unverified signatureWorkers sent to the same node all walked to its exact center and rendered fully stacked. gather.js now sends each one to a stable per-unit point on a small ring around the node instead, so a group visibly spreads out around what it's mining. Also replaced the hardcoded single map with a pre-game picker (three ore-bearing worlds pulled straight from data.js: Ferros Prime, Korrath, Vesper), each with a genuinely different resource layout since node cluster count scales with the planet's own deposit yields. The post-game overlay now offers "Choose another battlefield" to start a fresh skirmish on a different world without reloading the page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmJ8vc9jxc6TUegK9F2YJ6fe5e5b -
First playable slice: 1v1 skirmish vs scripted AI on Ferros Prime
Claude +1: Claude Sonnet 5Unverified signatureGather ore/crystals/radioactives with Workers, build a Barracks, produce Skiffs, fight, win by destroying the enemy Command Center. engine/ holds the sim: a fixed-timestep loop decoupled from render rate, movement, the gather/deposit loop, combat with auto-acquire, building construction + unit production queues, a scripted AI opponent, and the win condition. render.js/input.js are the canvas view and mouse controls (drag-select, right-click context orders, build placement); main.js wires it to a DOM HUD. Converted data.js's top-level tables to ES module exports so the engine can import them directly. Covered by 23 node:test cases including a full simulated skirmish that plays to a winner, and manually playtested end-to-end in a real browser (gather -> build -> produce -> victory/defeat UI) via Playwright. One real bug caught in that process: constructed buildings never got a `radius` copied onto the instance, which went on to poison unit spawn points and building hit-testing with Na…17641e3