Inspiration
For generations, 29 has been the heartbeat of homes, college dorms, tea stalls, and community halls across South Asia and its global diaspora. It is a game of sharp intellect, tactical bidding, subtle team synergy, and adrenaline-pumping trump reveals.
Yet, when looking at existing mobile adaptations, the experience felt stuck in the past. Existing apps were clunky, plagued by unintuitive visual layouts, and designed strictly for seasoned veterans who already knew every physical card rule by heart. They offered zero welcoming hand to newcomers or players around the world eager to discover or sharpen their skills in this addictive, strategic masterpiece.
Legends of 29 was born from a simple passion: To elevate this beloved trick-taking card game into a modern, beautifully crafted digital experience. We set out to create a game where anyone—whether playing solo offline against smart bots on a quiet flight, challenging close friends in private lobbies, or climbing the global ranked leaderboard—could effortlessly learn the rules, feel the thrill of every bid, and experience the game in its purest, most cinematic form. :joy:
What it does
Legends of 29 transforms a complex 28-card trick-taking game into an engaging, fluid, and social experience: • Intuitive & Modern UI/UX: Tactile card animations, visual trump selection, clear trick-history pips, and dynamic dealing animations bring the physical card table to life on any screen. • Interactive Learning & Coaching: Built-in interactive tutorials, rule breakdowns, and real-time coach overlays help beginners master card values (Jacks = 3, 9s = 2, Aces = 1, 10s = 1), bidding tactics, and special mechanics like Marriage (Pair reveals) and Single Hand. • Global Ranked Arenas & Casual Lobbies: Seamless real-time matchmaking connects players globally across Ranked, Casual, and Private room modes. • Seamless Offline AI Engine: When disconnected from the internet, players can enjoy full offline play powered by sophisticated AI personalities that simulate real human bidding and card strategy. • Rich Social & Competitive Ecosystem: Features League hubs, Tournament Brackets with central bank escrow, live spectator mode, custom avatars, animated flying emotes, and a Legends Road progression system with metal tier protection shields.
How we built it
Building a card game where split-second decisions and secret hand information are paramount required a tightly integrated, robust tech stack: • Frontend (Flutter & Dart): Designed with a rich, responsive interface using Flutter. Custom canvas painters render suit pips and card stacks, while visual playback queues handle smooth dealing, card tosses, flying emotes, and turn timer indicators. • Backend & Realtime Engine (Supabase & PostgreSQL): Powered by Supabase. We implemented a Server-Authoritative Engine using PostgreSQL functions, Row Level Security (RLS) policies for hand secrecy, and Supabase Realtime broadcast channels for sub-second synchronization across mobile clients. • Deterministic Event Sourcing: Every bid, card play, trump reveal, and trick victory is executed through atomic database RPCs (e.g., play_card_atomic) backed by PostgreSQL advisory transaction locks (pg_advisory_xact_lock), ensuring absolute state integrity and zero cheat potential. • Offline AI Service: Developed a standalone Dart offline game engine paired with a curated pool of 100+ unique bot personalities, allowing full parity between online multiplayer and offline solo play.
Challenges we ran into
1. Card Disappearances in Ranked Global Play Early in online multiplayer tests, high-latency connections and race conditions occasionally caused cards to "vanish" from a player's hand or appear twice on the table. Because client states and server databases were syncing asynchronously, a quick tap could attempt to play a card already processed by the server. • The Fix: We rebuilt hand management to strictly scope queries by (player_id, session_id), enforced atomic session validation, and implemented a FastCatchUpReconciler on the client to seamlessly resync local hands with server state upon any packet drop._ 2. Special Rules Backfiring in Unexpected Ways 29 is full of dramatic special rules—such as Single Hand Mode (where one player plays alone against three opponents without trump), Marriage Reveals (shifting points when King & Queen are held), Double/Redouble, and Mathematical Impossibility triggers (early round conclusion when defender victory becomes impossible). • Implementing these initially led to chaotic edge cases—for example, non-declarers improperly leading tricks during a Single Hand, or trump accidentally overriding cards when trump was supposed to be nullified. We resolved this by encoding strict rule guards directly into the atomic backend transaction pipeline, ensuring that rules like Single Hand lead restriction and trump nullification were mathematically guaranteed. 3. The Counter-Clockwise (CCW) Turn Inversion Traditionally, 29 is played strictly Counter-Clockwise (CCW). During complex state transitions—such as moving from initial 4-card deals to bidding, trump placement, midgame second deals, and trick resolution—turn indexing logic would occasionally invert into Clockwise rotation or skip players entirely. • To fix this once and for all, we implemented an irrefutable, server-authoritative CCW turn engine (authoritative_ccw_engine) in PostgreSQL, standardizing player position offsets across all game phases so the flow of play remains smooth and predictable.
Accomplishments that we're proud of
• Democratizing a Heritage Game: We took a complex card game traditionally passed down by oral tradition and made it accessible, elegant, and fun for players of all background levels around the globe. • Rock-Solid Multiplayer Synchronization: Achieved zero-desync, server-authoritative gameplay with atomic advisory locks that protect game fairness even under unstable cellular networks. • Complete Offline Parity: Created an offline AI experience that feels so human and responsive that players can practice and enjoy 29 anywhere without needing a data connection. • Thriving Competitive Infrastructure: Designed an end-to-end tournament engine complete with escrow management, bracket trees, spectator feeds, and community tournaments.
What we learned
- State Ownership is Non-Negotiable: For multiplayer card games with hidden information, the server must be the single source of truth. Distributed client-side logic inevitably leads to desyncs and edge-case bugs.
- Respect the Nuances of Heritage Games: Card games played physically for decades carry subtle edge-case rules that players hold dear. Respecting those rules while translating them into deterministic code is what turns a good app into a legendary one.
- Design for Both the Novice and the Master: Clear visual cues, coach overlays, and gentle onboarding allow beginners to fall in love with the strategy without overwhelming competitive veterans.
What's next for LEGENDS of 29
We are just getting started! Here is a glimpse of what's on our horizon: • Expanded Visual Customization: Introducing customizable card face styles (classic, minimalist, modern, and regional artistic themes), custom table felt textures, and 3D card back designs. • Enhanced Engagement & Community Features: Rolling out regional League Wars, live spectator commentary feeds, advanced interactive AI Bootcamp scenarios, and seasonal battle pass roadmaps filled with exclusive collectible rewards.
Legends of 29 isn't just an app—it's a tribute to a timeless game, built to connect card lovers around the world.
Built With
- android
- android-studio
- flutter
- ios
- revenuecat
- supabase
Log in or sign up for Devpost to join the conversation.