Commit Graph

106 Commits

Author SHA1 Message Date
Brian Fertig c12371b654 feat(angrybirds): Waves 1-2 — playable core, 8 birds, level bank, wiring
AngryBirdsLogic.js layers the game onto the Wave 0 solver: wood/stone/ice
plus TNT with distinct density, friction and fragility; damage as a health
model with crack stages rather than instant shattering; all 8 birds with
one ability per shot; scoring, stars, win/lose, and a stepSim -> events[]
contract the scene replays as FX.

The load-bearing discovery is that damage must read approach velocity, not
the solver's accumulated normal impulse. The accumulated value carries the
static load of everything stacked above: measured 3.4e5 at the base of a
10-block stone tower, above the threshold that should shatter wood. Wiring
damage to it makes tall towers quietly crush themselves at rest, and it
reads as a level-design bug rather than a physics one. prestep now also
publishes contact.impactImpulse — the momentum needed to stop the approach,
zero at rest by construction. Resting fell to 2.4e4 against real hits of
1.9e5 to 2.7e6, and the whole material table was calibrated by measurement.

AngryBirdsGame.js maps the 2400x1080 logical level through fixed sx()/sy()
helpers at scale 0.78 rather than zooming the camera, which keeps HUD text
in plain screen coordinates. Slingshot drag, ghost trails of previous
shots, level select, star tracking and progress persistence are in. A
follow-camera is deliberately deferred to Wave 5 — it is pure presentation
and cannot be validated headlessly.

Six starter levels ship as the Poached Eggs opening. All stand unaided,
none damage themselves on load, and a greedy aim sweep clears every one.

Registered as slug angrybirds, iconFrame 92, under Video Games.

tools/verifyAngryBirds.js -> 114 checks green. Peggle (909) and Excitebike
(620) still pass; Goo Tower's 2 failures are pre-existing and unrelated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1wNRvLLtyfCDAET7oYouf
2026-07-30 19:07:16 -06:00
Brian Fertig abb55d6d7b excitebike: playtest fixes and Wave 5 polish
Playtest fixes (two reports, both bugs):
- Bad ground no longer instantly crashes: holes and obstacles only
  put you down above surfaceCrashSpeed; below that you bog to a crawl
  that is capped under the crash speed, always escapable
- Steep ramps (45°) no longer crash: launch lifts the bike clear of
  the lip, pitch is clamped to pitchMax, and landing angle is clamped
  to landGroundAngleMax so straddled cliff edges don't count as
  rideable surfaces
- Harness now drives every ramp at seven speeds; no crashes allowed

Wave 5 polish:
- Scenery: infield and apron shrub rows (bush, apronBush, tuft)
  transcribed from NES track maps
- Ramps given readable silhouette (packed-earth hatch, dark stroke,
  lit crest, sheer-face cut)
- Gaps show infield through lane; lane dividers and cool-zone
  chevrons fixed for alternating-lane contrast
- Snow and night themes retinted for visibility
- iconFrame 91 already painted

Tooling:
- Map reader masks ramp columns to avoid false mud/cool-zone detection
- All 10 track qualifyMs retuned from playtest measurements

Updated build plan and sprites docs.
2026-07-29 23:06:41 -06:00
Brian Fertig 81aa6e00a8 fix(excitebike): rework throttle, heat model, and landing after playtest
Address three fidelity issues found during Brian's playtest:

- Throttle: base speed 150→175, heat now chases a target (0.5 for A, 1.0 for B)
  so holding A alone settles the meter halfway without stalling.

- Turbo: overheat window extended to 6–8 seconds (heatRiseRate 1/7s), turbo speed
  275→235 against 175 base (57% boost). AI rivals now use hysteresis (heatOff/
  heatOn) instead of feathering around a single threshold.

- Landing: tolerance is lopsided — rear-wheel-first is safe (landCleanBack 0.45 /
  landHardBack 1.20), nose-down is strict (landCleanNose 0.32 / landHardNose 0.92).
  Crash rates across banks dropped from 1.3–5.9 to 0.2–3.0 per 1000px.

Other changes:
- Qualify targets: max(human × 1.06, expert × 1.12) so a perfect ride has margin.
- Fix NaN in countdown caused by renamed heatRate constant.
- Soak bands re-based; added monotonic ordering check (expert > human > steady > naive).
- Title screen now shows controls and "LAND REAR WHEEL FIRST" hint.
- All 10 track qualifyMs values retuned to new physics.
2026-07-29 22:34:29 -06:00
Brian Fertig 4e818ad104 Excitebike 2026-07-29 22:05:21 -06:00
Brian Fertig a6573726ff Goo Tower and Zuma Changes 2026-07-29 19:50:51 -06:00
Brian Fertig 052417aa9a feat(rushhour): redesign level bank, procedural art, and tiered curriculum
- Generate 60 levels across 5 themed tiers (Downtown, Freight Yard, Airport Apron,
  Construction, Night City) with guaranteed minimal and unsolved board states
- Rewrite generator (tools/genRushHour.js) with refine() pipeline that strips
  redundant vehicles and re-hardens boards, plus hill-climbing phase B
- Add comprehensive verifier (tools/verifyRushHour.js) checking solver correctness,
  structural criteria, MINIMAL/UNSOLVED properties, and curriculum shape
- Implement procedural vehicle art (RushHourArt.js) with baked textures, per-theme
  decals (hazard, hivis, freight, neon), and themed board surfaces
- Move level bank to assets/gamedata/rushhour/levels.json and fetch on entry
  instead of preloading at boot
- Restructure level JSON with tiers, level names, par, and difficulty metrics
  (decoyDensity, targetRetreats, firstMoveFanout, carsMoved)
- Update level select to display tiers with themed swatches and color-coded labels
- Show level name and theme in HUD during gameplay
- Tighten hint solver with maxStates budget to prevent main-thread stalls
- Update PreloadScene to remove rushhour.json from boot-time assets
2026-07-28 22:12:55 -06:00
Brian Fertig dbc1c64d51 Zuma Level Refactor 2026-07-28 21:33:36 -06:00
Brian Fertig eabeef3165 tune zuma: slow down ball push speed, add per-level backgrounds & lose fanfare
- Reduce pushSpeed across all 20 levels to ~60% of original values in
  tools/genZuma.js, making the chain advance more slowly and giving the
  player more reaction time. starScores() thresholds auto-adjust downward
  since they are derived from pushSpeed.
- Add per-level background art (zuma-background-1 / -2) alternated per
  level via a new `background` field in each level definition; draw it in
  ZumaGame.drawBackground() over the solid fallback rectangle.
- Register the two new background textures and sfx-zuma-lose in the asset
  manifest.
- Add playLoseFanfare() mirroring playStartFanfare() to duck/pause music
  and play the lose SFX when the chain goes over the edge (onLost).
- Add a black stroke to the "ZUMA!" win banner for readability.
- Bump music volume to 0.5 in zuma-music.json.
2026-07-28 17:54:23 -06:00
Brian Fertig 10165547ae Add tunnels to Zuma: editor, engine, art, and audio
Introduce underground tunnel sections to Zuma levels, letting the
chain roll out of sight and back in. Tunnels are arc-length intervals
on the path; while a ball is submerged it is inert — ignored by shots,
the laser sight, and explosions — and the path itself is drawn as a
faint buried trace beneath any live section that crosses it.

Engine (ZumaLogic.js): TUNNEL constants, normalizeTunnels, isHidden,
visibilityAt, pathSpans, sampleRange, nearestS; createLevel,
syncPositions, applyPower, stepFlights, and rayHit all honour
submersion. validateLevel lints mouth placement, spacing, and the
40% max-hidden fraction.

Game (ZumaGame.js): depth layer reorg so a live path always wins an
overlap with a tunnel stone; addPortal draws the two-layer maw (stone
below the chain, mouth above it); drawPit replaces the old skull with
a broken-stone collar and vapour swirl; startPitFall rolls the lost
chain over the lip in order, shrinking marbles into the dark; the
level-start fanfare ducks the soundtrack via MusicPlayer pause/resume.

Editor (ZumaEditor.js): new Tunnels tool with click-to-place,
drag-to-slide, right-click-to-remove, ESC-to-cancel; three graphics
layers (buried path, live path, handles) matching the game's
stacking; queueGameAssets so editor Test Play has the lazy art ready.

Art: ZumaPortal.js (carved serpent-head maw, symmetric so one
texture serves both ends) and ZumaPit.js (shaft of darkening discs
read as depth, not a painted circle).

Audio: four Zuma SFX (shoot, hit, start, explode) and a three-track
soundtrack wired through data/zuma-music.json and the asset manifest;
genZuma.js gains a tunnels column (fractions of path length) and
verifyZuma.js gains a tunnel test suite.
2026-07-28 17:20:11 -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 b3dafbbdf7 feat: enhance Zuma menu with background image and improve UI layout
- Add background image to Zuma title screen with solid color fallback
- Add new depth layer for background rendering (D.bg)
- Style progress text with semi-transparent background rectangle
- Reposition game buttons grid lower on screen for better visual balance
- Register zuma-menu-bg asset in manifest for lazy loading
- Add Advance Wars and Zuma image assets (background, frog sprite)
2026-07-27 21:01:48 -06:00
Brian Fertig f1c4289f0f feat: enhance Jewel Quest and Shift game UI/UX
- Add custom background image for Jewel Quest menu screens
- Remove redundant title/subtitle text from Jewel Quest class and level select screens
- Reorganize Jewel Quest UI layout with improved positioning and semi-transparent text backgrounds
- Update Jewel Quest level select grid and status text positioning for better visual hierarchy
- Add background backdrop to Shift game "Choose Your Image" title for improved readability
2026-07-26 18:00:47 -06:00
Brian Fertig 9f54556ba9 feat: enhance Shift backgrounds and add commander death SFX for TA
- Add background image support for Shift game menu screens
- Remove redundant title/subtitle text in Shift difficulty select
- Add nuclear explosion SFX for Total Annihilation commander deaths
- Extend _throttledSfx to support optional volume parameter
2026-07-26 16:01:54 -06:00
Brian Fertig 6e9cc84f6a feat(gootower): replace sky drawing with background image asset
- Add gootower-bg to asset manifest
- Replace drawSky() with drawBackground() method that renders the background texture
- Display background when entering play mode
2026-07-26 15:37:31 -06:00
Brian Fertig 5b24cc3ad0 Goo Tower Levels 2026-07-26 15:23:18 -06:00
Brian Fertig 2702bd9c91 Terrain Sprites for Total Annihilation 2026-07-26 14:14:20 -06:00
Brian Fertig 435c78f505 Added voices for Tetris Attack 2026-07-26 11:54:04 -06:00
Brian Fertig cfbf1032bf feat: add Chinese soundtrack to Mahjong and Mahjong Match games
- Register 'chinese' music override for mahjong and mahjongmatch in soundtrack config
- Preload chinese-music.json in PreloadScene
- Lazy-load Chinese music assets via asset manifest for both games
- Update game scenes to use getGameSoundtrack() with volume support
- Update mahjong match background images (01, 02)
2026-07-26 10:45:43 -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 4813c17cce feat: add custom backgrounds for Bejeweled and Peggle games
- Add background images for Bejeweled Blitz and Peggle menu screens
- Update asset manifest with new bg-bejeweled and bg-peggle-menu textures
- Bejeweled: use new background with fallback to existing bj-bg
- Peggle: replace title/subtitle text with custom background image
- Adjust Peggle progress text position to top-right corner
2026-07-25 20:56:57 -06:00
Brian Fertig 195e88f2dc feat(totalannihilation): add auto-heal for idle builders
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.
2026-07-25 20:36:50 -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 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 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 ca1c9e48c2 feat(tetris-attack): add character background sprites
Add new background images for Klaxon, Steve, and Victor characters
with 5 animation states each (r1-r5).

fix(civilization): resolve hotkey capture in city naming modal

Store hotkey list in this.hotkeyList to properly clear and restore
keyboard captures when opening/closing the city name input modal.
Previously, gameplay hotkeys prevented typing in the input field.
2026-07-22 20:25:51 -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 cf646282a0 retune tempest difficulty and fix death persistence
- Replace hard-capped difficulty curves with exponential ramp function
  that continues scaling deep into endless play without plateauing
- Reduce base speeds and shot counts for more deliberate gameplay
- Increase flipper, fuseball, and pulsar speeds for more pressure
- Flipper AI now chains hops toward the claw instead of resting,
  making it a true pursuer rather than a shuffler
- Change zapper to refill +1 per level instead of full reset, making
  charge management meaningful
- Death no longer resets the board: only enemies within threshold t
  die with the player, others remain mid-climb
- Improve enemy shot hit detection with lane distance check instead
  of exact lane match
- Add advanceShots() helper for cleaner shot advancement logic
- Update verification tests for new mechanics and difficulty curves
- Add michael background sprites and update tetrisattack characters
2026-07-21 22:52:07 -06:00
Brian Fertig d0553bf30b feat: update superkart icons and add tetrisattack background frames
- Update superkart icons.png and icons.psd assets
- Add renamed background-jerry-r1.png (renamed from background-jerry.png)
- Add new background frames for beth (r2-r5) and jerry (r2-r5)
2026-07-21 20:54:31 -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 ed2a60fa06 feat(tetris-attack): smooth panel fall animation and settling frame
- Track `_prevRow` on falling panels for interpolation during animation
- Add `_justLanded` flag to introduce a settling frame after panels land
- Interpolate panel Y position from previous row for smoother fall effect
- Defer match detection and chain-end logic until after settling frame
- Update assets: new background-menu and main-title images, update existing sprites
2026-07-20 19:21:08 -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 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 138b078dd2 feat: add pulsing animation to attack target tiles in Advance Wars
Introduce a breathing pulse effect (red fill + white border) for attack
target tiles to draw the player's eye when in "must pick a target" fire
mode. The previous static tint is preserved for the indirect-range preview
shown while a unit is merely selected.

- showAttackTiles now accepts optional { pulse: true } parameter
- Added tween-based animation with Sine.easeInOut breathing effect
- Properly clean up pulse tween in destroy() and clearOverlays()
- Updated AdvanceWarsGame to pass pulse: true when showing targets
2026-07-19 16:21:13 -06:00
Brian Fertig a0b3b5f063 feat(advancewars): add property capture cut-in animation with building squish
Introduce a cinematic capture animation when a unit captures a property:
a small window shows the capturing unit hopping atop the building, which
then squishes down to reflect remaining capture points (or pops back up
in the new owner's color if the capture completes).

- Add AdvanceWarsCaptureAnim.js with the full cut-in animation sequence
- Display remaining capture-points as a strength number on partially-
  captured buildings, tinted toward the owner's color
- Add `before` field to capturing events so the animation knows the
  starting HP
- Support partial unit sync so units are revealed action-by-action
  during turn replay instead of snapping to end-of-turn positions
- Add depth bias so units always render above buildings on the same tile
2026-07-19 13:55:48 -06:00
Brian Fertig fcc74bef28 feat(advancewars): improve battle animations and depth sorting
- Add new unit sprite sheet (advancewars-units.png/psd)
- Slow down all battle animations for better readability:
  - Attack, flash, death, and delay timings increased
  - Unit movement animation duration increased (70→180ms)
  - Explosion animation slowed down
  - Post-turn wait time increased (140→300ms)
- Merge props and units into shared Y-sorted "actors" depth band
  - Buildings and units now sort correctly by screen row
  - Move/attack overlays remain below actors for proper decal rendering
2026-07-19 11:48:30 -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