Four Colors - Online Multiplayer Card Game

Seele01-Flash
By
Four Colors is a free online multiplayer card game inspired by UNO. Race to empty your hand by matching colors and numbers in this strategic 2-4 player game that's perfect for family fun.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Four Colors". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Adopt a clean, high-contrast "Casual Toon" style similar to the provided logo. Use bright, saturated primary colors (Red, Blue, Green, Yellow) for the cards to ensure visibility on small screens. * **Camera & Perspective**: Use a fixed 3D perspective camera (angled top-down view, approx 60 degrees) focused on the play table. * **Card Models**: Create low-poly card meshes with slightly rounded corners and minimal thickness. Use a **Texture Atlas** (Sprite Sheet) for all 108 card faces (Numbers 0-9, Skip, Reverse, Draw 2, Wild, Wild Draw 4) to reduce draw calls. * **Environment**: A simple, stylized table surface (blue felt or wood texture) with soft, non-distracting lighting. * **Animations**: Use **GSAP** or TWEEN.js for smooth card transitions: * *Dealing*: Cards flying from the central draw pile to player hands. * *Playing*: Cards swooping from hand to the discard pile with a slight rotation. * **Particles**: Simple burst particles when a "Wild" or "Draw 4" card is played, and confetti effects upon winning. ### 2. Audio Requirements * **BGM**: A lighthearted, looping "Lounge Jazz" or "Casual Pop" track that is relaxing but keeps the pace (approx. 110 BPM). * **Sound Effects (SFX)**: * *Card Snap*: Crisp sound when a card is placed on the pile. * *Shuffle*: Sound of cards ruffling during the deal. * *Alert*: A sharp "Ding" or buzzer when it's the player's turn. * *Error*: A low thud or buzzer if the player tries to play an invalid card. * *Special*: An energetic "One!" or whistle sound when the "1" (UNO) button is pressed. ### 3. Gameplay Loop * **Setup**: Implement the standard 108-card deck logic. Support 2, 3, or 4 players (1 human vs 1-3 AI bots). Deal 7 cards to each player initially. * **Core Mechanic**: * Players take turns matching the top card of the discard pile by **Color** or **Number/Symbol**. * If no match is available, the player must tap the Draw Pile to take a card. * **Action Cards Logic**: * *Skip*: Next player loses turn. * *Reverse*: Switch play order (Clockwise <-> Counter-clockwise). * *Draw 2*: Next player draws 2 and loses turn. * **Wild Cards Logic**: * *Wild*: Player selects a new active color via a UI popup. * *Wild Draw 4*: Player selects color, next player draws 4 and loses turn. * **The "1" Button Rule**: A dedicated button must appear when a player has 2 cards left. If they play one (leaving 1 card) without pressing this button first (or within a short timer), they are penalized by drawing 2 cards. * **Win Condition**: The first player to discard all cards wins the round. ### 4. Mobile Controls & Interaction * **Orientation**: **Landscape Mode** preferred to accommodate the player's hand at the bottom and opponents on Top/Left/Right. * **Touch Interaction**: * Use `Raycaster` for precise touch detection on 3D card meshes. * **Tap to Play**: Tapping a card in hand attempts to play it. If valid, it animates to the pile; if invalid, it shakes (visual feedback). * **Tap to Draw**: Tapping the draw deck adds a card to the hand. * **UI Layout**: * **Player Hand**: displayed at the bottom center of the screen. Cards should overlap slightly but fan out or pop up when touched. * **Color Picker**: A modal overlay with 4 large colored quadrants for selecting Wild colors. * **"1" Button**: A distinct, flashing button placed near the player's avatar, easily reachable with a thumb (min size 60x60px). * **Feedback**: Haptic feedback (vibration) on invalid moves or when the "Draw 4" is played against the user. Highlight playable cards in the hand with a subtle glow effect during the player's turn. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Four Colors

Four Colors is an exciting online multiplayer card game that brings the beloved UNO experience directly to your web browser. This free-to-play game lets you compete against 2-4 players in real-time matches, making it perfect for friends and family entertainment. With its colorful design featuring blue, red, yellow, and green cards, Four Colors captures the essence of classic card matching games while adding modern online multiplayer functionality.

The game has earned popularity among card game enthusiasts who enjoy strategic gameplay combined with luck-based elements. Whether you're a seasoned UNO player or new to card matching games, Four Colors offers an accessible yet engaging experience that keeps players coming back for more.

Core Features

Complete Card Game Experience

Four Colors features a full 108-card deck with four distinct colors, providing authentic gameplay depth:

  • 70% Number Cards : Cards numbered 0-9 in each color, with strategic distribution
  • Action Cards : Skip, Reverse, and Draw Two cards that add tactical complexity
  • Wild Cards : Game-changing cards that let you control color selection and force opponents to draw cards
  • Real-time Multiplayer : Play instantly with friends or players worldwide

Strategic Gameplay Elements

The game combines simple rules with deep strategic possibilities:

  • Color and Number Matching : Play cards that match either the color or number of the previous card
  • Action Card Strategy : Use Skip, Reverse, and Draw Two cards to disrupt opponents
  • Wild Card Management : Time your wild cards perfectly to control the game flow
  • Hand Management : Balance between playing aggressively and maintaining card options

Multiplayer Modes

  • 2-Player Duels : Intense head-to-head matches
  • 3-Player Triangles : Balanced three-way competition
  • 4-Player Chaos : Maximum multiplayer excitement with four competitors

Game Rules and Mechanics

Basic Gameplay

The objective is straightforward: be the first player to play all your cards. Each turn, you must:

  1. Match the Previous Card : Play a card that matches either the color or number
  2. Draw if Stuck : If you can't match, draw cards until you can play
  3. Use Strategy : Deploy action and wild cards at optimal moments
  4. Remember the "1" Rule : Press "1" when you have one card left, or face a two-card penalty

Card Types Explained

Number Cards (0-9) : - Make up the majority of the deck - Each color contains 19 number cards - One "0" card per color, two of each other number

Action Cards : - Skip : Next player loses their turn - Reverse : Changes the direction of play - Draw Two : Next player draws two cards and loses turn

Wild Cards : - Wild : Choose any color to continue play - Wild Draw Four : Choose color and force next player to draw four cards

Operation Guide

Getting Started

  1. Launch the Game : Open Four Colors in any modern web browser
  2. Choose Player Count : Select 2, 3, or 4 players for your match
  3. Wait for Players : The game will match you with other online players
  4. Start Playing : Use your mouse to click and play cards from your hand

Controls

  • Left Mouse Click : Select and play cards
  • "1" Button : Must press when you have one card remaining
  • Card Selection : Click on any playable card in your hand
  • Wild Card Options : Click to choose colors when playing wild cards

Winning Strategy Tips

  • Monitor Opponents : Keep track of how many cards other players have
  • Save Wild Cards : Use them strategically to change difficult color situations
  • Count Cards : Remember which cards have been played
  • Timing Action Cards : Use Skip and Reverse cards to disrupt opponent momentum

Why Play Four Colors

Perfect for All Skill Levels

Four Colors welcomes both beginners and experienced card players. The simple matching concept makes it easy to learn, while the strategic depth keeps advanced players engaged. The game's family-friendly nature makes it perfect for players of all ages.

No Download Required

Enjoy instant access through your web browser without any downloads, installations, or account creation. Simply visit the game page and start playing immediately on any device with internet access.

Free Entertainment

Completely free to play with no hidden costs, premium features, or pay-to-win mechanics. Everyone has equal access to all cards and features from the moment they start playing.

Cross-Platform Compatibility

Play seamlessly across desktop computers, laptops, tablets, and smartphones. The responsive design ensures optimal gameplay experience regardless of your device choice.

Real-Time Social Gaming

Connect with players worldwide in real-time matches. The multiplayer system ensures you'll always find opponents ready to play, making it perfect for quick gaming sessions or longer tournaments with friends.

Frequently Asked Questions (FAQ)