Commit Graph

68 Commits

Author SHA1 Message Date
Brian Fertig d08b48cdda chore(zuma): increase pushSpeed and starScores for all 20 levels
Significantly raise pushSpeed values across all levels (roughly 4x increase)
to make the game more challenging. Updated corresponding star score thresholds
proportionally. Adjusted editor UI max pushSpeed to 400 and updated validation
constraints to match.

Changes affect:
- data/zuma.json: level definitions with new pushSpeed and starScores
- src/games/zuma/ZumaEditor.js: editor input max value
- src/games/zuma/ZumaLogic.js: validation range
- tools/genZuma.js: generator table values
2026-07-27 23:15:44 -06:00
Brian Fertig 8e4e48e540 refactor(zuma): overhaul marbles, add level editor, rebalance levels
- Replace drawn ball textures with 32-frame rolling cycle + fixed specular
  highlight, so marbles visibly rotate as they travel along the path
- Switch from Phaser Containers to a Layer for proper depth-sorted rendering
- Replace hand-drawn frog with assets/images/zuma/frog.png sprite sheet
  (2 frames: base disc + slotted overlay for the mouth)
- Add ZumaEditor (/?zuma-editor=1): drag/insert/delete path points, move
  frog, tune parameters, test-play, export bank or single level
- Increase BALL_RADIUS 24→32, BALL_SPACING 48→64, and rebalance all tuning
  constants (catchup/pullback speeds, explosion radius, frog clearance)
- Extract geometry lint (validateLevel, validateLevelParams) into ZumaLogic
  so genZuma.js, verifyZuma.js, and the editor share identical rules
- Rewrite genZuma.js with a Pen class (straights + circular arcs at uniform
  STEP=70px) to avoid Catmull-Rom overshoot; regenerate all 20 levels
- Update verifyZuma.js aimbot soak: 8 seeds/level, ≥80% bank clear rate,
  star curve calibrated above mechanical play
- Update level data: new coordinates, adjusted quotas/speeds/colors/scores
- Add new background images (background-01.png, background-02.png)
2026-07-27 22:54:42 -06:00
Brian Fertig 2702bd9c91 Terrain Sprites for Total Annihilation 2026-07-26 14:14:20 -06:00
Brian Fertig 386ad3efb7 feat: add Goo Tower game with physics engine, 12 levels, and editor
Implement Waves 0-3 of Goo Tower, a World of Goo-inspired physics
puzzle game. Includes:

- GooTowerLogic.js: Verlet integration with XPBD constraints, terrain
  collision, ball-ball collision, strand breaking, crawling agents,
  and 9 goo types (common, ivy, balloon, bomb, block, pokey, bit,
  skull, anchor)
- GooTowerGame.js: Phaser scene with procedural rendering, drag-and-
  drop placement, pipe collection, and win/OCD tracking
- GooTowerEditor.js: Level editor (/?gootower-editor=1) with terrain
  drawing, ball/pile placement, settle/test/export tools
- 12 hand-tuned levels across 2 chapters (teaching + sandbox)
- verifyGooTower.js: 303-check regression harness
- genGooTower.js: Level bank writer
- GooTowerAuto.js: Greedy reference player (winnability gate)
- Wiring into gamesRegistry, main.js, GameRoomScene, and PreloadScene
2026-07-26 10:22:25 -06:00
Brian Fertig cb3c152d10 feat: pudding monsters waves 1-3, mahjong match FX, background art
Pudding Monsters:
- Rewrite level bank to 75 levels across 5 named chapters with a teach →
  drill → mix curriculum progression
- Implement 8 mechanics: sleepers, ice, slime trails, hypno goos, springs,
  tunnels, buttons+bricks, powerlifters+crates
- Split scoring into stars (target coverage) and crowns (par solves)
- Introduce planFlick/applyPlan so scene animation never disagrees with
  engine state
- Add mutable board layers (state.board) with generic cloning/hashing
- Level select: chapter rows, mechanic pips, tooltips, chapter-complete panels
- Monster type rendering: green/hypno/lifter colors, sleeper shut-eyes+Z

Mahjong Match:
- Add MahjongFx.js: shatter, burst, flash, ring, floatText, recoil,
  freed-tile chimes

Bloxorz:
- Add background images for menu and levels

Infrastructure:
- docs/puddingmonsters-mechanics-plan.md: living mechanics build-out plan
- tools/verifyPuddingMonsters.js: 1295 regression checks
- genPuddingMonsters.js: curriculum generator with load-bearing gates
- Add playSoundEx() for pitched sound cues
- Update asset manifest for all three games
2026-07-26 01:27:36 -06:00
Brian Fertig 39059a3551 feat(total-annihilation): add rocket trooper, constructor, and advanced vehicle plant
Introduce three new entities:
- Rocket Trooper: anti-armor infantry with shoulder-mounted guided rocket
- Constructor: unarmed tracked builder to replace lost commander build capacity
- Advanced Vehicle Plant: 4×4 factory with doubled production bays

Update AI composition weights and counter logic for the new units. Fix
byDef map to use Object.create(null) so the "constructor" key doesn't
shadow Object.prototype.constructor and silently poison gap calculations.

Add procedural art shapes for all three, register proc shapes in TARules,
update sprite frame assignments, and add core-structures assets.
2026-07-25 19:52:26 -06:00
Brian Fertig c835096610 feat(total-annihilation): polish visuals, audio, and game balance
- Add TA-specific sound effects (machinegun, 50cal, rocket variants, unit/vehicle loss)
- Add background artwork and update core-units sprite sheet with correct path and dimensions
- Introduce pintle gun weapon with burst fire mechanics
- Switch weapon sounds to TA-themed audio; support sound arrays for random variant picking
- Add impactSound field to projectile weapons, propagated through sim events
- Reduce unit build times and increase structure HP for better pacing
- Enable idle breathing/rotation animations on resource generators
- Replace solid-color backdrop with painted background image on main menu
- Fix camera state cleanup so menus render correctly after gameplay
2026-07-25 19:51:25 -06:00
Brian Fertig b479b6a21f feat: overhaul Bloxorz rendering, mechanics, and level design; update Total Annihilation visuals
Bloxorz:
- Rewrite renderer with axonometric projection, rigid 3D box rolling, and continuous face shading
- Introduce new tile types: heavy switches (standing-only), soft switches, hold pads, fragile ground, split cubes, and teleporters
- Redesign all 36 levels using hand-authored ASCII maps in the generator, organized into six progressive acts
- Add design gates to verify solvability, mechanic necessity, and difficulty progression across acts
- Improve input handling with a directional compass, WASD/arrow key resolution, and smooth teleport/fall animations
- Update tutorial to document new mechanics and tile behaviors

Total Annihilation:
- Extend unit/building sight range to cover weapon max range + 2 tiles for improved fog visibility
- Implement crossfade between wireframe and finished sprites for building construction
- Switch to full-color assets by removing army tinting, and update artwork JSON paths/sizes
- Adjust weapon stats (damage, reload times) in rules
- Update sprites documentation to reflect the new visual pipeline
2026-07-25 14:50:23 -06:00
Brian Fertig 929d27e188 feat: add Bloxorz game, balance Total Annihilation weapons
- Add Bloxorz as a new logic game with tutorial support
- Register Bloxorz in games registry, main scene, and game room dispatch
- Preload bloxorz.json artwork data in PreloadScene
- Fix arm-structures artwork path and frame dimensions for Total Annihilation
- Balance Total Annihilation weapon stats:
  - Increase tankgun damage (95→145)
  - Decrease rocketpod damage (130→80)
  - Decrease towerlaser damage but increase fire rate (62→52, 1.4→0.4s reload)
  - Decrease towermissile damage but increase fire rate (175→135, 4.5→1.5s reload)
2026-07-25 10:30:30 -06:00
Brian Fertig 4e56c3bfae feat(totalannihilation): add victory conditions, new defensive towers, and combat improvements
- 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
2026-07-25 08:23:11 -06:00
Brian Fertig 23c558a5d4 feat(totalannihilation): add commander self-healing and improved build queue UX
- Add self-healing system for units with `selfHeal` definition (e.g. Commander)
  - Healing pauses for 30 seconds after taking damage to prevent out-healing fights
  - Rates converted to per-tick at load time for efficient simulation
- Improve build queue interaction: use CTRL (or Cmd) to chain multiple builds,
  release to cancel placement automatically — no need to press Esc or click again
- Track queue modifier state from DOM events for robustness across focus loss
2026-07-24 21:25:22 -06:00
Brian Fertig e7da172896 feat: add Total Annihilation game with campaign, AI, and full engine
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
2026-07-24 20:57:40 -06:00
Brian Fertig ab05e2f1cd feat(civilization): add steampunk city theme and caravan diplomacy
- Add steampunk city sheet asset configuration
- Reassign Victor and other opponents to steampunk city theme
- Enable wheel scrolling on city choices list
- Allow non-combat units (e.g., caravans) to enter enemy cities
- Block movement into enemy cities when at war
2026-07-24 18:09:22 -06:00
Brian Fertig 93b4877c2d **Update game icons assets**
Refresh game icons in both source (PSD) and exported (PNG) formats to reflect updated design.
2026-07-24 16:01:13 -06:00
Brian Fertig 3122bb2f28 feat(civilization): city screen overhaul with fat-cross map, scrollable builds, and yield tracking
- Add CivilizationCityMap.js: draws the 21-tile fat cross in the city screen
  with terrain, specials, city sprite, pips, borders, units, and veiled tiles
- Replace fixed 28-row build list with a scrollable window; add shield cost
  and turn-estimate annotations per build choice
- Add garrison display: fortified units shown as clickable roundels
- Refactor tileYield() to accept a `notes` array that records each rule's
  delta, enabling accurate tooltips that can never drift from engine math
- Extract paintTerrainDiamond() and specialColor() from CivilizationMapView
  so the city map and main map share identical rendering
- Add cityCentreYield() enforcing the 1-shield/1-trade market-economy floor
- Add cityTileStatus() for consistent worked/idle/taken/offmap classification
- Add describeCityTileTooltip() with terrain title, yield breakdown, missing
  improvement explanations, and status line
- Wire improvementSheet and iconSheet paths in civilization-artwork.json
- Add comprehensive verifyCivilization checks for yield notes, centre floor,
  tile status, tooltips, and build list capacity
2026-07-23 19:21:54 -06:00
Brian Fertig 4fcae92e59 feat(civ): AI-initiated diplomacy with frustration escalation
Introduce active diplomacy where rival leaders approach the player with
requests, demands, trades, and gifts rather than passively waiting.

New CivilizationDiplomacy.js module handles:
- 9 request kinds (joinWar, breakTreaty, borderUltimatum, demandGold,
  demandTech, techTrade, ceasefire, peace, alliance) with initiative
  tiers so urgent calls to arms aren't drowned out by filler offers
- Cooldowns per (leader, target, kind) plus a per-leader gap so a
  leader can't spam different requests to bypass rate limits
- Frustration grudge (0-100) raised by refusals, decaying each turn
  and dragging attitude toward hostility through the ordinary war path
- Escalation: frustrated leaders demand compensation, then renounce
  treaties at breaking point, with ordinary hostility finishing the job
- Border ultimatum promises checked when pledges expire (double penalty
  for broken word)
- Unprompted gold/tech gifts from leaders with high attitude
- Staleness validation so requests the world invalidated are dropped
- AI-to-AI requests resolve immediately through the same pipeline

UI changes:
- AI requests queued on state.pendingRequests, presented via audience
  popup at the start of the human turn (one per turn, configurable)
- Diplomacy screen shows ACCEPT/REFUSE with consequence hints until
  answered; unanswered requests lapse with half-weight penalties
- New event types: treatyRenounced, pledgeBroken/pledgeKept, aiGift
- Leader dialogue for demands, refusals, gifts, and renouncements
- Tetris Attack menu gets a title art backdrop

Data/infra:
- diplomacyRequests tuning in civilization-rules.json (thresholds,
  cooldowns, attitude weights, per-request config)
- Frustration, requestCooldown, lastRequestTurn, pledges fields on
  civ state — all backward-compatible with old saves
- Full verification suite covering eligibility, resolution, cooldowns,
  frustration arc, serialization, and fuzz testing
2026-07-23 16:26:15 -06:00
Brian Fertig 2880eeab2a feat(civilization): add japanese city theme and improve world generation
- Add japanese-themed city sprite sheet (PNG + PSD) and register in artwork config
- Switch several opponents to cyberpunk or japanese city themes
- Fix hut badge stale display by including tile coordinates in hut events and
  repainting affected tiles immediately via repaintFromEvents
- Replace diagonal lattice world generation with hash-based jittered grid:
  * Shield grassland now uses balanced 2x2 blocks hashed per position to remove
    visible screen-space banding while preserving 50% density
  * Special resources placed on jittered blocks with adjacency avoidance,
    eliminating clumping and barren regions
- Update sprites.md paths and status markers to reflect completed sheets
- Expand verifyCivilization checks for shield density range and special placement
  quality (no adjacency, balanced windows, no screen-column alignment)
- Update Tetris Attack dialogue with control instructions and typo fixes
2026-07-22 23:48:41 -06:00
Brian Fertig 6fd4510b8b feat(tetrisattack): add optional character voice reactions and adjust BGM volume
- Implement per-character voice clip system (match, supermatch, win, lose) that
  loads lazily per round and falls back gracefully when clips are missing
- Queue voices to play after arcade cues, with intelligent interruption handling
  so only one line plays at a time
- Rename ensureRoundBackgrounds to ensureRoundAssets to handle both images and audio
- Reduce background music volume from 0.8 to 0.4
- Update character sprite sheet and document voice clip structure in sprites.md
2026-07-22 21:06:03 -06:00
Brian Fertig cf611fa669 Re-theme stage clear to helping friends with multi-line intros
Refactor Stage Clear narrative from battling opponents to helping friends.
Update character poses: friends cheer on clears and fret during danger.
Implement multi-line intro cutscenes with step-by-step progression and random background art.
Switch dialog to randomized arrays (introLines, winLines, loseLines).
Add new sound effects for Beth and Jerry.
Update validation and documentation to match new data structure.
2026-07-22 20:52:05 -06:00
Brian Fertig a17c5975d8 feat(tetrisattack): add Panel de Pon-style tile clear animation and update assets
- Implement staggered tile pop animation: face overlay flashes on each tile,
  then shatters into four quadrants that fly diagonally while shrinking/fading
- Play 8-bit card sound per tile, 8-bit action/win sounds for 4+/5+ tile clears
- Adjust character speed levels in tetrisattack.json (Jerry-1, Michael-2,
  Steve-2, Victor-3, Klaxon-4)
- Replace cursor movement SFX with click sound
- Update advancewars-units and tetrisattack-panels sprite sheets and PSDs
- Add sfx-click and sfx-casino-win-8bit to preload and sound registry
2026-07-22 18:40:26 -06:00
Brian Fertig ecfdf4c59b feat(superkart): add missed-checkpoint correction for shortcut detection
Detect when a player shortcuts across geometry and skips checkpoint gates
by monitoring the spline projection delta. When the player jumps past
the configured skip threshold, they are teleported back to the last
legitimate checkpoint, shown a blinking "CHECKPOINT MISSED" banner,
and given a brief invulnerability window.

- Add checkpointMissSkip and checkpointMissMs config values
- Implement delta-based gate-skipping detection in kart logic
- Add HUD banner and sound feedback for missed checkpoints
- Make player sprite blink during the correction window
- Add verification tests for detection, correction, and clean-race false positives
- Make Tetris Attack portrait frame half-transparent
2026-07-22 13:00:12 -06:00
Brian Fertig 08d23f9613 refactor: replace stage clear targets with clear line boundary mechanic
Restructure Tetris Attack Stage Clear from "clear all target panels" to a
multi-stage round system with a sliding boundary line.

Gameplay changes:
- Each character now has 5 stages instead of a single match
- A CLEAR line appears after a set number of rows rise, then rides the
  stack upward; the objective is to clear everything above it
- Clearing a stage advances to the next: same board, faster speed, fresh line
- Stage progress is saved to localStorage; characters unlock sequentially
- Added a stage select screen with progress squares per character

Logic changes:
- Replaced `targetsTotal` with `clearLine` tracking and `countAboveLine`
- Added `advanceStage()` to resume play on the same stack one speed level higher
- Win condition now checks `countAboveLine() === 0` instead of target count
- Removed `target` flag from panels; panels below the line are irrelevant
- Continuous speed ramp via fractional `speed` per stage

UI changes:
- Clear line drawn as a pulsing bar with "◀ CLEAR" label outside the board
- "CLEAR LINE!" announcement on appearance, "STAGE N CLEAR!" banner on win
- HUD shows stage number instead of panel count
- Game over offers "Retry Stage", "Stage Select", or "Menu"

Asset changes:
- Backgrounds renamed to `background-{hero}-r{stage}.png` (5 per character)
- Lazy-load backgrounds per round instead of preloading all 30 images
- Updated tetrisattack.json with `stagesPerRound`, `stageSpeedStep`, and
  per-character `clearLineRows`

Tests:
- Rewrote stage clear soak tests for the new mechanic
- Added stage round progression, speed ramp, and board preservation tests
2026-07-21 10:00:09 -06:00
Brian Fertig 18412e34f9 feat: enhance Advance Wars replay HP display and terrain rendering, add Tetris Attack host backgrounds
Advance Wars:
- Add HP override system (seed/set/clearHpOverride) so units show correct
  HP during enemy-turn replay until their battle animation plays
- Redesign river/road channel rendering with layered depth: rivers get
  deep channel, light core, and ripple crests; roads get concrete shoulders,
  asphalt, and dashed centre lines phase-locked to tile seams

Tetris Attack:
- Add character sprite sheet and per-host background images (beth, jerry,
  michael, steve, victor, klaxon)
- Declare hero background assets in manifest; scene falls back gracefully
  when art is missing
- Update characterSheet path in tetrisattack-artwork.json
2026-07-20 23:20:58 -06:00
Brian Fertig aa97cbe9b4 feat(tetris-attack): load custom panel artwork sprite sheet
Replace procedural panel rendering with custom painted artwork
(tetrisattack-panels.png) for Tetris Attack game.
2026-07-20 18:17:07 -06:00
Brian Fertig 85996ad02c feat: add Tetris Attack (Panel de Pon) with endless, stage clear, and puzzle modes
Implement the full Tetris Attack clone with three game modes:
- Endless: clear panels as the stack rises, speed increases with levels
- Stage Clear: defeat 6 character opponents (Beth, Jerry, Michael, Steve, Victor, Klaxon) in sequence
- Puzzle: solve 24 pre-vetted puzzles within move limits

Core engine (src/games/tetrisattack/TetrisAttackLogic.js) is a pure, deterministic
state machine with match detection, chain propagation, gravity, and scoring tables
matching the SNES original. Includes a headless verifier (verifyTetrisAttack.js)
testing match detection, chains, gravity invariants, top-out, puzzle solvability,
and seeded determinism.

Art is fully optional via drop-in spritesheets (spec: sprites.md); procedural
fallbacks draw 16-bit-style panel icons with distinct shapes for colorblind access.
Puzzle bank generated by genTetrisAttackPuzzles.js and verified as solvable within
optimal move counts.

Shared nintendo soundtrack reused via soundtrack overrides.
2026-07-20 00:04:26 -06:00
Brian Fertig f96f2d491c feat(advancewars): add HP text display to battle animations and procedural cursor
- Add HP text readout to battle animations showing 1-10 scale HP
  (matching Advance Wars' classic HP display), with smooth tweening
- Extract cursor drawing into procedural texture, keeping it independent
  of the UI sheet
- Add advancewars-ui.png sprite sheet and update artwork config
2026-07-19 19:04:14 -06:00
Brian Fertig c0ad354458 feat(advance-wars): add contextual battle and movement sound effects
- Assign battle sounds to each unit type (gunfire, tank, cannon, missile, etc.)
  and play the appropriate sound on attack/counterattack in battle animations
- Add per-unit-type movement sounds (march for infantry/mech, engine-fast,
  engine-heavy) that loop during move animations and stop cleanly on completion
- Play jump sound during capture animation hops and activation sound on capture
- Play explosion sound when units are defeated in combat or crash
- Lighten unit tint relative to buildings so units remain visually distinct
  when standing on captured buildings
- Add new audio assets: battle sounds, march, 8bit-jump, and update battle-tank
2026-07-19 17:44:18 -06:00
Brian Fertig a02e5a1913 feat(advancewars): add terrain-based battle scene backdrops
Introduce a new battle background spritesheet (advancewars-battlebg) that
displays context-appropriate backdrops behind each fighter during battle
cut-ins. The backdrop is selected based on the terrain/building type the
fighter is standing on (city, base, airport, port, plain, wood, mountain,
sea, reef, shoal, river, bridge, road, hq).

- Add battleBgSheet to artwork.json and asset manifest
- Implement playBattleAnim() backdrop system with terrain lookup
- Provide procedural fallback matching the real sheet's frame map for
  art-free playability
- Mirror defender backdrops to match mirrored defender sprites
- Document the 14-frame sheet spec in sprites.md (256×256 cells, 5 cols)
2026-07-19 16:22:21 -06:00
Brian Fertig bf71bfc3c7 feat(advance-wars): add unit progression system with mission-based unlocks
Introduce a unit unlock system that progressively grants access to new
unit types as the player advances through the campaign. Each mission
specifies which units each army can build, starting with basic units
and unlocking MD Tanks, Rockets, Anti-Air, Missiles, Lander, Cruiser,
and eventually the full armory.

- Add unit sprite sheet (advancewars-units.png) and artwork config
- Implement unlock validation in production and build options
- Add tutorial dialogue from Ethel explaining new mechanics and units
- Balance AI difficulty by reducing skill levels and aggression
- Adjust capture weights for more balanced AI behavior
- Add introductory city capture mechanic in first mission
- Update verification tool to support unlockedUnits
2026-07-19 10:55:18 -06:00
Brian Fertig 4a8b78c538 feat: add Advance Wars turn-based tactics game
Implement a full Advance Wars clone with campaign (20 missions) and
War Room skirmish mode. Includes:

- Headless game engine (AdvanceWarsLogic) with complete AW1 rules:
  terrain movement, combat, capture, production, transports, fuel,
  fog of war, CO powers, and multiple objective types
- AI opponent (skill 1-5, aggression/capture tuning) with BFS
  pathfinding, threat evaluation, production counter-tables, and
  fog trap awareness
- Canvas-rendered map view with procedural stand-ins that can be
  replaced by drop-in painted spritesheets (no code changes)
- 11 playable COs with unique day-to-day modifiers and powers
  (Hyper Repair, Lightning Strike, Tsunami, Meteor Strike, etc.)
- Campaign briefings with typewriter text and opponent portraits
- Comprehensive headless verification suite (rules, combat formula,
  pathfinding, economy, capture, fog, CO powers, soak tests)
- New assets: terrain/building sheets, adventure music tracks,
  game icon frame 86
- Refactor SpireClimb and SWDBG to use the shared soundtrack service
2026-07-19 09:43:58 -06:00
Brian Fertig 7713089466 feat: add per-game soundtracks for multiple games
Introduce game-specific music overrides using the soundtrack service.
Adds arcadedark and hacker music packs, and wires them to Balatro,
Colorado Defense, Tempest, Mastermind, Hexsweeper, Dot Link, and 2048.
Games now lazy-load their soundtrack assets on entry instead of sharing
a single generic music cache.
2026-07-18 17:21:32 -06:00
Brian Fertig e1a5c21180 feat: add per-game soundtrack system and Nintendo music for Super Kart
- Introduce soundtrack override system allowing games to define custom music
- Add Nintendo-themed soundtrack for Super Kart (2 tracks with metadata)
- Make main menu track configurable via data/music.json instead of hardcoded
- Add MusicPlayer volume parameter for per-soundtrack volume control
- Lazy-load per-game audio assets via assetManifest on game entry
- Add SPACE/X keyboard shortcuts to advance Super Kart menus
- Play kart-spinner SFX when player picks up an item in Super Kart
- Increase speech queue volume to 1.0
- Add Super Kart icons artwork and additional music assets
2026-07-18 16:53:49 -06:00
Brian Fertig 54a9614464 feat: add Super Kart themes, profile import/export, and Civilization spaceship notifications
- Super Kart: populate missing theme image paths, increase acceleration spread,
  and add a track loading panel to the editor
- Civilization: display completion notifications for spaceship parts with
  direct navigation to the building city
- Profile: implement export/import via .fcg files with validation, download,
  and restore flows
- UI: add multi-button modal support, improve ProfileScene layout with avatar
  masking and info card, and rename Arcade category to "Video Games"
2026-07-18 12:28:22 -06:00
Brian Fertig 30629380b4 feat(civilization): add coinage/public works special builds + fix AI fallback
- Add Coinage (1 shield → 1 gold) and Public Works (2 shields → 1 food)
  special build options for cities, with remainder carry logic in shieldBox
- Update AI to fall back to producing gold or food instead of stockpiling
  redundant defenders when nothing else is available
- Fix mid-build detection to check build.type before comparing shield progress
- Add City Screen UI for special builds: display gain per turn, color-coded
  rows, and tooltips
- Only apply class-switch penalty when switching between unit/building
  production types
- Add verification tests for coinage payout, public works remainder carry,
  and AI special build fallback

feat(superkart): fix player kart scale + add missing backdrop images

- Compute PLAYER_KART_SCALE from MODE7 parameters instead of hardcoding,
  keeping player and AI karts consistent at the camera's follow distance
- Wire up previously null backdrops: volcano, scrapyard, swamp, speedway,
  nightcity
2026-07-18 09:08:26 -06:00
Brian Fertig 65cc0a2c79 feat(superkart): add beach theme and AI rubber-banding
- Add beach theme artwork and register paths in artwork JSON
- Implement AI rubber-banding that scales AI top speed based on gap to player
- Configure engine classes with varying rubber-band strength (Cruiser most forgiving, Turbo least)
- Balance racer stats: boost Kona top speed, reduce heavy racer accel/handling
- Update verification script to validate new rubber-banding configuration
2026-07-17 23:45:46 -06:00
Brian Fertig a0316bf467 feat: add mini-turbo boost mechanic to drifting
- Track drift charge duration while sliding and payout a speed boost
  when the drift is released cleanly (not stalled or reversed)
- Boost strength scales with drift duration, capped at maximum charge
- Added configurable mini-turbo parameters (min/max ms, boost ms,
  boost multiplier range) to superkart-rules.json
- Increase drift visual rotation angle from 6° to 14° for more
  pronounced drift feedback
- Reset charge on respawn, spin, and new drift start
2026-07-17 22:04:43 -06:00
Brian Fertig 29d18c9c5f refactor: reduce kart rotation frames from 16 to 8 and add racer artwork
- Add new racer spritesheets (8 angles × 64×64) for all 9 racers
- Introduce KART_ROT_FRAMES constant as single source of truth for rotation frame count
- Update SuperKartMode7.angleFrame(), SuperKartGame frame math, and procedural fallback
  to derive from KART_ROT_FRAMES instead of magic numbers
- Update data/superkart-artwork.json with asset paths and 8-angle metadata
- Update sprites.md documentation to reflect 8-view-angle contract
2026-07-17 21:38:18 -06:00
Brian Fertig 5380a8eab4 feat: add Super Kart — SNES-style Mode 7 kart racing game
Complete kart racing game featuring 12 procedurally generated tracks
across 3 cups, 9 unique racers with distinct stats, headless physics
simulation, and a secret track editor (?superkart-editor=1).

Core features:
- Mode 7 ground renderer with parallax horizon backdrops
- 12 hand-tuned tracks (speedway, beach, swamp, scrapyard, volcano, nightcity)
- 9-racer roster with balanced archetypes (all-rounder, drift pirate, etc.)
- Headless race simulation for deterministic AI and headless verification
- Item system (bolt, seeker, oil, turbo, overdrive, emp, coins)
- Position-weighted item roulette and rubber-banding
- AI opponents with skill-based driving and stuck-recovery
- Full track editor with live preview, validation, and export
- 275 verification checks covering schema, physics, AI soak, and determinism

Data files: data/superkart-racers.json, superkart-rules.json, superkart-artwork.json
Game data: assets/gamedata/superkart/ (cups.json + 12 track files)
Tools: genSuperKartTracks.js, verifySuperKart.js
2026-07-17 14:25:18 -06:00
Brian Fertig d6d3bafc7f feat(civilization): add battle sound effects for unit combat
Add audio feedback for combat events by introducing unit-specific sound
effects that play during attack animations. Each unit in civilization-rules.json
now has a battleSound property mapping to appropriate audio assets. Adds 10
new MP3 files (arrows, cannon, catapult, gunfire-classic/modern, helicopter,
missile, submarine, sword, tank) and integrates playback in CivilizationMapView's
combat lunge animation.
2026-07-17 13:03:26 -06:00
Brian Fertig a91db38a0f feat(civilization): balance difficulty combat, enhance UI tooltips, and improve setup flow
- Introduce difficulty-based combat multipliers and veteran promotion chances (Chieftain/Warlord eased, Prince+ neutral)
- Randomize leader selection on setup screen and add dynamic portrait with pick speech
- Replace inline hover text with a centralized Tooltip component for tech tree, foreign cities, and buildings
- Add descriptive flavor text for governments and terrain improvements
- Add building completion notifications with a "VIEW CITY" action button
- Expand deferred city attack cinematics to cover explored rival cities
- Improve Tempest flipper AI to scale lane-flipping chance/cooldown with level and enable climbing flips
- Add verification tests for difficulty combat modifiers and veteran rates
2026-07-16 23:22:29 -06:00
Brian Fertig 237a024f80 feat(civ): add status log panel, event announcements, smooth camera pan, and city sprites
- Add bottom-right status log panel with scrollable entries, word wrap,
  mask clipping, and mouse wheel scrolling; cap at 60 entries
- Replace toast popups with announceStatus() for major events (war, tech,
  first contact, city founded, trade routes, huts) — centered modal with
  CONTINUE button that animates into the log; supports queued popups and
  custom onDismiss callbacks (e.g. first contact opens diplomacy)
- Add smooth panToTile() tween for camera movement when selecting next unit,
  refactored clampPan into panBounds() reused by both clamp and tween
- Add classic city sprite sheet (civilization-cities-classic.png) and
  register it in artwork JSON and asset manifest
- Replace circular civ rings and selection ring with isometric ellipses
  matching the 2:1 tile ratio for better depth reading
- Paint tile neighbors in ascending c+r order during repaintTileAndNeighbors
  to prevent tall features from being overwritten by lower-sum neighbors
- Stop panTween on pointer down to avoid conflict with manual dragging
2026-07-16 13:48:39 -06:00
Brian Fertig b4155b096a feat(civ): add status log panel, event announcements, smooth camera pan, and city sprites
- Add bottom-right status log panel with scrollable entries, word wrap,
  mask clipping, and mouse wheel scrolling; cap at 60 entries
- Replace toast popups with announceStatus() for major events (war, tech,
  first contact, city founded, trade routes, huts) — centered modal with
  CONTINUE button that animates into the log; supports queued popups and
  custom onDismiss callbacks (e.g. first contact opens diplomacy)
- Add smooth panToTile() tween for camera movement when selecting next unit,
  refactored clampPan into panBounds() reused by both clamp and tween
- Add classic city sprite sheet (civilization-cities-classic.png) and
  register it in artwork JSON and asset manifest
- Replace circular civ rings and selection ring with isometric ellipses
  matching the 2:1 tile ratio for better depth reading
- Paint tile neighbors in ascending c+r order during repaintTileAndNeighbors
  to prevent tall features from being overwritten by lower-sum neighbors
- Stop panTween on pointer down to avoid conflict with manual dragging
2026-07-16 12:36:53 -06:00
Brian Fertig def5c9904a feat(civ): add per-leader starting techs, union with trait techs, and setup background
Allow each opponent to declare their own 2-3 starting technologies in
opponents.json, independent of their civ trait. During game creation,
personal and trait-based starting techs are unioned (deduped) so
pioneering leaders with overlapping lists don't double-grant.

- Add optional setup screen background image (civilization-setup-bg)
- Update leader detail panel description to list personal starting techs
- Deduplicate trait + personal techs via Set in CivilizationLogic
- Add validation for startingTechs arrays, tech existence, 2-3 total count,
  and variety across leaders in verifyCivilization
- Add integration tests for personal tech granting and overlap deduplication
2026-07-16 10:31:25 -06:00
Brian Fertig 80d4a79593 feat(civ): add leader trait system with bonuses, starting techs, and UI
Introduce civTraits data structure with 8 traits (scientific, industrious,
commercial, philosophical, zealous, mercantile, pioneering, wealthy) that
provide science/gold/shield multipliers, starting gold, and starting
technologies. Assign each opponent a trait in opponents.json.

- Apply trait bonuses to starting gold and grant starting techs during
  game creation in CivilizationLogic
- Route trait multipliers into cityYields for science, gold, and production
- Add a leader detail panel to the setup screen showing name, trait name,
  and description, updated live when selecting leaders
- Add validation for civTraits in CivilizationRules (multipliers positive,
  starting techs valid, etc.)
- Add verification tests for trait application and city yield multipliers
- Nudge unit sprite position 5px down for better tile alignment
2026-07-16 10:31:02 -06:00
Brian Fertig e4ad09de67 feat(civilization): sprite units, animated movement, city naming, mouse zoom
- Add civilization-units.png sprite sheet (64×96 frames with 32px headroom)
- Animate unit movement along paths with smooth gliding after resolving logic
- Add city founding name prompt modal with TextInput and Enter/Escape support
- Support zoom-to-mouse-position via wheel, with extended zoom levels
- Flash-pulse End Turn button when no units have remaining movement
- Fix banner rendering with setSize instead of direct width assignment
- Adjust badge positions for taller sprite frames
- Decouple city name preview (peekCityName) from cursor consumption
2026-07-15 22:41:02 -06:00
Brian Fertig 1261f7149b feat(civilization): enable terrain sheet and adjust HUD button layout
- Set terrainSheet path to actual image file in artwork configuration
- Update civilization-terrain.png sprite sheet
- Reposition top-right HUD buttons 100px left for better spacing
2026-07-15 20:03:37 -06:00
Brian Fertig 67a7ac857e feat: add Civilization II-lite game engine and UI
Implement a complete turn-based strategy game with:

- Deterministic headless engine: cities, units, combat, research, governments
- Seeded world generation with noise-based terrain, continents, quality scoring
- Isometric map renderer with procedural fallbacks and optional sprite sheets
- AI rivals with strategy phases, diplomacy, trade routes, and unit control
- Full UI: setup, city screen, tech tree, diplomacy, spaceship tracker, victory
- 80 techs, 51 units, 26 buildings, 11 terrains, 6 governments, 5 difficulties
- Comprehensive headless verification suite (rules integrity, worldgen, combat, AI self-play)
2026-07-15 18:56:02 -06:00
Brian Fertig e9ddebc891 refactor: improve Star Control ship rendering and ship picker UX
- Update ship sprite frame dimensions to match actual UQM rotation assets
- Parse .ani hotspot files to correctly center tightly-cropped ship frames
- Replace CRT overlay effect with native camera shake for hit/explosion feedback
- Fix camera zoom clamping to prevent ships from going off-screen on 16:9 display
- Correct ship rotation frame mapping (UQM sheets rotate clockwise)
- Add keyboard navigation to ship picker with focus rings and sound feedback
- Support both control clusters for hotseat and single-player ship selection
- Remove unused CRT overlay import and related cleanup code
- Update asset fetcher to handle per-frame hotspot alignment from .ani files
2026-07-15 11:45:08 -06:00
Brian Fertig 3f1d534ec2 feat: add Star Control space combat game
- Register Star Control in games registry as 2-player arcade game
- Import and register StarControlGame scene
- Add starcontrol slug mapping in GameRoomScene dispatch
- Load star-control-ships.json asset data in PreloadScene
- Add dynamic ship sprite sheet loading in asset manifest
- Update README to reflect new game in Arcade/Console/PC category
- Update game icons to include Star Control icon (frame 82)
2026-07-14 22:45:56 -06:00
Brian Fertig dadf8c28dc feat(peggle): overhaul 7 powers with enhanced mechanics, visuals, and audio
Add character assets (sprites/videos) and sound effects for Aiko, Blackwind,
DV-8-2303, Kage, Nadia, Nicole, and Steve.

Power overhauls:
- Extreme Ball: lasts 2 shots, cascade splits into 4 balls on 2nd bounces
- Cannonball: adds Space Blast-style explosion on green peg trigger
- Beam Up: retargets to a clear-path orange peg on return
- Overclock: lasts 2 shots, grants free ball every 6 pegs, pitch-rising hum
- Laser Sweep: follow-up sweep on random orange peg after 1s delay
- Shadow Slash: follow-up slash on random orange peg after 1s delay
- Cosmic Bloom: adds small Space Blast around green peg
- Rewind: glitch effect, portal opens targeting clear orange peg, refunds on drain

Add visual effects (shockwave rings, portal animation, glitch bars, split
particles), happy reaction dedup per ball, and comprehensive verification
tests for all new mechanics.
2026-07-13 17:50:24 -06:00