SOPHEA / Card Games

Royal-Bluff-Poker

Royal Bluff Poker is a lightweight, browser-based single-player Texas Hold'em game built to deliver the atmosphere of a premium casino table without requiring...

8/19/2026Views: 0Launches: 0

Royal Bluff Poker Project Report

1. The Concept

Royal Bluff Poker is a lightweight, browser-based single-player Texas Hold'em game built to deliver the atmosphere of a premium casino table without requiring a framework, account, installation, or backend service. Players can choose an avatar, build a persistent bankroll, play cash games, enter three tournament tiers, earn daily rewards, and track career progress. The project was chosen as a demanding test of state management and interface polish. Unlike a simple card demo, a complete poker game must coordinate betting rules, turn order, AI decisions, hand evaluation, side pots, animations, audio, responsive layouts, tournament progression, and saved data without allowing those systems to fall out of sync.

2. The Stack

The Stack: HTML5, Vanilla CSS, and JavaScript ES modules. The game uses browser-native technologies including the DOM, CSS Grid and Flexbox, dynamic viewport units, localStorage, the Fullscreen and Screen Orientation APIs, HTML5 Audio, and request-based animation timing. Optimized WebP artwork and local OGG, WAV, and MP3 audio keep the project self-contained. The AI Assist: Cursor's AI coding agent supported implementation, debugging, asset preparation, responsive testing, and production QA. Specialized analysis agents were also used to stress-test poker logic, runtime lifecycle behavior, and complete browser flows. AI suggestions were verified with automated simulations and direct browser testing before being retained.

3. The Development Sprint

Foundation: The first phase established the poker engine, hand evaluator, AI opponents, cash-game flow, tournament structure, career progression, and persistent save data. The main challenge was keeping every action legal while preserving chip totals across blinds, calls, raises, all-ins, folds, split pots, and showdowns. Gameplay and Presentation: The next phase focused on the premium casino experience. The table, player seats, cards, action controls, HUD, hand log, avatars, dealer station, modal system, chip movement, card dealing, showdown presentation, and audio were refined into one consistent dark-navy, green-felt, and gold visual language. Responsive and Stability Pass: The gameplay layout was rebuilt for short mobile landscape screens instead of globally scaling the desktop design. Dedicated height- and orientation-based layouts were tested from 537×300 through desktop resolutions. Rendering was changed to preserve mounted cards and seats, preventing full-table flicker during actions and street changes. The Finish Line: Final work concentrated on QA rather than adding features. Automated hand and tournament simulations were combined with direct browser testing of buttons, overlays, audio preferences, save/reload behavior, rapid clicks, orientation changes, asset loading, and tournament rewards. The three competitions were completed with matching felt themes: green for Rookie Cup, burgundy for Royal Classic, and dark navy/black for High Roller Championship.

4. The Roadblocks

Roadblocks: The largest technical challenge was coordinating asynchronous systems. AI timers, card animations, chip movement, result overlays, audio scheduling, orientation changes, and user input could all compete to advance the same hand. Early versions could visually redeal unchanged cards, leave stale timers active, or allow a popup transition to desynchronize the paused state. Mobile landscape support was another major challenge. A desktop poker table cannot simply be reduced to fit a 537×300 screen because seats, cards, the HUD, and touch controls quickly become unreadable or overlap. The solution required a genuine responsive reflow with compact seat variants, height-aware breakpoints, fixed gameplay regions, and dynamic measurements for animation targets. Asset consistency also required careful cleanup. Avatars, dealer art, controls, and icons needed transparent backgrounds, reliable aspect ratios, and small file sizes. Audio required browser-autoplay handling, pooled voices, cooldowns, persistent settings, and cancellation of obsolete sounds when leaving a table or starting a new hand.

5. Key Takeaways

**What worked best?

Incremental rendering and systematic QA. Keeping seats and cards mounted made the game feel continuous, while deterministic engine tests and repeated hand simulations exposed edge cases that visual testing alone would miss. Shared modal and audio managers also reduced inconsistent behavior across screens. What was most difficult?

** Synchronizing game state with presentation across every device. A poker action may update chips immediately in logic while its visual card or chip animation is still running. Solving that cleanly required explicit animation locks, cancellable timers, scoped audio, guarded actions, and responsive target recalculation.

My final thought: The project demonstrates that a polished browser game can be built with HTML5, CSS, and Vanilla JavaScript when state ownership and lifecycle cleanup are treated as core architecture. With additional development time, the best next investment would be broader automated browser coverage for complete tournament runs and long-duration performance testing—not a framework migration or another visual redesign.