Commit Graph

252 Commits

Author SHA1 Message Date
Brian Fertig 1fd5855ac7 fix(dominion): adjust UI layout and label formatting
- Relocate prompt banner and buttons downward (Y: 500→720, 560→825)
- Replace card suit emoji with text 'C' in value labels
- Update `promptButton` call to pass label string directly instead of a function placeholder
2026-05-25 21:27:43 -06:00
Brian Fertig 249b01fd45 Update opponents image assets (PNG and PSD) 2026-05-25 21:06:34 -06:00
Brian Fertig 5a4f8a1204 feat: add Dominion card game with AI and full UI
- Implement pure state engine (`DominionLogic.js`) with turn lifecycle, card effects queue, and pending decision resolution for complex interactions.
- Add card definitions and kingdom pool (`DominionCards.js`) supporting Standard and Random deck modes.
- Create AI logic (`DominionAI.js`) using Big Money/early engine strategies scaled by opponent skill.
- Build Phaser scene (`DominionGame.js`) with supply/hand rendering, turn drivers, modal prompts for pending decisions, and end-game scoring.
- Wire up game registry, routing, preload assets, and opponent selection UI to support the new mode.
2026-05-25 17:27:24 -06:00
Brian Fertig 0f347e3502 Added two new opponents: Michael and Kona 2026-05-25 14:57:11 -06:00
Brian Fertig 78466530a3 feat: add Baccarat casino game with AI opponents and cinematic reveals
- Implement core game logic in BaccaratLogic.js including shoe management,
  hand evaluation, and betting resolution with standard rules (5% banker
  commission, 8-to-1 tie payout).
- Create BaccaratGame.js Phaser scene with full UI: betting panel, chip
  selection, seat portraits, and animated card dealing.
- Add BaccaratAI.js for opponent bet sizing and type selection (weighted
  toward Banker).
- Introduce "Equation Ribbon" reveal sequence that walks through each card's
  value, sums them, and performs a mod-10 reduction with visual flair.
- Register Baccarat in the server game registry and frontend scene dispatch.
2026-05-25 14:15:53 -06:00
Brian Fertig e46cd1cc2f feat(bingo): add countdown timer, opponent match flash, and fullscreen fix
- Add a 10-second countdown timer between ball draws with a dedicated UI overlay
- Implement visual flash effect on opponent panels when their cards match the called number
- Play happy emotion animation on opponent portraits during matches
- Replace CASINO_WIN/LOSE sounds with CASINO_BLACKJACK for win/loss events
- Fix fullscreen toggle to properly handle exitFullscreen and requestFullscreen
- Add new video assets for opponent emotions (happy, idle, upset)
2026-05-25 13:21:26 -06:00
Brian Fertig 3022e0eb23 fix: play casino win sound on successful bingo mark
- Replace `playChipBet` with `playSound(this, SFX.CASINO_WIN)`
- Provides appropriate audio feedback when a human player successfully marks a square
2026-05-25 11:41:34 -06:00
Brian Fertig e1f7534853 feat: add bingo ball spinning sound effect
- Add `sfx-bingo-balls` audio asset and load it in PreloadScene
- Register `BINGO_BALLS` sound in the SFX constants
- Play the sound when the bingo ball spinning animation starts
2026-05-25 11:30:58 -06:00
Brian Fertig 3b113a1092 refactor: resize and reposition mini bingo card background
- Reduce mini card dimensions from 125x125 to 90x90 pixels
- Adjust positioning coordinates from (px+54.5, py+34.5) to (px+28, py+8)
- Improves visual alignment and spacing of opponent's bingo card in the UI
2026-05-25 11:19:25 -06:00
Brian Fertig 57c9d85864 fix(bingo): adjust visual styling and formatting
- Update player card background border radius from 5 to 15 for smoother corners
- Change called numbers board background color from cream to black for better contrast
- Remove unnecessary whitespace in `init()` and physics calculation lines (code cleanup)
2026-05-25 11:05:53 -06:00
Brian Fertig ebe387f5fe feat(bingo): add cream-colored backgrounds to game UI elements
- Add cream white background behind the player's bingo card
- Add cream white background behind opponent mini-cards
- Add cream white background behind the called numbers board
- Adjust player card header position (HEADER_Y, ROW0_Y) to accommodate new layout
2026-05-25 11:02:34 -06:00
Brian Fertig 166da6fd0d Narrow master called-numbers board columns
- Reduce column step width from 90px to 58px
- Reduce cell width from 84px to 44px
- Keeps cell height unchanged at 44px
2026-05-25 10:48:07 -06:00
Brian Fertig 00e6607a48 Adjust Bingo game layout positioning
- Move human card header up by 20px (HEADER_Y: 140 -> 120)
- Shift master called-numbers board letters left by 30px (CB_LETTER_X: 540 -> 510)
2026-05-25 10:44:35 -06:00
Brian Fertig 91dac1f2e3 feat: add Bingo game with AI opponents and physics-based drum
Introduce a new Bingo game featuring a physics-driven drum with Matter.js,
AI opponents that auto-daub and claim wins with suspenseful delays, and a
"claim race" mechanic where the human can beat AI to the punch. Includes
complete game logic, UI components (drum, card, opponent panels, called
numbers board), and server registration for the new game slug.
2026-05-25 10:38:08 -06:00
Brian Fertig 6508a80c94 feat(catan): enhance AI expansion logic and polish game visuals
- Improve Catan AI to evaluate 1-hop lookahead nodes and prioritize bridge connections for better road expansion.
- Add visual feedback for opponent Monopoly plays (resource text + fireworks).
- Redesign game-over screen with dynamic winner portraits (video for AI, avatar fallback for human) and fireworks.
- Add eliminated player panel in Hold'em with animated portrait transitions.
- Export `longestRoadFor` for use in AI logic.
2026-05-25 09:46:27 -06:00
Brian Fertig 0b2657b954 feat: add Jerry character with speech assets and fix seat order logic
- Add 12 new MP3 speech files for Jerry (intro, happy, upset, pick)
- Update opponents.json to include Jerry's speech configuration
- Fix HoldemLogic to exclude folded players from seat order calculation
2026-05-25 00:08:52 -06:00
Brian Fertig a05d8b6c96 feat(holdem): support up to 7 AI opponents with dynamic elliptical seating
- Update Holdem game configuration to allow 3-7 AI opponents (previously fixed at 3)
- Implement dynamic seat layout using an elliptical distribution for balanced positioning
- Add computeSeatLayout() to calculate positions based on opponent count, with special handling for side/diagonal corners
- Adjust portrait, card, and UI element positioning to adapt to different table sizes
- Update AI personality definitions to include 7 distinct profiles with varied aggression/bluff rates
- Modify AI decision logic to limp more frequently in unraised preflop scenarios
- Update hand summary modal to scale rows dynamically to fit 7+ players
- Update server game registry to reflect new max opponent count
2026-05-24 23:37:09 -06:00
Brian Fertig 24a48c13eb Added new opponents. Fixed styling issues. 2026-05-24 21:19:30 -06:00
Brian Fertig e7827cec05 fix: render action callouts as DOM elements to overlay opponent videos
- Switch `animateActionText` from Phaser text to DOM container to ensure it renders above opponent portrait videos (which are DOM-based and thus always on top of the Phaser canvas)
- Apply text-shadow via inline CSS for better cross-browser compatibility with DOM text
- Increase depth to `D.modal + 100` to guarantee visibility over all other layers
2026-05-24 16:26:17 -06:00
Brian Fertig 02d10faa2d feat: overhaul player turn order and add action callouts
- Replace left-to-right seat processing with clockwise PLAY_ORDER starting top-right
- Animate deal sequence to follow the new play order
- Add pulsing highlight ring for active player's portrait
- Show large animated action callouts (Hit/Stand/Double/Split) between player and cards
- Position action buttons dynamically relative to the active player's portrait
- Update result reveal order to match clockwise play order
- Move betting UI panel and adjust button depths for proper layering
- Remove unused `nextActiveSeat` import in favor of `nextPlaySeat` method
2026-05-24 16:21:44 -06:00
Brian Fertig 349d2736c9 Changed rotation on text 2026-05-24 15:48:30 -06:00
Brian Fertig b2ef3cecf7 ```text
feat(blackjack): expand player capacity to 7 and improve table visuals

- Increase maximum players from 5 to 7 (6 opponents) by updating seat positions, logic loops, and server registry.
- Add traditional felt table markings including curved text for rules ("Blackjack pays 3 to 2", "Insurance pays 2 to 1") and card/bet spot outlines.
- Refactor seat label rendering to use a consistent centered layout under portraits.
- Adjust bet circle positioning logic for the new seat layout.
```
2026-05-24 15:46:36 -06:00
Brian Fertig 1a7decfa0e feat(catan): enhance AI trading logic and add UI tooltips/fullscreen support
- Implement intelligent AI trade initiation (proposeTrade) and response logic (respondToTrade) that adjusts willingness based on the requester's victory points.
- Add hover tooltips for harbors, Longest Road, and Largest Army cards to improve user understanding of game mechanics.
- Add a generic info tooltip system for UI elements.
- Add fullscreen toggle button to Landing and Game Menu scenes.
- Fix AI trade animation and status messages for better feedback.
2026-05-24 15:15:51 -06:00
Brian Fertig 4198dd5757 feat(catan): add animated special cards and opponent dev card reveals
- Implement visual tracking for Longest Road and Largest Army cards with
  smooth transfer animations between players and the central display.
- Add audio feedback for special card ownership changes and opponent dev card plays.
- Display opponent development card details with a zoom-in animation when played.
- Update opponent panels to remove special card badges in favor of the new visual system.
- Add necessary spritesheet and audio assets to the preload scene.
- Minor fix to restore dice state in Parchisi logic after three-doubles penalty.
2026-05-24 12:53:38 -06:00
Brian Fertig c2fb49706f Added Favicons 2026-05-24 11:18:57 -06:00
Brian Fertig 307f3b7123 feat(games): implement configurable match size for Go Fish and enhance Nerts UI
- Go Fish: Add support for 2-card and 4-card match variants.
  - Update `GoFishGame` and `GoFishLogic` to use a configurable `matchSize` (default 4).
  - Add UI toggle in `OpponentSelectScene` to select match variant.
  - Update labels and logic to reflect 'Books' (4-card) vs 'Pairs' (2-card).
- Nerts: Improve AI and UI responsiveness.
  - Add 'Last Move' timer panel with Shuffle (60s) and Resign (90s) buttons.
  - Implement foundation cooldowns to prevent rapid-fire AI moves.
  - Add dynamic layout for foundations and opponent panels based on player count.
  - Show opponent Nerts, stock, and waste cards in opponent panels.
  - Add `reshuffleAllStocks` utility in `NertsLogic`.
2026-05-24 11:02:06 -06:00
Brian Fertig 7e022e8e9b Added Nerts 2026-05-24 00:50:46 -06:00
Brian Fertig f9e80eaedc fix(catan): improve AI resource management by prioritizing settlements over roads
The AI now waits to build a road until no settlement spots are immediately reachable. This prevents wasting resources on roads when a settlement could be built, ensuring more efficient resource accumulation for higher-cost structures.
2026-05-23 17:44:55 -06:00
Brian Fertig 58c4edf8fd feat(catan): add visual and audio feedback for card theft by robber
- Detect when the robber steals a resource from player 0 by comparing resource counts before and after the move.
- Display a temporary "CARD STOLEN" banner with the stolen resource name and robber's name.
- Play a lose sound effect to provide immediate audio feedback.
- Apply this notification logic consistently across all three locations where the robber is moved (AI turn, player turn, and initial setup).
2026-05-23 17:34:55 -06:00
Brian Fertig 67500636cb Played happy video and audio when purchasing a city or settlement 2026-05-23 17:28:14 -06:00
Brian Fertig dff196e7ed Bunch o Changes 2026-05-23 17:26:21 -06:00
Brian Fertig 10df4781ef feat(catan): add standard tile placement option and update robber voice lines
- Add `STANDARD_RESOURCES` array to `CatanBoard.js` for the classic beginner layout
- Allow users to choose between 'random' and 'standard' tile placement in `OpponentSelectScene`
- Pass `tilePlacement` config through `GameRoomScene` to `CatanGame` and `CatanLogic`
- Update robber voice clip files to new recordings
2026-05-23 15:43:45 -06:00
Brian Fertig aa5609f2f9 feat(catan): enhance robber mechanics, dice animations, and resource hand UI
- Add animated robber movement with custom sprite, sound effects, and glow
- Implement dynamic dice roll animation with arc trajectory and sound cues
- Replace static resource hand with draggable, selectable cards
- Add victory points badge above player portrait
- Expand trade panel width and button sizes for better usability
- Load new robber asset and speech clips in preload scene
2026-05-23 15:19:39 -06:00
Brian Fertig 29fb4a9b2f feat(catan): overhaul visuals and opponent UI
- Replace static sea background with a radial gradient for a richer look.
- Redesign settlement and city graphics with drop shadows and white halos.
- Enhance road rendering with a white core for better visibility.
- Add VP badges and card count fans to opponent panels.
- Support card back sprites via `data.cardBack` for accurate card rendering.
- Mark Catan as a card game in the registry.
2026-05-23 13:42:51 -06:00
Brian Fertig 7439945416 feat(catan): refine hex tile rendering with inset borders and background
- Add `background-catan-board.png` for enhanced board visuals
- Implement inset polygon logic to create layered hex borders (colored swatch, dark ring, image area)
- Adjust tile image scaling to fit within the innermost inset polygon
- Reduce outer border line width for a crisper appearance
- Add fallback resource color fill for the inner image area if texture is missing
2026-05-23 13:04:09 -06:00
Brian Fertig e562ed21b8 feat(catan): enhance visuals with custom tiles, cards, and bank panel
- Add high-resolution `catancards.png` and `catantiles.png` assets
- Replace hexagon background colors with textured tile images from spritesheet
- Redesign resource hand with card-style UI (dark background, artwork, colored borders)
- Introduce a new Bank Panel on the right side showing resource and dev card counts
- Implement resource collection animations (chit pulse, particle effects, card flight)
- Export `HEX_W` constant for use in tile sizing calculations
2026-05-23 12:59:27 -06:00
Brian Fertig 4b6593b074 refactor Catan setup: use deterministic chit placement and randomize player order
- Replace the random hex chit assignment with a fixed spiral-based sequence (`CHIT_SPIRAL` and `CHIT_SEQUENCE`) to ensure consistent board layouts.
- Randomize the initial player turn order using a shuffled seat array instead of the static snake pattern.
- Update the build costs legend UI to display colored resource swatches in a bottom panel.
2026-05-23 10:25:55 -06:00
Brian Fertig 19620c10d4 feat: add opponent pick speech and spectrum visualizer
- Add new `pick` audio clips for each opponent in `opponents.json` and corresponding MP3 files
- Implement a spectrum visualizer overlay for opponent portraits that activates during pick speech playback
- Integrate `SpeechQueue` to handle opponent pick audio with start/stop callbacks for the visualizer
- Add `setMenuMusicVolume` utility and adjust menu music volume during opponent selection
- Prevent speech/visualizer triggers during initial scene load and game start sequences
2026-05-23 10:25:29 -06:00
Brian Fertig 036298227f Added Catan and multiple sound effects 2026-05-23 08:55:15 -06:00
Brian Fertig f667f1ead3 feat: add speech audio files and configuration for Jeff and Fireball
- Add 22 new MP3 speech files for characters Jeff and Fireball
- Update public/data/opponents.json to include speech arrays for both characters
- Each character now has intro, happy, and upset speech categories with 2-5 variations
2026-05-22 22:53:12 -06:00
Brian Fertig 6856baa395 feat(phase10): add character voiceovers and enforce staging rules
- Add speech assets and configuration for Brad and Mario
- Update opponents.json with new speech arrays for intro, happy, and upset states
- Prevent discarding cards while cards are staged in Phase 10
- Add visual feedback (_shakeStagingButtons) when staging rules are violated
- Add _hasStagedCards helper to check staging group state
- Move staged cards back to hand if user attempts to discard during staging
2026-05-22 20:05:05 -06:00
Brian Fertig 3fcfbcc921 feat: add speech visualizer and emotion-driven audio cues
- Introduce a canvas-based audio visualizer overlay on opponent portraits that activates during speech playback
- Update `SpeechQueue` to support `onStart` and `onEnd` callbacks for hooking into audio events
- Modify `Portrait` to trigger the visualizer with emotion-specific colors (blue for intro, green for happy, red for upset)
- Add `speech` metadata to `opponents.json` for Ethel and Bernie, defining available intro/happy/upset audio clips
- Ensure proper cleanup of visualizer state and resources on portrait destruction
2026-05-22 19:10:36 -06:00
Brian Fertig f6a4a3fb5d feat: add speech queue system and update audio configuration
- Implement `SpeechQueue` to manage opponent dialogue clips
- Add `speech` configuration to opponent data (Cy-Bro, Victor, Croc) with intro, happy, and upset states
- Trigger random speech clips in `Portrait.js` based on emotion and a 60% probability
- Play intro speech clips when opponent portraits are created
- Update `MusicPlayer` volume to 0.15 and clean up formatting/whitespace
2026-05-22 16:35:46 -06:00
Brian Fertig 4b0551c3cd feat(hearts): enhance card sorting, drag interaction, and pass animations
- Sort player's hand by suit and value for consistent layout
- Implement drag-to-sort functionality for the local hand with visual feedback (slot indicators, card displacement, play zone highlighting)
- Refactor pass confirmation to include multi-phase animation: outgoing cards fly to target, incoming cards animate in from source, flip to reveal, and settle into sorted positions
- Add background to hearts broken indicator for better visibility
- Update card interaction handlers to support both click and drag events
2026-05-21 23:29:52 -06:00
Brian Fertig 3cea4f10b6 feat: add Hearts card game with AI opponents
- Implement Hearts game logic (HeartsLogic.js) with classic rules: passing, trick-taking, scoring, and moon-shooting mechanics
- Add AI opponent logic (HeartsAI.js) with heuristic-based card selection for passing and playing
- Create HeartsGame.js Phaser scene with full UI: card rendering, animations, trick collection, score tracking, and game flow
- Register Hearts in game registry as a 4-player card game
- Integrate Hearts into game routing and menu dispatch
2026-05-21 21:28:31 -06:00
Brian Fertig 4644b8e3af refactor: implement dynamic track layout for overflowing trains
- Replace fixed `TRACK_PITCH` tiling with `computeTrackLayout()` to dynamically fit tiles within track bounds
- Add `tileHalfW()` helper to correctly calculate width for double vs. single tiles
- Add truncation marks ("+N«") when the tile count exceeds visible track space
- Update marker placement, flash effects, and next-tile positioning to use the new dynamic layout coordinates
- Adjust score badge positioning to align relative to portrait radius
2026-05-21 20:52:00 -06:00
Brian Fertig ed7da9fcf0 feat: add railway tracks and score badges to Mexican Train game
- Implement `paintRails()` to render decorative railroad ties and rails along player tracks
- Add `updateScoreBadges()` to display animated score circles for each player with color-coded borders based on score thresholds
- Fix double tile highlighting logic to correctly identify and style open doubles
- Update tile rendering to respect double tile orientation (vertical vs horizontal)
- Adjust track background colors for better visual contrast
2026-05-21 20:38:55 -06:00
Brian Fertig 7602da4cbe feat: improve Mexican Train UI with boneyard interaction and readability
- Add interactive boneyard pile with click-to-draw functionality and animations
- Display opponent hand counts as mini-domino dots next to portraits
- Apply background padding to all UI text elements for improved readability
- Refactor draw animations to support both human and AI tile drawing from the boneyard
2026-05-21 20:09:15 -06:00
Brian Fertig f1fc560cd1 feat: add Mexican Train game with AI and enhanced roulette effects
- Implement Mexican Train game logic, AI opponent, and Phaser UI scene
- Register Mexican Train in server game registry and client dispatch tables
- Add roulette spin sound effect and improved win/lose animations with fireworks
- Update preload scene and sound registry to support new audio assets
2026-05-21 19:43:54 -06:00
Brian Fertig f8d406ab4e feat: enhance Craps roll results with sequential badges and fireworks
Adds animated "Win!" or "Lose" badges that appear sequentially for each player after a roll, accompanied by sound effects. Introduces a colorful fireworks particle animation for wins. Adjusts dice landing positions for better visibility and removes redundant emotion/sound calls in favor of the new sequential result display.
2026-05-21 00:12:02 -06:00