MVP+Web · Realtime2–4 PlayersAI · Chat · TimerBuilt on Drop4 base

Wild8 PRD

A multiplayer UNO-style card game, built on top of the Drop4 base.

7
+2
W
+4
Goal
Ship a 2–4 player UNO-style game in 3 weeks reusing Drop4's room + realtime stack.
Users
Friends & families wanting a quick card game in the browser, no install.
Scope
Rooms, full UNO-style ruleset, 3 AI difficulties, 30s timer, global + room chat with bot.
Non-goals
Tournaments, ranked ladders, real-money play, native mobile apps.
§01

Problem & Opportunity

UNO clones online tend to either require accounts and downloads, or bury the game under ads and forced queues. Drop4 already proved that a frictionless room-code experience works — we can extend the same base to a card game without rebuilding the platform.

Opportunity: reuse Drop4's rooms, realtime sync, timer, AI, and chat to ship a polished 2–4 player UNO-style game (Wild8) in a fraction of the time of a from-scratch build.

§02

Core User Stories

Story
Create a game
As a host, I pick 2–4 players (humans + AI) and get a shareable room code/link.
Story
Join a game
As a guest, I open the link or enter the code and instantly take an empty seat.
Story
Play a card
On my turn, I see my hand, can play any matching card, and the table updates for everyone in real time.
Story
Draw a card
If I can't or won't play, I draw from the deck; if it's playable, I get the option to play it immediately.
Story
Wild & action cards
Skip, Reverse, Draw Two, Wild, and Wild Draw Four work the same as classic rules.
Story
Call "UNO!"
When I'm down to one card, I tap UNO. If I forget and another player catches me, I draw 2 as a penalty.
Story
Win the round
First to empty their hand wins the round. The loser sees a friendly recap and can rematch.
Story
Vs AI
I can fill any seat with an Easy / Medium / Hard bot. The bot plays at human-feeling speed.
Story
Turn timer
30s per turn. First timeout = forced auto-draw + skip. Second timeout = forfeit (same model as Drop4).
Story
Chat & reactions
Global lobby chat, in-room reactions, and an AI chat bot that's always family-friendly.
Story
Resilience
If my connection drops briefly, I reconnect into the same seat and resume.
Story
Leave room
I can leave at any time; my seat becomes a bot or, in 2-player games, the match ends as a forfeit.
§03

Game Rules (Wild8)

Deck

  • 108 cards across 4 colors: Red, Yellow, Green, Blue.
  • Per color: one 0, two of each 1–9, two each of Skip / Reverse / Draw Two.
  • 4 Wild and 4 Wild Draw Four cards.

Turn flow

  • Each player starts with 7 cards.
  • On your turn, play one card matching the top of the discard pile by color, number, or symbol.
  • If you can't play, draw one. If playable, you may play it.
  • Wilds let you choose the next color. Wild +4 also forces the next player to draw 4 and skip.
  • Skip = next player loses turn. Reverse = direction flips. Draw Two = next player draws 2 and is skipped.
  • At one card you must call UNO! within 5 seconds or risk a 2-card penalty.

Server is authoritative for the deck, hands, draw pile, and all play validation. Clients only see their own hand + opponents' hand counts.

§04

AI Opponent

Easy
Plays a random legal card. Picks Wild colors at random. Sometimes forgets to call UNO.
Medium
Prefers playable cards in its dominant color, saves Wilds, and always calls UNO.
Hard
Tracks unseen cards, weighs Wild +4 risk, plays Skip/Reverse defensively, calls UNO instantly.

Lives in src/lib/uno-ai.ts and is invoked from the server function whenever it's a bot's turn — same pattern as Drop4's aiMoveResult.

§05

Turn Timer & Penalties

  • 30 seconds per turn, surfaced via the same TimerClock component used in Drop4.
  • First timeout: server auto-draws one card for the offender and passes the turn. Counter increments.
  • Second timeout: forfeit. In 2-player games this ends the match. In 3–4 player games the offender is folded and remaining players continue (their cards are removed from play).
  • When a bot is the offender, the server resolves their move immediately — bots never "time out".
§06

Chat & Reactions

  • Global lobby chat — shared across all rooms, same as Drop4.
  • Room reactions — quick emoji tray that floats across the table for everyone in the room.
  • AI chat bot — replies in the lobby and inside vs-AI rooms. Strict family-friendly system prompt; never reveals hands or discusses card counts of other players.
  • Spam guard — 500-char cap, rate limit per token, same RLS shape as Drop4's chat_messages table.
§07

Technical Architecture

Frontend (reused)
  • React + TanStack Start (SSR)
  • Tailwind v4 + same design tokens
  • Reuse TimerClock, ChatPanel, floating reactions overlay, sound utils
  • New routes: /wild8, /wild8/play/$code
Backend (extended)
  • Lovable Cloud (Postgres + Realtime)
  • New table uno_games: code, seats[], deck, discard, hands (jsonb), turn, direction, status, active_color, draw_stack, called_uno[], timeouts
  • New server functions: createUnoGame, joinUnoGame, playCard, drawCard, callUno, enforceUnoTimeout
  • Reuses existing AI Gateway integration for chat replies
Privacy of hands

Hands live in a single jsonb column keyed by player token. The client only ever fetches its own hand via a server function; realtime broadcasts publish only public state (top of discard, hand sizes, turn, direction, active color). Other players' hands are never sent to the wire.

§08

Reuse Map (Drop4 → Wild8)

Drop4 pieceReused as-isNotes
Player token (anonymous)YesSame cookie/localStorage primitive
Room codes (4–12 alnum)YesSame generator + RLS shape
Realtime via Supabase channelsYesNew channel name uno-{code}
TimerClock componentYesSame 30s + danger + tick
Floating reaction overlayYesSame emojis
ChatPanel + AI botYesNew persona prompts ("Wild8 Bot")
Sound utils (drop, pop, win)PartialAdd shuffle/draw/wild SFX
Server fn / RLS patternYesMirror games.functions.ts file layout
Game rules + AINoNew: uno-logic.ts, uno-ai.ts
§09

Milestones

  1. M1 · Foundation (week 1): uno_games table, deck + shuffle, create/join, render hand, play/draw with full server validation. 2-player only.
  2. M2 · Full ruleset (week 2): Skip, Reverse, +2, Wild, Wild +4 with color pick, UNO! call + penalty, win/draw.
  3. M3 · Polish (week 3): 3–4 player seats, AI difficulties, 30s timer, chat + reactions, AI bot persona, sounds & animations, rematch, leave room.
§10

Success Metrics

  • ≥ 70% of created rooms reach turn 5 (validates onboarding + stability).
  • ≥ 40% of finished rooms request a rematch (validates fun).
  • Median move latency < 250 ms end-to-end on a normal connection.
  • Zero invalid moves accepted by the server (validated by automated tests over the rule engine).
§11

Out of Scope (MVP)

  • Tournaments, brackets, ranked ladders, ELO
  • House rules toggles (stacking +2 / +4, jump-in, 7-0)
  • Custom decks or skins
  • Spectator mode and replays
  • Native mobile apps and offline play