Commit Graph

281 Commits

Author SHA1 Message Date
Brian Fertig 54a1ba2280 feat: add 8-bit sound effects and improve Battleship impact visuals
- Add 4 new 8-bit sound effects (select, activate, action, move) to SFX system
- Wire 8-bit sounds to Risk attack, fortify, and movement animations
- Add visual impact markers for hits and misses in Battleship
- Fix Battleship portrait texture key reference
- Improve ship drag hit area with geometric rectangle
- Add phase guard and tween cancellation on ship drag start
2026-06-18 23:36:01 -06:00
Brian Fertig 546e1de240 feat(risk): enhance UI, add card visuals, battle portraits, and phase announcements
- Add visual card stack in side panel with clickable modal to view/trade cards
- Redesign cards modal with chip-style selection and trade/dismiss buttons
- Add animated phase announcements (Reinforce/Attack/Fortify) that slide from map to panel
- Introduce static portraits for attacker/defender in battle scene with avatar support
- Enhance move modal with optional +/-10 buttons for large army ranges
- Improve fortify flow with animation and proper busy state handling
- Add 3 new music tracks to game soundtrack
- Adjust UI font sizes, spacing, and button positioning throughout
- Deduplicate phase announcements using _lastAnnouncedPhase tracking
2026-06-18 21:39:33 -06:00
Brian Fertig cb506696a6 feat(risk): add rich combat animations and enhanced move modal
- Add animated attack arrows with quadratic bezier curves from attacker to defender
- Implement battle modal that zooms from battlefield to center, shows animated dice rolling, and resolves pair-by-pair with colored arrows
- Add conquest animation with straight-line arrow and floating +/- army count text
- Store attacker/defender seat info in lastBattle for proper color theming
- Add Min/Max quick-select buttons to army deployment modal
- Ensure busy state is held during conquest animations to prevent input conflicts
2026-06-18 19:40:19 -06:00
Brian Fertig 036947885d feat(risk): redesign panel UI and add default opponent configuration
- Redesign Risk panel layout with player portraits, colored rings, and
  inline name/stats display (territories, armies)
- Add active player gold ring highlight on portrait
- Support custom playfield background images with fallback color
- Refactor button/hint positioning for cleaner control rendering
- Add defaultOpponents configuration to game registry
- Default Risk to 3 opponents on seat selection
- Update game-icons asset files
2026-06-17 21:01:40 -06:00
Brian Fertig ae30299838 feat: add Risk board game with AI opponents
Implement the classic Risk board game with full game logic, AI players
with adjustable skill levels (1-5), and Phaser-based rendering.

New files:
- RiskData.js: map data, adjacency graph, continent bonuses, card deck
- RiskLogic.js: pure game engine (reinforce, attack, fortify phases)
- RiskAI.js: heuristic AI with 5 skill tiers and configurable behavior
- RiskGame.js: Phaser scene with combat animations and UI
- tutorial.md: in-game tutorial ("A Field Manual by General Ironside")
- verifyRisk.js: headless fixture and self-play verification script

Integrates with existing game framework via registry, game room dispatch,
and preload scene. Includes board image and updated pawn sprites.
2026-06-17 20:30:14 -06:00
Brian Fertig 2a22bdbcde Adjustments to Word Games 2026-06-16 19:28:56 -06:00
Brian Fertig 1e153b34ef **Fix: Increase Monopoly popup dialog height and padding**
Adjust the popup dialog dimensions in MonopolyGame.js to improve content visibility and spacing. Increases maximum height from 620px to 800px and bottom padding from 20px to 48px.
2026-06-16 18:10:26 -06:00
Brian Fertig 833a214c24 Canasta, and Cribbage updates. Added 3 new AI opponents. 2026-06-16 00:33:36 -06:00
Brian Fertig 8a79b6909d feat: add Gin Rummy card game with AI opponents
Implement a fully playable Gin Rummy game with Phaser-based UI,
pure logic engine, and heuristic AI (skill levels 1-5).

Features:
- Complete Gin Rummy rules: draw, discard, knock, gin, layoff, scoring
- Meld detection with optimal deadwood minimization
- 2-4 player support with AI opponents
- Drag-to-reorder hand, visual meld highlights, turn indicators
- Round and game-over overlays with score tracking
- Headless verification script with unit tests and self-play simulation

Files added:
- public/src/games/ginrummy/GinRummyData.js (card helpers, layout, constants)
- public/src/games/ginrummy/GinRummyLogic.js (deterministic game engine)
- public/src/games/ginrummy/GinRummyAI.js (AI decision making)
- public/src/games/ginrummy/GinRummyGame.js (Phaser scene)
- server/scripts/verifyGinRummy.js (headless test harness)

Also updates game-icons/opponents assets and registers the game
in the server registry and game room scene dispatcher.
2026-06-14 20:51:15 -06:00
Brian Fertig 6927b148f2 feat(rummikub): add rack reordering with insert indicator and improve layout
- Implement drag-and-drop rack reordering with animated slot indicator
  showing where a tile will be inserted
- Preserve manual rack ordering across turn resets and draw actions
- Support dynamic table layout with proper margins for side opponents
- Reposition player portraits, buttons, and UI elements for 3-4 player
  configurations
- Add point value labels below valid committed sets containing staged
  tiles
- Scale up tiles slightly when picked up for drag feedback
2026-06-14 19:33:28 -06:00
Brian Fertig f2da9bfb20 fix: correct container hitbox double-shift in Canasta & Cribbage
Fix hitbox misalignment where Phaser's Container displayOrigin already
centers bounds, causing manual Rectangle offsets to double-shift.

feat: add Rummikub game with AI, immutable engine, and solver

- Implement full Rummikub gameplay: drag & drop, sets/runs, jokers,
  table manipulation, opening meld rule, and scoring
- Add immutable game engine (RummikubLogic) following existing patterns
- Add rules solver (RummikubSolver) for set validation and AI planning
- Implement 5-level heuristic AI (RummikubAI) with configurable delay
- Register game in registry and routing, include tutorial markdown
- Add headless verification script (fixture tests + AI self-play)
2026-06-14 16:23:44 -06:00
Brian Fertig f395f208ae feat: add Nadia and Smasher opponents with full media assets
- Add sprite images, speech audio, and animation videos for Nadia and
  The Smasher opponents
- Update opponents.json with new character definitions and speech cues
- Fix 2048 UI: reposition buttons and add Leave button
2026-06-14 14:32:41 -06:00
Brian Fertig a8e21a3bc6 refactor: overhaul 2048 merge animation and swap sound effects
- Replace PIECE_CLICK with alternating MASTERMIND_GLITCH sounds
- Refactor merge animation: redraw all tiles before merge phase instead
  of skipping merged positions
- Hide spawn tile early to prevent flash before spawn animation
- Simplify merge destination setup by removing redundant alpha reset
- Extract runMergePhase callback for cleaner merge/no-merge flow
2026-06-14 12:55:14 -06:00
Brian Fertig 4b78bf047f refine 2048 animations and enhance Dot Link sound effects
2048:
- Improve tile slide animations with distance-proportional timing
- Refactor merge transitions: scale down source tiles before showing merged result
- Extract _paintTile helper to reduce code duplication
- Simplify spawnTile logic by removing unnecessary mergedAt/moves fields

Dot Link:
- Add dynamic pitch variation to path-drawing sounds using plink/plonk SFX
- Rate scales with path length for more engaging audio feedback
- Preload new scifi-plink and scifi-plonk audio assets
2026-06-14 11:55:47 -06:00
Brian Fertig 24678602f4 feat: add 2048 single-player puzzle game
- Implement complete 2048 game with Phaser.js scene and game logic
- Add customizable theme picker with multiple color schemes
- Include smooth tile slide, merge, and spawn animations
- Add sound effects (scifi-plink, scifi-plonk) and particle effects
- Track best score in localStorage
- Register game in server registry with icon frame 67
- Update Wordle name to "Wordle Race"
2026-06-14 10:26:44 -06:00
Brian Fertig 2b224ff62b feat(jewelquest): spell chaining and combat animations
- Allow spell chaining within a turn (Puzzle Quest rule): casting a spell
  no longer ends your turn, enabling multiple casts per turn followed by a
  gem swap to pass play.
- Add procedural spell-icon textures (shield, swords, bolt, flame, meteor,
  thorn, poison, dagger, banner, leaf) for visual spell feedback.
- Implement combat animations: skull-match convergence strike, spell damage
  fly-in, spell heal burst with particle ring, HP bar flash, and floating
  damage/heal numbers.
- Refactor HP and mana updates into separate `updateHpBar` and `updateManaBar`
  methods so mana reacts immediately while HP drains at animation climax.
- Defer stun application until the caster's turn actually ends.
- Update tutorial and verification tests to match the new turn-passing rules.
2026-06-14 05:18:45 -06:00
Brian Fertig 59ee3eca0c feat: add Dot Link puzzle game
Introduce Dot Link, a Flow-Free-style single-player puzzle game where players connect matching colored dots to fill the grid. Includes:
- Pure JS puzzle engine with deterministic board generation, DFS solver, and win validation (`DotLinkLogic.js`)
- Phaser 3 UI scene featuring a cyberpunk/synthwave theme, level select, daily runs, hint system, and smooth path-drawing mechanics
- Deterministic bank of 100 hand-tuned puzzles (`dotlink.json`)
- Node scripts for puzzle generation and verification
- Full integration into the app's preload, routing, and game registry
2026-06-14 05:18:03 -06:00
Brian Fertig f5b0c545f4 feat: add Cribbage and Canasta single-player card games
- Implement full game logic, scoring, and UI scenes for Cribbage and Canasta
- Add heuristic AI opponents with 5 skill levels and reaction delays for both games
- Cribbage: race-to-121 track, pegging, crib scoring, and cut mechanics
- Canasta: 108-card shoe, partnership melding, canastas, frozen/blocked piles, and go-out rules
- Include headless verification scripts (fixture + self-play tests) for both games
- Register new games in server registry and update scene routing
- Add tutorial markdown files and update game icon assets
2026-06-13 21:54:20 -06:00
Brian Fertig fc7ae2c53d feat: add themed tutorials and overhaul Monopoly AI trading
- Add new tutorials for Labyrinth and Mexican Train with unique character voices
- Redesign Battleship and Mahjong tutorials with narrative themes and assets
- Implement AI-initiated trade proposals and counter-offer system in Monopoly
- Add AI-to-AI trading with rate-limited proposals and mutual benefit validation
- Enable tutorial flags for Labyrinth and Mexican Train in game registry
- Add new character assets and tutorial videos
2026-06-13 19:30:12 -06:00
Brian Fertig b2e33f6bdf feat: add slot game artwork assets for fruit-frenzy and liberty-belle
- Add sprite images for Liberty Belle slot game (bell, diamond, heart, horseshoe, spade, star)
- Add sprite images for Fruit Frenzy slot game (bell, cherry, lemon, melon, orange, plum)
- Update slots-artwork.json to reference the new image assets
2026-06-13 15:47:47 -06:00
Brian Fertig b59e805614 feat: add slot game assets and update tutorial style
- Add new image assets for Gold Rush slot game (bandit, dynamite, pickaxe, saloon, sheriff, wagon)
- Add new image assets for Sugar Spin slot game (bear, berry, cane, chocolate, jelly, lollipop, mint, rainbow)
- Add cabinet and card artwork for all slot games (Liberty Belle, Fruit Frenzy,Lucky Sevens,Sugar Spin)
- Update slots-artwork.json with paths for all new and existing slot assets
- Modernize Mastermind tutorial language with casual/colloquial tone
2026-06-13 15:00:37 -06:00
Brian Fertig 980dae5374 feat(slots): add artwork assets for dragons-hoard slot game
Add sprite images and UI elements for the dragons-hoard slot game:
- Symbol sprites (dragon, gem, knight, castle, chest)
- Cabinet and card background images
- Update slots-artwork.json with image paths for all symbols

This completes the visual asset integration for the dragons-hoard game theme.
2026-06-13 13:11:44 -06:00
Brian Fertig 519dd617d2 feat(farkel): overhaul turn scoring with combined cycle logic and explain panel
- Replace turn.kept running sum with priorKept + selectionScore model so the
  banked total always reflects all set-aside dice in the current cycle, enabling
  higher N-of-a-kind bonuses when extending sets.
- Update bestScoring and hasScoring to consider setAsideDice; use brute-force
  subset search (feasible for ≤6 dice) instead of greedy strategy for correctness.
- Add breakdownScoring helper to decompose a combined dice set into labeled groups.
- Add updateExplainPanel showing "Prior rolls", scoring groups, and total with
  "(need 500)" note when off-board requirement isn't met; format scores >999 as K,DDD.
- Refactor selectionScore/selectionValid to score the combined set (setAsideDice + selection).
- Use bestScoring(rolled, setAsideDice) in onScoreAll and AI for optimal picks.
- Fix scratch paper preview to use priorKept + selectionScore consistently.
- Add hot dice handling: carry cycle score into priorKept and reset setAsideDice.
- Slots: guard card artwork loading to avoid errors when texture is missing; adjust bulb positions accordingly.
2026-06-13 12:25:25 -06:00
Brian Fertig d82a8d676f fix: correct score display and selection logic in FarkelGame
- Fix turn score display to show kept dice separately from selected dice
- Update selection scoring to only evaluate currently selected dice, not combined with set aside dice
- Add validation check for empty selections
2026-06-13 11:34:36 -06:00
Brian Fertig d34ab83b39 feat: add slot machine artwork and update game registry
- Add new slot machine themes: Pharaoh's Fortune and Abyssal Treasures
  - 10 symbols each with corresponding PNG assets
  - Cabinet artwork for both themes
- Update slots-artwork.json with image paths for all new symbols
- Reformat registerGame calls in registry.js for consistency
- Update slots iconFrame from 54 to 63

Adds complete artwork and configuration for two new slot machine themes,
bringing the total registered games to 63.
2026-06-13 10:45:21 -06:00
Brian Fertig 6440328f2c feat: add colored playfield theme support with dynamic color schemes
- Add new "Colored" playfield type that generates textures from JSON-defined color schemes
- Create colored-playfields.json with 10 curated color themes (Midnight Aurora, Sunset Horizon, etc.)
- Add dropdown selector in OpponentSelectScene to choose between color schemes
- Generate colored playfield textures dynamically using canvas gradients at game start
- Display theme preview in playfield selection UI with CSS gradient rendering
- Integrate colored playfield loading and default application alongside existing playfields
2026-06-13 09:04:42 -06:00
Brian Fertig 09d94a6ae7 Added Slot Machines 2026-06-12 19:42:27 -06:00
Brian Fertig 8a8ea2ef3b feat: add time bonus mechanic to Bejeweled and new shift artwork
- Add TIME_BONUS constants (flame: 10s, star: 10s, hyper: 15s, mult: 5s)
- Display "+X Seconds Added!" banner when special gems are triggered
- Apply accumulated time bonuses at the end of each cascade phase
- Cap time at BLITZ_SECONDS maximum
- Add 5 new shift artwork images and update shift-artwork.json
2026-06-12 18:14:19 -06:00
Brian Fertig 13b5ec6fdf fix: adjust Bejeweled game piece shapes for yellow diamond and purple triangle
- Yellow diamond: reduce vertex distance from 1.06 to 0.92 for a more compact shape
- Purple triangle: replace regular polygon with custom asymmetric coordinates
  (1.15, 0.85) for improved visual distinction
2026-06-12 16:49:56 -06:00
Brian Fertig 27a137b822 reduce crash spawn rate in BlockFighter by 50%
Change CRASH_RATE from 0.28 to 0.14, decreasing the frequency of
crash gems spawned in BlockFighter gameplay.
2026-06-12 16:39:42 -06:00
Brian Fertig 4ab5ea108f fix: adjust car size and positioning on roads
- Scale down car sprites to 70% size for better visual fit
- Offset cars to the right side of roads using perpendicular
  positioning instead of centering them on the road path
2026-06-12 16:35:33 -06:00
Brian Fertig 810c94da21 fix: adjust car size and positioning on roads
- Scale down car sprites to 70% size for better visual fit
- Offset cars to the right side of roads using perpendicular
  positioning instead of centering them on the road path
2026-06-12 16:06:10 -06:00
Brian Fertig 2451e8fc66 feat(minimotorways): render roads connecting to houses and buildings
- Add logic to find valid road adjacencies for structures, including diagonal connections
- Draw road circles at structure locations to visualize connections
- Adjust road rendering depth
2026-06-12 14:22:35 -06:00
Brian Fertig d57275c496 tweak: reduce Mini Motorways difficulty and slow pacing
- Increase week duration (55s → 70s) and delay color unlocks
- Lower house/building caps (30→20, 12→8) and slow car speed (3.0→2.5)
- Increase house/building spawn intervals and slow pin accumulation
- Start with 1 color instead of 2 for a gentler learning curve
2026-06-12 14:12:40 -06:00
Brian Fertig 3cd0f2b2e7 feat: add Bejeweled Blitz and Mini Motorways games
- Implement Phaser scenes and pure JS logic modules for both games
- Register games in server registry and scene routing
- Add headless verification scripts for Bejeweled and Mini Motorways logic
- Update game-icons sprite sheet
2026-06-12 13:52:27 -06:00
Brian Fertig 01dcfbfd85 fix(dominion): prevent card interaction during draw animations
- Defer hover and interactivity attachment until cards are fully visible
- Re-enable interactivity after draw/discard animations complete
- Prevents accidental card clicks during animation transitions
2026-06-12 10:02:23 -06:00
Brian Fertig 1e607e5802 feat(catan): add debug mode for free roads/ships and improve fog revelation
- Add DEBUG_FREE_ROADS_AND_SHIPS flag to bypass resource costs for testing
- Extend fog hex revelation to include corner-adjacent hexes, not just edge-adjacent
- Restructure button enable logic to support debug mode in UI
- Initialize hexTileFrames map in CatanGame setup
2026-06-12 09:46:30 -06:00
Brian Fertig c9192cda75 feat(puddingmonsters): implement open-edge sliding mechanic
Make board edges open instead of walled — blobs that slide off the
table fall and die, faithful to the original Pudding Monsters.

- Detect edge deaths in computeSlide (deathCause: 'edge')
- Animate blobs tumbling off the board with overshoot + fade
- Show 'Overboard!' death overlay for edge falls vs 'Splat!' for spikes
- Redesign board as a floating table with open edges (drop shadow, no rim)
- Regenerate all levels with walls added to every tier (walls are the
  only terrain that stops a slide, so they're required from tier 1)
- Update UI copy to explain the new slide-and-fall rules
2026-06-12 00:52:36 -06:00
Brian Fertig affe120ab7 feat(pudding-monsters): per-cell blob rendering with jelly animations
Track each monster's original index in cell data [x, y, m] so merged blobs
retain individual colors and faces. Replace uniform blob coloring with a
multi-pass silhouette renderer that blends adjacent monster colors and draws
eyes on every cell. Add squash-and-spring wobble tweens for merge impacts
and slide movements.
2026-06-12 00:28:20 -06:00
Brian Fertig d51d026352 feat: add Zuma marble-shooter game with 20 levels
Implement a complete Zuma-style puzzle game featuring:

- Pure game engine (`ZumaLogic.js`) with Catmull-Rom path animation,
  segment-based chain physics, match-3 popping, and power-ups (slow,
  reverse, accuracy, explosion)
- Phaser scene (`ZumaGame.js`) with procedural textures, laser sight,
  and full UI (level select, overlays, scoring)
- 20 hand-designed levels across 6 path shapes (s-curve, horseshoe,
  spiral, zigzag, double-loop, figure-eight) with calibrated difficulty
- Level generator (`genZuma.js`) and verification suite (`verifyZuma.js`)
  for path geometry, parameter ranges, and engine correctness
- Platform integration: game registry, scene dispatch, preload asset
2026-06-12 00:15:51 -06:00
Brian Fertig c74fc88e04 feat(jewelquest): enhance battle visuals and add sword SFX
- Add dedicated battle background image, separate from non-battle screens
- Move felt background to render after textures are loaded
- Fix callout text z-ordering so it always renders above jewels/FX
- Play sword-hit SFX on skull matches, sword-slice on damage
- Register new audio assets and sound constants
2026-06-11 21:06:36 -06:00
Brian Fertig d01a2917b1 feat: add Jewel Quest game and fix Portrait memory leaks
- Register new Jewel Quest game across client and server
- Update game icons spritesheet with new frame (59)
- Fix memory leaks in Portrait components by implementing proper
  cleanup with double-destruction guards and returning destroy function
2026-06-11 19:07:43 -06:00
Brian Fertig bbb9c329c7 feat: add 4-player Hong Kong style Mahjong with AI opponents
- Implement pure logic engine for tile management, shanten calculation, claim resolution, and faan scoring.
- Add heuristic AI (5 skill levels) using shanten minimization, ukeire tiebreaking, and adaptive defense.
- Build Phaser UI with tile rendering, dynamic scoreboard, claim prompts, hand-end modals, and a scoring reference panel.
- Integrate into frontend routing, opponent selection, and backend registry.
- Include headless verification script for tile catalog, scoring fixtures, and AI self-play invariant checks.
- Update game icon assets and add in-game tutorial.
2026-06-11 18:18:45 -06:00
Brian Fertig dd749bc570 feat: add Mahjong Match solitaire game with 6 layouts and guaranteed-solvable deals
- Add complete Mahjong Match game (MahjongLogic.js + MahjongMatchGame.js) with pure board model and Phaser UI
- Implement 6 layouts: Garden, Crossroads, Pyramid, Butterfly, Fortress, and classic Turtle (up to 144 tiles)
- Generate guaranteed-solvable deals by simulating reverse removal of free pairs
- Add tile matching logic using half-tile coordinate system for proper layer overlap detection
- Include 38 tile face images (bamboo, circle, pinyin characters, winds, dragons, flowers, seasons)
- Add hint system, shuffle functionality, timer, best time tracking per layout
- Register game in server registry and scene dispatch tables
- Add headless verification script for face set validation and random self-play testing
2026-06-11 16:23:17 -06:00
Brian Fertig 795ef9b11f Don't show hand value until cards dealt 2026-06-11 15:36:31 -06:00
Brian Fertig bf47c50dfa Added Block Fighter game 2026-06-11 10:03:22 -06:00
Brian Fertig c5971d8eb1 Added new game: Shift 2026-06-11 09:05:57 -06:00
Brian Fertig d36b330a87 feat: add game tutorials and fix holdem community card animation
- Add tutorial.md for Farkel (written by Gerome, ski-themed),
  Forbidden Island (written by Balam, jaguar god), and Splendor
  (written by Juliet, florist)
- Fix Holdem community card reveal: fly face-up cards with longer
  delay, remove flip animation, and suppress new community cards
  immediately after play action animation to prevent flash visibility
2026-06-09 22:23:02 -06:00
Brian Fertig 39e925016e fix: correct blackjack card dealing animation order
- Change deal sequence to match real blackjack rules: dealer hole card
  face-down first, then player cards, dealer upcard face-up, then
  second player cards
- Add renderAll() call to ensure card graphics exist before animation
- Update comments to reflect new deal order
2026-06-09 21:32:31 -06:00
Brian Fertig 082007ac81 Added Speech for Beth and Blackwind 2026-06-09 20:43:51 -06:00