1. 20 Jun, 2026 7 commits
    • Mahmoud Aglan's avatar
      fix: result screen "play again" preserves game mode and settings · b5ca9475
      Mahmoud Aglan authored
      - endGame and handleExit pass mode/numPlayers/seats/humanCount/difficulty
        to the result scene
      - Result "play again" restarts with same settings (not always 4p bot)
      - Live mode "play again" goes to queue (finds new match, not old one)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      b5ca9475
    • Mahmoud Aglan's avatar
      fix: local-multi mode celebrations, capture feedback, and dice shake · ee4d70dc
      Mahmoud Aglan authored
      - afterMove: use boardSlot for firework/flash colors (not player index)
      - afterMove: in local-multi, ANY human capturing triggers celebration
        (not just player 0)
      - botLoop: capture detection checks all human players in local-multi
        (not just myPlayerIndex=0)
      - animateDice: shake dice-area for all human players in local-multi
        (previously only shook for player 0, panel for others)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ee4d70dc
    • Mahmoud Aglan's avatar
      fix: Ludo local-multi rolls correct player + display opponent profile in live · 41f869f8
      Mahmoud Aglan authored
      Critical bug: handleRoll used myPlayerIndex (always 0) instead of
      game.currentPlayer, so in local-multi the dice always moved Red's
      pieces regardless of whose turn it was.
      
      Fixes:
      - handleRoll uses game.currentPlayer for dice animation, getValidMoves,
        and getBotMove (no longer hardcoded to player 0)
      - updatePanels checks game.currentPlayer.finished (not myPlayerIndex)
      - Turn status badge shows player name + color in local-multi mode
      - Live multiplayer: fetch and display opponent avatar (not just name)
      - Update PLAYER_NAMES array when opponent profile loads
      - All juice.burst/fireworkBurst use boardSlot for correct colors
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      41f869f8
    • Mahmoud Aglan's avatar
      fix: multiplayer Ludo respects player count (2p = diagonal, same as single player) · f9dcacf7
      Mahmoud Aglan authored
      - mountGame reads playerCount from params (queue passes it from room)
      - Server accepts player_count in queue request, creates matching positions
      - Queue response includes player_count for both players
      - onMatchFound propagates playerCount to game scene
      - 2-player live matches now create only 2 positions (not 4 with bots)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      f9dcacf7
    • Mahmoud Aglan's avatar
      fix: place 2-player Ludo on diagonal corners (Red vs Yellow) · 95029f8f
      Mahmoud Aglan authored
      - Default seats for 2 players: [0, 2] (BL vs TR) instead of [0, 1] (adjacent)
      - Panel layout: opponent at top-right for 2-player (diagonally opposite)
      - Corner glow uses boardSlot instead of player index
      - Dim inactive home zones, home columns, center triangles, start squares
      - Matches the getSeatPositions() in room.js which already returned [0, 2]
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      95029f8f
    • Mahmoud Aglan's avatar
      feat: overhaul Ludo multiplayer UI/UX for turn transitions · 92bb521f
      Mahmoud Aglan authored
      - Replace opacity 0.3 dim with proper contextual states
      - Add turn-status badge showing "دورك!" / "دور [player]" / "Bot يفكر..."
      - Roll button shows contextual text: "ارمِ النرد" / "اختر قطعة" / "انتظر دورك" / "Bot يلعب..."
      - Dice box stays visible during opponent turns (greyed, not hidden)
      - Emote button always accessible (social action, not gated by turn)
      - Smooth CSS transitions on dice-area background, button color, dice opacity
      - Flash notification (inset glow + haptic) when turn comes to you
      - Timer bar fades more during opponent turn for clearer contrast
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      92bb521f
    • Mahmoud Aglan's avatar
      fix: overhaul Ludo multiplayer sync — remove dual-poller, add state diffing + proper resets · 3d56ef64
      Mahmoud Aglan authored
      Eliminates the conflict between matchLive.start() and the game's own
      startLudoPolling() which caused race conditions. Consolidates to a single
      poller with: proper turn_count diffing, remote dice display via
      showRemoteDice(), explicit game.rolled reset on turn transitions, stale
      dice display fix, diceAnimating stuck-flag safety valve, double-poll
      prevention in handleNonPlayerTurn, heartbeat timer cleanup, and an
      unmountGame export for proper teardown.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      3d56ef64
  2. 19 Jun, 2026 17 commits
    • Mahmoud Aglan's avatar
      24810eaf
    • Mahmoud Aglan's avatar
      fix: getPipCount used non-existent VARIANTS.standard key · 1050fd15
      Mahmoud Aglan authored
      The VARIANTS object has keys 'sheshbesh', 'mahbousa', 'thirtyone' but
      getPipCount referenced 'standard' which is undefined, causing
      'Cannot read properties of undefined (reading normPos)' and preventing
      the entire board from rendering.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      1050fd15
    • Mahmoud Aglan's avatar
      fix: redesign backgammon game UI with real player data + polished visuals · c5374e12
      Mahmoud Aglan authored
      - Player cards now use store player data (avatar_url, display_name, level)
      - Opponent shows bot icon or opponent data for multiplayer
      - Active turn highlight on player cards with green glow border
      - Cube value display in match info area
      - Professional dark gradient background with proper hierarchy
      - Controls bar with proper spacing and button styling
      - Doubling offer dialog with backdrop blur and better layout
      - Turn badge repositioned to top-center with pill shape
      - Emote panel centered with backdrop blur
      - All interactive elements have proper touch targets (40px+)
      - Safe area inset for bottom bar
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      c5374e12
    • Mahmoud Aglan's avatar
      fix: backgammon gameplay — working buttons, correct canvas rendering, no DPR bugs · 873b7000
      Mahmoud Aglan authored
      - Remove DPR ctx.scale() that compounded every frame and broke all rendering
      - Use logical pixel dimensions directly (canvas.width = logical size)
      - Fix isSel/isValid closures that caused undefined reference errors in checker glow
      - Simplify game scene: roll button is now a normal element in .bgg-controls (not overlay)
      - Event handlers correctly scale click coords via rect ratio
      - Remove unused getCheckerScreenPos import from move-animator
      - All buttons (roll, double, emote, quit) bind via addEventListener properly
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      873b7000
    • Mahmoud Aglan's avatar
      feat: full backgammon overhaul — 60fps game loop, premium canvas, particles, admin branding · 4cf9baa5
      Mahmoud Aglan authored
      - 60fps requestAnimationFrame game loop with dt-based particle physics
      - 3D checkers with radial gradients, specular highlights, drop shadows
      - Wood-grain board texture with gradient triangles and bevel frame
      - Physics-based dice with bounce damping, spin, and staggered animation
      - Arc-based move animations with easeOutBack overshoot
      - Particle burst on hit (red/orange sparks) and bear-off (green stars)
      - Confetti celebration on match win with canvas animation
      - Full multiplayer sync via match-session + server polling
      - Bot AI with animated moves (arc + SFX per piece)
      - Admin branding: 14 board colors + 7 game settings (durations, particles)
      - CSS tokens for all backgammon board colors (--bg-*)
      - Theme.js maps branding values to CSS vars + window.__EL3AB_THEME
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      4cf9baa5
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      feat: rename backgammon variants to Arabic — شيش بيش، محبوسة، ٣١ · cb1bc9b7
      Mahmoud Aglan authored
      - sheshbesh (شيش بيش): standard backgammon with hitting
      - mahbousa (محبوسة): tapa-style, land on opponent to trap (no hitting)
      - thirtyone (٣١): gul-bara race variant, all pieces start stacked
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      cb1bc9b7
    • Mahmoud Aglan's avatar
      feat: implement full backgammon game — rules engine, bot AI, canvas renderer, multiplayer · 6d2431c7
      Mahmoud Aglan authored
      - Port backgammonjs-master rules to ES modules (standard, gul bara, tapa variants)
      - 3-tier bot AI (easy/medium/hard) with positional evaluation
      - Doubling cube with Crawford rule for match play
      - Canvas board renderer with piece stacking, hit/bear-off animations
      - Room scene with variant/length/difficulty selection
      - Full multiplayer via backgammon-match.php (queue, move, heartbeat, leave)
      - Realtime subscription for backgammon_matches table
      - Emote panel + phrase system (reuses Ludo pattern)
      - 7 new SFX slots in branding admin (dice, move, hit, bear, double, win)
      - Match system (first-to-N, gammon/backgammon scoring multipliers)
      - Wired into engine.js, play table, queue routing, match-session recovery
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      6d2431c7
    • Mahmoud Aglan's avatar
      feat: Ludo full overhaul — multiplayer modes, social, SFX · e4824004
      Mahmoud Aglan authored
      Phase 1 — Room/Mode Picker:
      - New ludo-room scene with menu, setup, and searching views
      - Player count picker (2/3/4 players)
      - Bot/human distribution selector (1 human + N bots, 2 humans + N bots, etc)
      - Bot difficulty picker (easy/medium/hard)
      - Seat preview showing diagonal (2P) or skip-corner (3P) positioning
      - Play table routes Ludo single/multi to the new room
      
      Phase 2 — Social Features:
      - Emote button (😄) in dice area opens full panel
      - 8 emoji reactions + 6 preset Arabic phrases
      - Emotes animate FROM the sender's player panel (speech bubble or floating emoji)
      - Bot emotes on captures use the new bubble system
      - Live mode emote transmission via mp.sendEmote
      - 3-second cooldown between sends
      
      Phase 3 — SFX Completion:
      - sfx_dice_shake: during dice animation roll
      - sfx_boost: rolling a 6 (extra turn excitement)
      - sfx_piece_home: piece reaches center
      - sfx_turn_start: your turn notification in live mode
      - sfx_emote: sending/receiving social actions
      - All new slots added to branding.php admin
      - Synthesized fallbacks in audio.js for each new sound
      
      Phase 4 — Multiplayer & Seat Mapping:
      - rules.createGame accepts seats array for board-slot mapping
      - 2-player = diagonal (Red vs Yellow), 3-player = skip Yellow
      - boardSlot property on each player drives position/color/captures
      - getPiecePosition/getHomeBasePosition use boardSlot not player index
      - Game-over condition: numPlayers-1 finishers (not hardcoded 3)
      - local-multi mode: multiple humans share one device, bots fill rest
      - Turn rotation correctly skips only finished players
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e4824004
    • Mahmoud Aglan's avatar
      fix: domino tile placement — pip orientation + corner gaps + sizing · 512110c0
      Mahmoud Aglan authored
      - Add flipPips flag: when chain goes LEFT or UP, tile.left/right are
        drawn on the correct screen side (previously always left=left/top)
      - Fix corner turn offset: uses actual tile cross-axis extent instead
        of fixed TILE_H, preventing overlaps/gaps at corners
      - Increase TILE_W from 24→26 for better proportions (less squished)
      - Increase GAP slightly (1→2) so tiles don't visually merge
      - Lower auto-zoom min to 0.3 for large chains
      - Fix invalid hand tiles: use saturate(0.3)+brightness(0.85) instead
        of opacity+brightness that made them look solid dark gray
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      512110c0
    • Mahmoud Aglan's avatar
      feat: domino gameplay UI overhaul + fix animation origin · 38adbafe
      Mahmoud Aglan authored
      - Add fromPlayer param to animatePlacement (top for opponent, bottom for me)
      - Rewrite buildLayout with semantic .dg-* class structure
      - Full CSS for opponent bar, score ribbon, controls, board area
      - Opponent back-tiles visual with removal animations
      - Bot thinking indicator in opponent meta area
      - Remove dead legacy DOM elements
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      38adbafe
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      feat: redesign domino UX — premium hand tiles, smart auto-fit, cohesive screens · 31a8e2dc
      Mahmoud Aglan authored
      Hand tiles (components/hand.js):
      - Proper PIP_POSITIONS matching board tiles (position-based, not flex-wrap)
      - Dynamic sizing: tiles scale to always fit viewport width
      - Fan layout for 5+ tiles (card-like spread with arc lift)
      - Slide-in animation for newly drawn tiles
      - Premium domino look: gradient bg, 3D pips, edge shine, realistic border
      
      Board (canvas/board.js):
      - Smooth animated auto-pan + auto-zoom when chain exceeds viewport
      - Lerp-based transitions (no jarring jumps on new tiles)
      - Vignette overlay for depth
      - Manual pan updates target state for smooth resume
      
      Tile renderer (canvas/tile-renderer.js):
      - Gradient fill (cream to warm), thicker border, top-edge shine
      - 3D pips with specular highlights
      - Better shadow depth and double-tile accent
      
      Drag proxy (components/drag.js):
      - Matches hand tile visual style (position-based pips)
      - Valid/invalid state with colored borders + glow
      - Spring animation on snap/bounce-back
      
      Room screens (scenes/room.js):
      - Unified design language across menu/bot-picker/target-picker/lobby
      - Floating icon animation, consistent card styles
      - Touch-responsive buttons with spring scale
      
      Game layout (scenes/game.js):
      - Polished opponent bar with avatar border glow
      - Score bar with colored indicators
      - Control buttons with active states and pulse animation
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      31a8e2dc
    • Mahmoud Aglan's avatar
      feat: add Ludo pawn sprites, sound effects & 25 emoji slots to branding · 9964877a
      Mahmoud Aglan authored
      - Add 4 Ludo pawn sprite upload slots (red/green/yellow/blue) to admin branding
      - Add 15 sound effect upload slots (mp3/ogg/wav) with audio preview
      - Add 25 missing emoji slots (crown, mute, block, hourglass, etc.)
      - Ludo game.js: draw custom pawn sprites with same bounce/highlight animation
      - Ludo game.js: pawn colors now respect branding ludo_red/green/yellow/blue
      - audio.js: plays custom audio files if uploaded, falls back to synthesized sounds
      - branding.php: support audio MIME types for Supabase storage upload
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      9964877a
    • Mahmoud Aglan's avatar
      feat: replace all system popups with 60fps in-game modals · d84fed77
      Mahmoud Aglan authored
      - Create core/modal.js — GPU-composited confirm/alert system with
        spring animations (scale + opacity on transform layer only)
      - Replace all 7 native confirm() calls across chess resign, ludo exit,
        domino resign, block user, remove friend, remove group member, leave group
      - Each modal has contextual icon, Arabic text, danger styling for destructive actions
      - Add will-change + backface-visibility GPU hints to all interactive elements
      - Add ease-in, ease-in-out timing tokens for complete animation coverage
      - All animations use transform + opacity only (never layout-triggering properties)
        ensuring consistent 60fps on mobile Safari and Chrome
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      d84fed77
    • Mahmoud Aglan's avatar
      feat: cascade 5 global multiplayer systems to all game endpoints · 00bcf1a0
      Mahmoud Aglan authored
      - domino-match.php: add can_player_queue anti-abuse, last_activity tracking,
        server-side turn timeout (30s), universal complete_match rewards,
        heartbeat + leave handlers
      - game.php (chess): add heartbeat + leave handlers, last_activity on moves,
        replace homebrew auto-close with server turn timeout (120s),
        replace inline reward logic with universal complete_match RPC
      - matchmaking.php: add can_player_queue cooldown check before queuing
      - ludo.php (old API): add last_activity on moves, complete_match on end
      - match-session.js: change ping from move-based to heartbeat action,
        handle 'abandoned' status in poll response
      - match-ui.js: add showBotReplacement and showTurnTimedOut overlays
      - engine.js: add domino endpoint mapping for match recovery
      - domino/game.js: add heartbeat (10s interval), handle _turn_timed_out,
        update endMatch to send winners array to universal rewards
      - domino/result.js: remove duplicate complete call for live games,
        use new winners-array format for bot games
      - ludo/result.js: add rewards display (coins, XP, rating change)
      - Move shared supabaseRpc helper to includes/supabase.php
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      00bcf1a0
    • Mahmoud Aglan's avatar
      feat: implement 5 global multiplayer systems (DB + PHP + client) · 2ce274f3
      Mahmoud Aglan authored
      ## System 1: Match Lifecycle Manager
      - DB function `cleanup_stale_matches()` auto-abandons zombie matches
        (waiting >5min, in_progress >30min) across all games
      - Cleaned 109 existing zombies (12 ludo, 36 domino, 61 chess)
      - New `match-cleanup.php` endpoint to trigger periodically
      
      ## System 2: Universal Match Completion + Rewards
      - DB function `complete_match(game_key, match_id, winners, reason)`
        awards coins/XP, updates stats, tracks ratings for ANY game
      - Ludo now calls `action: 'complete'` on game end with ordered winners
      - Uses `reward_config` table (ludo_win_coins=40, 2nd=20, 3rd=10, 4th=5)
      - Tracks `abandon_count` on profiles for anti-abuse
      
      ## System 3: Server-Side Turn Timeout
      - Added `last_activity` column + index on ludo/domino matches
      - DB function `enforce_turn_timeout()` checked on every GET poll
      - After 20s of inactivity: marks turn as timed out
      - After 3 consecutive timeouts: flags for permanent bot replacement
      - Client handles `_turn_timed_out` response from server
      
      ## System 4: Connection State Protocol
      - DB function `match_heartbeat(game_key, match_id, player_id)`
      - Tracks per-player last_ping in game_state.connections
      - Returns other players' status: online/weak/disconnected/abandoned
      - Client sends heartbeat every 10s during live matches
      - Works across chess, ludo, domino
      
      ## System 5: Anti-Abuse + RLS Hardening
      - RLS: ludo/domino UPDATE now requires player to be participant
      - Unique index prevents duplicate queue entries per user
      - DB function `can_player_queue()` enforces 5-min cooldown after
        3+ abandons in 24h (resets daily)
      - `handleLudoLeave` now tracks bot replacement as reversible (30s grace)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      2ce274f3
  3. 17 Jun, 2026 14 commits
    • Mahmoud Aglan's avatar
      fix: escalating six-boost prevents stuck-at-home frustration · 2210bb63
      Mahmoud Aglan authored
      Track rollsWithoutSix per player. Each consecutive failed roll when
      all pieces are home ramps the six probability harder — by roll 3-4
      a human player has ~40-45% chance of six (vs 17% base). No more
      watching bots play while stuck for 6+ turns.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      2210bb63
    • Mahmoud Aglan's avatar
      feat: rework Ludo dice for fun tension — human luck + rubber-banding · 929a1434
      Mahmoud Aglan authored
      The dice system now creates satisfying back-and-forth gameplay:
      
      - Human players get a subtle persistent luck edge over bots (slight
        boost to 5s and 6s) — feels lucky without being obvious
      - Rubber-band: whoever is behind gets help catching up; humans get
        an extra comeback boost when far behind the leader
      - Momentum damper: bots that pull too far ahead get cooled down
      - Stuck rescue: all-at-home gets aggressive six boost (stronger for
        humans)
      - Finishing push after 8 min ensures games wrap under 15 min
      - Removed all capture-biased dice logic — captures now happen purely
        by board position, not rigged dice
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      929a1434
    • Mahmoud Aglan's avatar
      fix: reduce capture frequency and add time-decay for fairer Ludo · ee53cfbf
      Mahmoud Aglan authored
      - Halved near-capture dice boost (0.3 → 0.15) and reduced per-die
        capture bonus (0.15 → 0.08)
      - Capture bias decays to zero as game approaches 15 min (captureMul
        factor), making late-game rolls essentially fair/random
      - Removed the multi-capture boost that added +0.2 to all dice 1-5
      - Increased six-boost after 8 min (scales up to +0.8 by 15 min) to
        accelerate finishing and keep games under ~15 minutes
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ee53cfbf
    • Mahmoud Aglan's avatar
      feat: bigger stacked pawns + 15s turn timer with auto-play · a2876e3e
      Mahmoud Aglan authored
      - Increased stacked pawn scale (2 pawns: 0.82, 3+: 0.7) so they stay
        visible when sharing a cell
      - Added 15-second turn timer bar above the dice area
      - Timer counts down visually (green→yellow→red gradient)
      - If player doesn't roll in time, auto-rolls for them
      - If player doesn't pick a piece in time, bot logic picks the best move
      - Timer works in both single-player and multiplayer modes
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      a2876e3e
    • Mahmoud Aglan's avatar
      revert: restore original flat board and simple pawn visuals · 8c14559d
      Mahmoud Aglan authored
      Remove all 10 fancy visual enhancements (3D gradients, embossed borders,
      glowing safe squares, specular pawns) — back to the clean flat style.
      Keep 60fps render loop, smooth tweens, stacking, and mini dice.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8c14559d
    • Mahmoud Aglan's avatar
      feat: ludo — 60fps render loop with offscreen board cache + smooth tween animations · 4f6e3507
      Mahmoud Aglan authored
      - Offscreen canvas caches static board (drawn once, reused every frame)
      - Continuous requestAnimationFrame loop renders pieces at 60fps
      - Piece movement uses smooth parabolic arc tweens (no setTimeout stepping)
      - Enter-from-home uses easeOutBounce for natural pop-in feel
      - All drawBoard() calls now just mark board dirty — next frame picks it up
      - Move preview ghosts pulse smoothly using sin wave
      - Ambient corner glow rendered per-frame (lightweight, no cache needed)
      - Render loop auto-stops on game exit/end for zero resource leak
      - Bot step animation also uses smooth tween system
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      4f6e3507
    • Mahmoud Aglan's avatar
      feat: ludo — 10 major visual enhancements for premium board game feel · 2e3f0ecf
      Mahmoud Aglan authored
      1. Rich board background with radial gradient texture (warm parchment)
      2. Center triangles with radial gradient glow + white diamond center
      3. 3D pawns with gradient bodies, specular highlights, drop shadows
      4. Safe squares with radial glow + shadowed gold stars
      5. Home columns with gradient cells + directional arrows
      6. Home zones with linear gradient fill + corner dot decorations
      7. Animated turn indicator arrow on active player panel + glow name
      8. Ambient corner glow showing current player's color on board
      9. Decorated dice area with gold accent, gradient background, radial glow
      10. Embossed board frame with wood-tone border + inner gold accent
      
      Also: roll button pulses when available, panels have shadow glow on active
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      2e3f0ecf
    • Mahmoud Aglan's avatar
      feat: ludo — super juicy animations, mini dice on each player panel · 58001eb9
      Mahmoud Aglan authored
      - Add mini dice to all player panels showing roll result with pop-in animation
      - Bot/opponent dice rolls visible next to their name with same shake + land effect
      - Panel glows on six, active player has pulse + avatar bounce animation
      - Pawn movement uses full arc-bounce (up→peak→down→squash) per hop
      - Enter animation: pop-out from home with bounce + landing dust burst
      - Long moves (3+ steps) produce particle burst on landing
      - Mini dice fades out after 1.2s when turn passes to next player
      - Rolling state shows rotation shake animation on mini dice
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      58001eb9
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      fix: ludo — reduce capture probability, add pawn stacking grid on shared cells · 1aa5577b
      Mahmoud Aglan authored
      - Dramatically reduce lucky roll weights (nearCapture +1.0→+0.3, capturePerDie +0.6→+0.15)
      - Reduce six-boosting when pieces are home (1.5→0.8, 0.6→0.4) to lower triple-six frequency
      - Pawns sharing a cell now render in a grid layout: 2 pawns side-by-side, 3 in triangle, 4 in 2x2
      - Stacked pawns shrink proportionally (72% for 2, 60% for 3-4) so players can count them
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      1aa5577b
    • Mahmoud Aglan's avatar
      fix: domino — wrong tile placement bug, forced boneyard draw, fly animation, visual pile, win VFX · 189ce786
      Mahmoud Aglan authored
      - Validate tile exists in player's hand before executing placement
      - Draw continuously from boneyard until playable tile found (with 400ms delay per draw)
      - Tile flies from hand area to board position instead of instant scale-in
      - Visual boneyard pile on left side with live counter
      - Multi-wave confetti + starBurst + screen flash on match win
      - Proper tile aspect ratio (34x68, 1:2) with 8px hand spacing
      - Flush tile contact on board (GAP=1)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      189ce786
    • Mahmoud Aglan's avatar
      fix(ludo): prevent pawns on safe squares from being sent home · 31cf6666
      Mahmoud Aglan authored
      Two bugs caused pawns to teleport back to the yard without capture:
      
      1. Triple-six penalty blindly sent the last-moved piece to pos=-1
         regardless of whether it was resting on a safe square. Now the
         penalty only applies if the piece is NOT on a safe square.
      
      2. captureAt() checked if the DESTINATION was safe but didn't guard
         against the victim's own position being safe. Added a per-piece
         safety check so a pawn sitting on any safe square (star squares,
         colored start squares) can never be captured under any circumstance.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      31cf6666
    • Mahmoud Aglan's avatar
      feat(ludo): dice visibility, capture SFX/VFX, ranking system, finish fix · 6d1a8ac5
      Mahmoud Aglan authored
      - Hide dice + roll button when not player's turn; show only on active turn
      - Distinct capture feedback: cheerful SFX+confetti for the capturer,
        sad SFX+red flash+shake for the victim whose pawn got sent home
      - Game continues until 3 players finish — 1st/2nd/3rd get podium screen,
        4th gets loser screen. Finished players are dimmed and auto-skipped
      - Fix finish position: pawns now land on the outer middle of the center
        3x3 grid (squares 2/4/6/8 per color), not the dead center square 5
      - Result screen shows Arabic ranking labels and medals per placement
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      6d1a8ac5
    • Mahmoud Aglan's avatar
      feat(ludo): capture-boost dice, skip-corner path, and firework finish · c55124cc
      Mahmoud Aglan authored
      - Add "lucky roll" mechanic: when an opponent pawn is exposed directly
        ahead (1-6 squares), boost probability of rolling the exact capture
        value by ~+1.0 weight, plus +0.6 for any die value that enables capture
      - Change pawn path: pieces enter home column from position 50 (the square
        before the corner), treating the corner as dead space for their own
        color — matches standard Ludo turn geometry
      - Add multi-wave firework particle burst (player-colored) when a pawn
        lands exactly on the Home finish position
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      c55124cc
  4. 16 Jun, 2026 2 commits