Turn structure
Each turn, a player may Take (swap a hand card with the top discard), Draw (pull from the deck, then keep or discard), or Play a selected card to the table.
One free Take or Draw per turn; paid actions let players repeat those moves for coins.
A 30-second turn timer keeps matches moving; the timer stops when the player commits a play.
Card system
108 cards: numbered 1–100 across four color bands, plus 8 special cards (101–108) with unique art.
Cards are dealt face-down; players can spend coins to Reveal a selected card in their hand.
Scoring & rounds
After each full rotation (7 turns), the player who dropped the highest card wins the round.
Round points scale 1 → 7 and repeat each cycle (rounds 8–14 use 1–7 again).
First player to 21+ points wins the match.
If no one hits 21 after a 7-round set, the deck is reshuffled and redealt for the next set.
Modes
Offline: 1 human vs 6 AI opponents with the same rules.
Multiplayer: real players via Photon; empty seats can be filled with AI after a lobby timer.
Offline vs AI
Full single-player experience with intelligent AI turns (take, draw, play).
Friends Mode
Private rooms with shareable room codes and configurable coin bets.
Random Matchmaking
Quick match queue with bet tiers (10 / 50 / 100 / 500 / 1000 coins).
Betting & rewards
Entry fees in coins; winners earn scaled coin and pepper payouts.
Dual economy
Coins (in-game currency) and Peppers (progression + leaderboard rank).
Pepper ranks
11 tiers from “Bell Pepper” to “Pepper X” based on total peppers earned.
Global leaderboard
Top players ranked by peppers, synced via Firebase Realtime Database.
Unique usernames
Firebase transactions reserve usernames and prevent duplicates.
In-app store
Coin and pepper packs, plus a monthly subscription.
Subscription perks
No ads, discounted store prices, and monthly bonus rewards.
Ad integration
Banner, interstitial, and rewarded ads (e.g. free coins).
Polished UX
Card shuffle/deal/flip animations, round results, SFX/music toggles, and responsive UI scaling.
Engine & architecture
Unity 6 (URP 2D), C#, singleton managers, scene flow: Splash → Main Menu → Lobby / Offline / Multiplayer.
Networking (Photon PUN)
Master-client authority for card distribution, turn order, and scoring.
PunRPC sync for card moves, selections, drops, scores, and game results.
Fixed player seat mapping so positions stay stable when players disconnect.
Lobby timer with AI backfill when rooms don’t fill to 7 players.
Backend (Firebase)
Anonymous authentication on launch.
Realtime Database for player profiles (username, bestScore, coins, peppers, noAds, subscription state).
Transactional username reservation to enforce unique display names across devices.
Cloud sync for subscription/no-ads state across sessions and devices.
Monetization
Unity IAP (Codeless IAP) for consumables and a monthly subscription with receipt validation and Apple restore support.
Google Mobile Ads with frequency controls (panel-close interstitials, round-based offline interstitials, rewarded coins).
Game systems
Separate but parallel code paths: OfflineGameManager / OfflineCardDistributionManager and MultiplayerGameManager / CardDistributionManager.
CardGenerator procedurally builds all 108 cards with tiered sprites and CardDataHolder metadata.
Coroutine-driven card animations (move, flip, shuffle) without relying on tween libraries for core gameplay.
PlayerPrefManager centralizes local persistence; Firebase syncs peppers and profile data to the leaderboard.
UI & audio
TextMeshPro UI, bet selection panels, confirmation dialogs, and loading states.
AudioManager with persistent music/SFX and per-action sound cues (shuffle, timer, round result).
Game development
Designed and implemented a complete turn-based card game loop with scoring, round cycles, and win conditions.
Built AI opponent logic mirroring human actions (take, draw, play) with natural pacing.
Created card distribution, hand management, and discard pile systems for 7 players.
Multiplayer engineering
Integrated Photon PUN for room creation, matchmaking, RPC synchronization, and master-client game state.
Handled edge cases: player disconnects, duplicate AI turns, timer expiry, and cross-client state consistency.
Backend & cloud services
Integrated Firebase Auth and Realtime Database for profiles, leaderboards, and cross-device sync.
Implemented atomic username reservation with database transactions.
Mobile product development
Shipped a free-to-play economy: coins, peppers, betting, IAP, and ads working together.
Built subscription logic with receipt checks, restore purchases, monthly rewards, and cloud-backed no-ads flags.
Structured offline and online modes sharing the same rules but separate, maintainable managers.
Software engineering
Applied singleton patterns, async/await with Firebase, and coroutine-based gameplay sequencing.
Wrote defensive code for null references, duplicate execution guards, and graceful Firebase initialization.
Full-stack mobile card game — not just gameplay, but lobby, economy, backend, monetization, and live services.
7-player multiplayer with friends rooms, random matchmaking, AI backfill, and coin-based betting.
108-card deck with four color tiers and special cards, procedurally generated at runtime.
Escalating scoring (1–7 points per cycle) and a clear 21-point win condition that keeps matches tense.
Strategic depth via Take, Draw, Reveal, and paid repeat actions — simple to learn, room for skill.
Firebase-powered leaderboard with pepper-based ranking and unique username system.
Production monetization: IAP subscription, consumable packs, rewarded/interstitial ads, and subscriber perks synced to the cloud.
Polished feel: animated card dealing and flipping, turn timers, round/game result screens, and a full audio system.
Built on Unity 6 with a scalable architecture separating offline and online game managers.