Commit Graph

152 Commits

Author SHA1 Message Date
Brian Fertig f83b8e72e9 Text alignment 2026-05-31 13:11:22 -06:00
Brian Fertig 651ef51633 fix: adjust Battleship UI layout and positioning
Repositions ship pips and placement buttons to prevent overlap and improve visual alignment. Updates Y-coordinates for Randomize, Clear, and Ready buttons to fit within the game area, and shifts ship labels left for better spacing.
2026-05-31 13:01:05 -06:00
Brian Fertig 81d3a28195 fix: exclude Mastermind and Battleship from playfield selection
Prevents the playfield option section from appearing for Mastermind and Battleship games, which do not utilize playfield tiles in the same way as other games.
2026-05-31 12:52:16 -06:00
Brian Fertig 0bb32359b2 feat(mastermind): add Exact Placement scoring mode
Introduces a per-peg feedback system where each marker corresponds to the specific slot's result (exact, partial, or none) instead of aggregate counts. Added `scoreGuessPerPeg` logic, updated UI rendering and sound triggers to handle per-peg data, and added a scene toggle for switching between Standard and Exact Placement modes.
2026-05-31 12:44:38 -06:00
Brian Fertig 2c5bcbd478 Backgammon Tutorial 2026-05-31 12:22:51 -06:00
Brian Fertig 99497e19fa Backgammon Tutorial 2026-05-31 11:53:40 -06:00
Brian Fertig 0c416f362b feat(mastermind): improve UI layout and enhance peg reveal animation
- Relocate Leave button to the bottom of the game screen
- Extend peg reveal animation duration to 2.3s with smoother tick timing
- Introduce MASTERMIND_CALCULATE sound effect to play during the reveal
- Update audio preload and SFX registry to support the new sound
2026-05-31 10:19:42 -06:00
Brian Fertig 13b9d0d1cc Turn arrow placement 2026-05-31 10:01:18 -06:00
Brian Fertig 676a4d3106 feat: add Mastermind decryption duel game with 5 AI skill levels
- Introduce core game logic, AI engine, and Phaser UI for a cyberpunk-themed Mastermind implementation.
- AI features 5 difficulty tiers using random, consistent, and Knuth minimax strategies.
- Implement turn-based duel mechanics where player and AI race to crack each other's secret codes.
- Add neon visuals, peg-fly animations, staggered feedback reveals, and 7 custom sound effects.
- Register game in server registry, update menu/room scenes, preload assets, and include tutorial docs.
2026-05-31 09:53:37 -06:00
Brian Fertig b0d6817c54 Rounded Tutorial Buttons 2026-05-31 08:24:35 -06:00
Brian Fertig 98e799bf25 feat: add tutorial modal system and register battleship game
- Introduce `hasTutorial` flag to game registry
- Add "?" button on game menu to open tutorial modals
- Implement shared hover tooltip on game menu
- Add tutorial modal CSS styling
- Register Battleship game with tutorial flag
- Load Battleship sound effects
2026-05-31 00:04:01 -06:00
Brian Fertig 84cf864fd9 chore(ticket-to-ride): Refine US land outline and Great Lakes shapes
Hand-trace a more accurate US lower-48 + southern Canada outline with additional
points for Pacific NW, Great Lakes, Florida, and Gulf Coast. Update GREAT_LAKES
polygon to better match actual geography.
2026-05-30 21:15:01 -06:00
Brian Fertig a932cc5797 feat(ticket-to-ride): Support curved routes with quadratic bezier curves
Introduce `ROUTE_CURVES` configuration and helper functions (`bezierPolyline`,
`polylineLength`, `pointAtDist`) to sample and measure polylines. Update
`routeSegments` and `routeMidpoint` to distribute cars and calculate midpoints
along curved paths instead of straight lines, improving board visual fidelity
and route alignment.
2026-05-30 20:49:20 -06:00
Brian Fertig b6d85e30be feat: improve Go Fish AI with card sprites and turn exclusions
- Add custom card texture spritesheet and render cards using sprite frames
- Prevent AI from repeatedly asking for the same rank after a failed catch
- Track and exclude previously attempted (target, rank) pairs per turn to reduce redundant moves
- Load gofish-cards assets in preload scene
2026-05-30 19:28:48 -06:00
Brian Fertig 618d3d31c4 feat: add Othello and Go games with AI and Phaser UI
- Implement pure game logic for Othello (8x8) and Go (9x9)
- Add configurable AI opponents (skill 1-5) using heuristic look-ahead and alpha-beta minimax
- Build Phaser scenes with polished UI, stone/disc rendering, capture/flip animations, territory scoring, and end-game panels
- Register games in server registry and update client routing, opponent selection, and scene registration
2026-05-30 18:59:48 -06:00
Brian Fertig 8ccb100678 feat: add single-player Sudoku game with hints and scoring
- Implement Phaser UI and client-side logic for gameplay
- Add server-side puzzle generator with 5 difficulty levels
- Register game in frontend router and backend registry
- Include hint system, score calculation, and notebook-themed design
2026-05-30 18:05:40 -06:00
Brian Fertig fcc061e43d Added VP coins to Dominion 2026-05-30 17:18:37 -06:00
Brian Fertig eca8013fd4 feat: polish Ticket to Ride visuals and add animated game menu tabs
- Introduce muted palette and stroke outlines for unclaimed route segments so claimed routes pop
- Refactor busy state handling to toggle dim overlay and suppress hand render flicker during animations
- Improve modal layout using right-band centering, responsive font sizing, and word wrapping
- Block input briefly after modal close to prevent accidental clicks
- Add animated tab icons to the game menu with scale transitions and pulsing glow effects
- Load new tab-icons assets in the preload scene
2026-05-30 15:09:03 -06:00
Brian Fertig 2521146579 feat: replace route cars with animated train car sprites and card animations
- Generate a `ttr-train-car` texture and use images instead of procedural drawing for owned routes.
- Add `animateClaimRoute` to animate cards flying from hand to a lineup, transforming into train cars, then placing on the route.
- Update human and AI route claim flows to use the new animation.
- Add a pulsing turn indicator triangle that moves to the current player's portrait.
- Track `trainCarObjs` for proper cleanup during route re-renders.
2026-05-30 13:41:14 -06:00
Brian Fertig 97befdb502 feat: add market card sliding and refill animations to Ticket to Ride
- Implement `animateMarketSlideUp` to slide remaining cards up when one is drawn.
- Add `animateRefillMarketSlot` to animate a new card appearing from the deck.
- Update human and AI draw handlers to orchestrate card draw, slide, and refill animations.
- Introduce `marketSlotObjs` to track UI objects per slot for targeted tweens.
- Create `renderAllExceptMarket` to render the rest of the game while market animations play.
- Refactor `renderMarket` to group objects by slot index.
2026-05-30 13:17:49 -06:00
Brian Fertig ae6c69e25c feat: add opponent hand visualization and update AI draw animations
- Introduce mini face-down card fans below opponent portraits to show hand size.
- Modify AI draw animations to target specific slots within the mini hand fan.
- Adjust layout constants (OPP_STEP) and text positions to accommodate the new UI.
- Simplify opponent info text to remove redundant card counts.
2026-05-30 12:52:41 -06:00
Brian Fertig 402293fea2 feat: add cinematic card drawing animations to Ticket to Ride
- Implement `animateCardDraw` with a multi-phase animation: flip, fly to center,
  fireworks particle effect, and fly to destination.
- Update human market and deck click handlers to play animations when drawing cards.
- Add card draw animations for AI turns, flying cards to opponent positions.
- Refactor turn logic to await animations before advancing game state.
- Add `handDestForColor` helper for calculating hand layout positions.
2026-05-30 12:41:27 -06:00
Brian Fertig 8222b61f0a feat: upgrade Ticket to Ride UI with card sprites and improved layout
- Replace procedural card drawing with spritesheet images for better visuals
- Rotate cards to landscape orientation and adjust right-panel dimensions
- Reorganize opponent panels into a two-column grid for better screen utilization
- Add circular score badges above player and opponent portraits
- Display actual top card on discard pile instead of generic face-down graphic
- Move game log to bottom-right corner
- Update PreloadScene to load new card assets
2026-05-30 12:05:20 -06:00
Brian Fertig 975d40b4b0 refactor: overhaul game menu layout, enhance Button component, and adjust Dominion AI
- Replace column-based game list with a tabbed category interface and grid layout
- Add active state management to tabs and refactor Button component for consistent visual states
- Increase Dominion AI Platinum purchase threshold from 5 to 9 coins in Colony games
- Add Ticket to Ride card assets
2026-05-30 10:47:50 -06:00
Brian Fertig 2dbcb83754 feat: add single-player Hangman game with difficulty levels
- Implement Hangman game scene using Phaser with a sketch/paper-style UI
- Add pure logic module for word masking, wrong guess tracking, and win/loss conditions
- Create backend `/api/words/hangman/start` endpoint with curated word pools for easy, medium, and hard difficulties
- Register game in scene manager and route dispatcher for seamless menu integration
- Add score tracking and basic game state management
2026-05-30 08:50:44 -06:00
Brian Fertig d9a68de8e4 feat: add Ticket to Ride (USA edition) game
Implement a fully playable Ticket to Ride game featuring a pure logic engine,
heuristic AI opponent, and Phaser UI scene.

Key additions:
- Board geometry, route definitions, destination tickets, and train card data
- State management, turn flow, payment validation, and scoring (routes, tickets, longest path bonus)
- AI decision-making for claiming routes, drawing cards/tickets, and endgame strategy
- Frontend integration (scene registration, opponent count default, slug dispatch)
- Server game registry configuration (supports 2-5 players)

Follows the existing architecture separating data, logic, AI, and rendering.
2026-05-30 08:01:02 -06:00
Brian Fertig 2958de16ce fix(catan): correct ship placement to use edge coordinates
fix(dominion): increase Platinum cost in Prosperity expansion

- Update Catan ship placement logic to calculate destination using edge positions like roads
- Adjust Dominion Prosperity expansion Platinum card cost from 5 to 9 coins for balance
2026-05-30 06:57:10 -06:00
Brian Fertig 9dbf3feae4 feat(catan): implement Seafarers expansion features (gold hexes, ships, fog)
- Add gold hex resource picking phase with AI support
- Implement ship building mechanics and update build costs UI
- Introduce fog tiles that reveal terrain when roads/ships are built adjacent
- Replace robber token with pirate ship graphic
- Persist random tile frames for consistent hex visuals
- Update game state machine to handle gold pick queue and phase transitions
- Adjust UI layout (card positions, build panel) to accommodate Seafarers elements
2026-05-29 16:13:53 -06:00
Brian Fertig c5f34b7c28 feat(catan): implement Seafarers expansion and dynamic board architecture
- Decouple static board geometry from game state by introducing a board registry and `geoFor(state)` accessor. All AI and logic functions now dynamically resolve topology.
- Add support for Seafarers scenarios (New Shores, Four Islands, Oceania, Fog Island) with scenario-specific setup rules and victory conditions.
- Implement ship mechanics: players build maritime routes on coastal/sea edges that count toward the longest road.
- Introduce sea, gold, and fog terrain types. Update hex rendering, AI pathfinding, and placement rules to respect land vs. water constraints.
- Add pirate token rendering and logic, plus expansion scoring hooks for bonus victory points.
- Update lobby UI to allow expansion and scenario selection, passing configuration through to the game scene.
- Refactor `CatanBoard.js` geometry generation for O(1) edge lookups and dynamic port assignment.
2026-05-29 15:06:20 -06:00
Brian Fertig 2c95e76b00 Added Prosperity 2026-05-29 10:29:13 -06:00
Brian Fertig 57eeb3bfee feat: add Word Search game and improve solo game flow
- Integrate Word Search game into client and server registries
- Add API endpoints for puzzle generation and theme listing
- Update GameMenuScene to skip opponent selection and stop menu music for solo-only games
2026-05-29 08:21:48 -06:00
Brian Fertig 47885bab01 Game updates 2026-05-28 21:01:28 -06:00
Brian Fertig 371724dc84 feat: add Ghost word game with server-side AI and skill profiles
- Implement client and server logic for Ghost game (`GhostGame`, `GhostLogic`, `GhostAI`, `ghostEngine`).
- Add perfect-play search and 5-tier skill system to the server-side dictionary engine.
- Register Ghost in the game registry and route it through `GameRoomScene`.
- Add `playIntro` option to `Portrait.js` and `skipIntro` to Wordle to control intro speeches on round restarts.
- Improve Scrabble rack reordering layout and gap handling during drag-and-drop.
- Expose Ghost API endpoints (`/ghost/judge`, `/ghost/ai-move`) in `wordRoutes.js`.
2026-05-28 19:05:36 -06:00
Brian Fertig dd384d6c15 New music tracks 2026-05-28 00:02:32 -06:00
Brian Fertig 95ff6f8de2 feat: add Scrabble game with client-server AI and Phaser UI
- Implement `ScrabbleGame` scene with drag-and-drop, rack management, and animated tile placement.
- Add pure JS modules for Scrabble rules, scoring, and tile data (`ScrabbleLogic`, `ScrabbleTiles`).
- Create server-side dictionary trie and DFS-based move generator for AI (`scrabbleEngine`).
- Register game routes for move validation and AI move requests (`wordRoutes`).
- Update game registry, opponent selection, and preload scenes to support Scrabble.
- Include custom font (`YummyCupcakes`) for the scorepad UI.
2026-05-27 23:54:02 -06:00
Brian Fertig 17133787c1 refine wordle AI balance, add Catan tutorial, fix opponent select layout, enable word category
- Adjust Wordle AI skill profiles to lower win rates and increase blunder chances for better difficulty curve
- Center Wordle player portrait vertically with the playfield
- Add Steve's humorous tutorial for Settlers of Catan (markdown + assets)
- Update OpponentSelectScene to hide playfield options for word games and adjust scroll height
- Fix migration script to temporarily disable foreign keys to allow schema changes
- Add migration to extend games.category to include 'word'
2026-05-27 23:22:15 -06:00
Brian Fertig 690d05b28d feat: add Wordle game support and word routes
- Register Wordle game in server registry under 'word' category
- Add `/api/words` API routes
- Update client to integrate WordleGame scene
- Adjust game menu layout to accommodate a new 'Word' category column
- Enable skill controls and game room dispatch for Wordle
2026-05-27 21:14:31 -06:00
Brian Fertig 33bbeff79b feat: enhance card animations and improve icon row fitting
- Add `_animPurchaseShowcase` for a dramatic card reveal with a dark overlay and animated comet border effect
- Refactor purchase and gain flows to use the new showcase animation before flying the card to its destination
- Update `addIconRow` to accept a width constraint, dynamically scale text/tokens, and fallback to colored bars when space is too limited
2026-05-27 19:33:30 -06:00
Brian Fertig ca38548700 feat(dominion): add animated deck/discard counters and refine turn SFX
- Track deck/discard pile counts during animations for real-time UI updates
- Implement animated discard pile countdown when shuffling
- Dynamically show/hide deck and discard piles based on animation state
- Replace generic card SFX with specific sounds for buying treasures, purchasing, and dealing
- Update Dominion card assets to align with new UI/audio feedback
2026-05-27 18:53:30 -06:00
Brian Fertig 0536a261f6 feat(dominion): add sparkle particles and coin sound to supply piles
- Add a particle emitter effect to supply pile cards using a generated sparkle texture.
- Include a `coins.mp3` sound effect for purchase interactions.
- Implement `_clearSupplyFx` to manage emitter lifecycle during render cycles.
2026-05-27 17:58:58 -06:00
Brian Fertig 41466e14f3 feat(dominion): add animated comet trails to playable hand cards
- Implement a visual effect using Phaser Graphics to draw animated "comet" trails along the perimeter of playable action and treasure cards.
- Add `perimPoint` helper to calculate coordinates along a rectangle's perimeter.
- Manage particle graphics and tweens via new `_handFxGraphics` and `_handFxTweens` arrays, ensuring proper cleanup during render cycles.
- Replace simple face highlighting with the new `_buildHandFxItem` method for enhanced visual feedback.
2026-05-27 17:32:58 -06:00
Brian Fertig 285d992915 ```
feat(dominion): add recommended kingdom presets and update deck mode UI

- Introduce four new recommended kingdom decks from the 2nd-edition rulebook: Size Distortion, Deck Top, Silver & Gold, and Helpful Actions.
- Refactor `kingdomFor` to use a `KINGDOM_PRESETS` mapping for cleaner extensibility.
- Update the Opponent Select Scene UI to display all deck mode options in a 3-column grid layout.
```
2026-05-27 17:29:11 -06:00
Brian Fertig 71d279c835 feat: add Checkers and Chess games with AI opponents and improve Dominion UX
- Implement Checkers and Chess with complete Phaser UI, pure logic modules, and alpha-beta minimax AI opponents featuring a 1-5 skill model.
- Extend opponent skill selector to support Checkers and Chess.
- Register new games in frontend routing and backend registry.
- Improve Dominion game UX: add persistent phase dials and turn arrow indicators, add confirmation prompts for ending actions/turns, and refine card animation timings.
- Update Dominion card asset files.
2026-05-26 23:52:05 -06:00
Brian Fertig 97d748b2f5 feat(dominion): add hand drag-and-drop and AI opponent animations
- Implement drag-and-drop reordering for the player's hand with a visual play drop zone.
- Add smooth, multi-phase animations for AI opponents (play, draw, cleanup, gain).
- Refactor hand rendering to preserve manual order and improve playability highlighting.
- Update card draw animations to target existing sprite coordinates directly.
2026-05-26 20:50:21 -06:00
Brian Fertig 7e3c7d8e3d feat(dominion): enhance discard pile UI and improve card animation flow
- Add visual discard pile with card sprite and count badge
- Center action buttons and remove redundant Play Treasures button
- Track in-play cards for accurate animation source positions
- Refactor `setState` to handle discard, gain, and draw animations sequentially
- Add multi-phase discard animation (fly face-up, fold, unfold face-down)
- Add gain card animation to deck or discard pile
- Improve animation queue handling with `_animating` and `_pendingAnimState`
2026-05-26 20:22:08 -06:00
Brian Fertig e6db79afbb feat(dominion): display opponent hand cards near portraits
- Add face-down mini card sprites for opponents below their portraits
- Implement layout logic to center and space cards based on hand size
- Update card asset textures
2026-05-26 19:50:53 -06:00
Brian Fertig 1196d3ba5b refactor(dominion): redesign card hover popup to show card face
- Replace text-only tooltip with a visual card preview popup
- Add background graphics and proper layout for card face and rules text
- Update popup dimensions and positioning logic
2026-05-26 19:12:39 -06:00
Brian Fertig c264cd9419 ```
feat(dominion): add card draw animations and visual deck pile

- Implement animation system for drawing cards from deck to hand
- Add input blocking and state queuing during animations to prevent race conditions
- Replace text-only deck counter with a visual card pile and count badge
- Support face-down card rendering for animation start positions
- Ensure all human actions respect animation state
```
2026-05-26 19:03:27 -06:00
Brian Fertig fccd8722c8 Merge branch 'new_opponents' into dominion 2026-05-25 22:13:42 -06:00
Brian Fertig 4b730f6127 feat: add Balam and Steve to opponents.json
- Introduce Balam (spriteIndex 16) and Steve (spriteIndex 17) as new opponents
- Include full speech configurations (intro, happy, upset, pick) for both characters
2026-05-25 22:10:05 -06:00