Introduce a second detection layer independent of line-of-sight vision.
Radar buildings (Radar Tower, Advanced Radar) provide coverage that reveals
unit positions through fog as contacts, while Radar Jammers can blind enemy
radar within range without affecting normal sight.
Key changes:
- Add three sensor buildings: Radar Tower, Advanced Radar, Radar Jammer
- Implement computeRadar() with jamming logic and stampDisc() optimization
- Add isDetectedBy() for radar contact detection
- Draw radar contacts as green diamond blips in WorldView
- Show radar contacts as neutral green pips on minimap
- Expand build grid to 2 rows and artwork sheets to 4 rows
- Refuse repair orders on airborne units; builders stop chasing airborne targets
- Add validation for radarRange and jamRange in rules compiler
- Update sprites.md documentation and add comprehensive tests
- Add repair and rally command buttons with custom glyphs and tooltips
- Refactor bottom command bar into a structured, discoverable grid with
visibility filtering per selection type
- Replace patrol's there-and-back with a circuit-based route system;
CTRL-clicking extends the patrol instead of stacking orders
- Builders guarding structures now repair damage first, then assist
production — assist to producing factories now works correctly
- Add Commander death cascade: nuclear blast, outward vaporization wave,
and screen-wide flash timed to the audio sample
- Introduce `fortification` and `air` armor classes; rebalance weapons,
unit HP, and ranges across the roster
- Remove the static hint line; all commands now have prompts and button
tooltips instead
- Add verification tests for patrol routes, guarding builders, vaporised
entity rendering, and the full command bar
Replace hover-based aircraft movement with a two-state system: LANDED
(grounded, cannot shoot, vulnerable to all weapons) and FLYING (at
cruise speed, uses air domain protection). Aircraft can no longer stop
in mid-air; armed units execute strafing passes with overshoot and
come-about logic.
Key changes:
- Add `liftFrac` simulation state for altitude, `airborne` dynamic flag
(vs static `isAir`) so landed aircraft are ordinary ground targets
- Implement `stepStraferOrders` for aircraft that overfly targets and
repeat passes; idle aircraft clear hostile keepout zones
- Add `overshoot` and `keepout` flight properties to fighter/bomber
- AI gains static defense (Laser Tower, Missile Launcher) at skill 4+,
with threat-based placement and economy gating
- Fighter gains ground gun (pintlegun); air management uses `airClaimed`
set instead of interceptor-only classification
- Update campaign m05 seed (71644) to compensate for balance shifts
- Update tooltips, documentation, and tests for new behavior
Closes#1234
- Add `flight` blocks to Fighter, Bomber, and Hover Constructor in rules JSON
defining height, takeoff time, and landing time
- Implement purely cosmetic altitude system: units ease upward when given
orders and settle back down when idle, using smoothstep easing
- Shadow stays pinned to ground position, fades in and shrinks as altitude
increases — the gap between body and shadow sells the height
- Health/build bars move with the lifted body; selection ring stays on ground
- Add production dials (progress pies) on the player's own factories:
top-left shows whole queue progress, top-right shows unit on the bench
- Pass real delta time to render() for framerate-independent takeoff animation
- Update sprites.md with flight system docs and art implications
- Add stub scene support and comprehensive verification tests
Introduce a two-layer domain system (ground/air) that separates units into
independent simulation layers. Air units ignore the nav grid, never collide
with ground units, and can only be targeted by weapons listing "air" in their
targets. Hover units gain water-crossing ability via the move class cost table.
New content:
- Fighter (air interceptor with AA cannons)
- Bomber (ground-attack aircraft with bomb rack)
- Hover Constructor (water-crossing builder)
- Airfield (produces all three air units)
AI gains air superiority management: interceptors hunt enemy aircraft instead
of joining ground pushes, and the production mix auto-counters observed enemy
air. Ground anti-air (rocket troopers/tanks) also gain targeting weight.
Rendering adds a dedicated depth band for aircraft above all ground actors,
plus a displaced shadow sprite for altitude perception. HUD tooltips display
domain and weapon targeting information.
Validation ensures domain/moveClass agreement, requires at least one anti-air
weapon when air units exist, and excludes air classes from corridor generation.
Comprehensive test fixtures cover domain separation, collision, splash, and
order handling.
Idle builder units now automatically repair damaged allied structures
and units within their build range. A priority system ensures defensive
buildings are repaired before factories and other buildings. Auto-heal
orders are marked as non-player-assigned so explicit player orders
always take precedence. Builders can re-prioritize targets on a
retargeting cadence, similar to combat target acquisition.
Includes visual asset updates for TA arm and core units/structures.
Adjusts test to isolate passive self-heal from the new auto-heal mechanic.
- Introduce configurable victory modes: "commander" (default, kill enemy commander) and
"annihilation" (fight until army can no longer produce)
- Add Laser Tower (1x1, hitscan) and Missile Launcher (2x2, guided with min-range dead zone)
as buildable defensive structures with new towerlaser and towermissile weapons
- Units now hold at weapon range when attacking buildings instead of closing to point-blank,
controlled by new engageHoldFraction constant (0.45)
- Replace center-to-center distance with surface distance for building targets; buildings are
treated as rectangles with true half-extents, improving combat accuracy
- Buildings (towers) now freely traverse and aim in all directions regardless of art orientation
- Commander unit flagged with isCommander; victory conditions validate presence of commanders
- Update campaign missions to use destroyCommander objective; reseed m02 (old seed unwinnable
after combat balance changes)
- Add skirmish setup UI for selecting victory conditions
- Update AI skill ladder verification thresholds to account for engage hold behavior
- Add comprehensive tests for victory conditions and defensive structures
Allow builders to repair damaged friendly units and buildings by
right-clicking them. Repair cost and duration are proportional to the
damage healed (X% HP restoration costs X% of build cost and takes X%
of build time).
Key changes:
- New 'repair' order type with validation (own units only, must be
damaged, requires a builder)
- Separate _repairPower accumulator so repairing a damaged factory
doesn't silently speed up its production queue
- Repair drains energy/mass through the same economy machinery as
construction, including brownout throttling
- HUD hints guide players to right-click damaged allies to repair
- Repair order auto-clears when complete; unqueued orders interrupt it
while queued orders wait behind it
- Visual waypoint color for repair orders
- Comprehensive test coverage in verifyTotalAnnihilation.js
- Initialize lastDamagedTick to -1e9 for fresh units (finite sentinel to avoid JSON.stringify null)
- Add lastDamagedTick to serialize/deserialize so the pause timer persists across save/load
- Add comprehensive tests for self-heal behavior:
- Rate verification (~33% max HP/min)
- 30s pause after damage and clock restart on new hits
- Sustained fire suppression
- No overhealing
- Non-selfHeal units don't regenerate
- Damage clock survives save/load round-trip
- Queue multiple orders per unit by holding CTRL (matching original game)
- Draw colored waypoint chains on the minimap/world for each queued order
- Display queued order count in selection detail panel
- Limit queue overlay to MAX_QUEUE_LINES to avoid clutter in large selections
- Use distinct colors per order type (move, attack, patrol, build, etc.)
- Update hint text and placement UI to mention queueing behavior
- Add verification tests for queue append/replace semantics, consumption order,
and queued build orders
Add a complete Total Annihilation clone including:
- TotalAnnihilationGame.js: Main scene with fixed-step loop, input handling,
camera controls, selection, orders, and match lifecycle
- TAHud.js: Resource strip with flow rates, selection info, build/production
grid, minimap with fog of war, and toast notifications
- TAScreens.js: Main menu, skirmish setup, campaign list, pause menu, and
victory/defeat results
- totalannihilation-campaign.json: 6 hand-authored campaign missions with
escalating difficulty (skill 1→5)
- tools/genTACampaign.js: Campaign generator that bakes terrain from the
seeded map generator
- tools/verifyTotalAnnihilation.js: 13-section end-to-end test suite covering
rules integrity, artwork, economy, pathfinding, combat, fog of war,
map generation, serialization, AI skill ladder, and campaign winnability
- tools/lib/taStubScene.js: Minimal Phaser stub for headless testing
Engine improvements:
- TALogic.js: Swept projectile collision (no tunneling), quadratic AoE
falloff, manual weapon support (D-Gun), unrecoverable elimination, onTick
callback for AI stepping
- TAAI.js: Skill-based economy ladders, simultaneous factory+economy growth,
sticky focus-fire, home defense gating by skill, tune/profile overrides
- TANav.js: fitField dilation for unit clearance, stale fit mask invalidation
- TAWorldView.js: _addWorld for layer ordering, frame-accurate zoom anchor
math, container depth sorting every frame
- TARules.js: autoRangeOf excludes manual weapons, manual flag compilation
Art & data:
- Mayan civilization artwork added to civilization-artwork.json
- Several opponents switched to mayan citySheet
- totalannihilation-rules.json: balanced unit stats, new commanderlaser weapon,
restructured AI skill tuning, formatted JSON
- sprites.md: complete art spec for drop-in PNG sheets
- Registered in gamesRegistry, assetManifest, PreloadScene, GameRoomScene,
and soundtrack service