Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎴 UNO Multiplayer Game

A fun, colorful multiplayer UNO card game built for the whole family! Features real-time gameplay, smart AI bots, cute avatars, and the mathematically elegant Prime Phase RNG engine.

UNO Game Node.js React

✨ Features

  • 🎮 Real-time Multiplayer - Play with 2-4 players online
  • 🤖 Smart AI Bots - Challenge clever computer opponents
  • 🦄 Cute Avatars - 16 adorable characters to choose from
  • 🎨 Beautiful Design - Colorful, kid-friendly interface
  • 🎉 Fun Effects - Confetti, animations, and celebrations
  • 🔐 Simple Room Codes - Easy 4-letter codes to join friends
  • 📱 Mobile Friendly - Works great on phones and tablets

🚀 Deploy to Railway (Easiest Method!)

Railway is the simplest way to get your game online. Here's how:

Step 1: Create a GitHub Repository

  1. Go to github.com and create a new repository
  2. Name it something like uno-game
  3. Make it public (or private if you prefer)

Step 2: Upload the Code

Option A: Using GitHub's web interface

  1. In your new repo, click "Add file" → "Upload files"
  2. Drag all the folders (client, server, package.json, etc.) into the upload area
  3. Click "Commit changes"

Option B: Using Git command line

cd uno-multiplayer
git init
git add .
git commit -m "Initial commit - UNO game"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/uno-game.git
git push -u origin main

Step 3: Deploy to Railway

  1. Go to railway.app and sign up (free!)
  2. Click "New Project" → "Deploy from GitHub repo"
  3. Select your uno-game repository
  4. Railway will auto-detect it's a Node.js app

Step 4: Configure the Build

Click on your project, then go to Settings and set:

Build Command:

cd client && npm install && npm run build && cd ../server && npm install

Start Command:

cd server && npm start

Root Directory: Leave empty (use /)

Step 5: Get Your URL

  1. Go to SettingsNetworking
  2. Click "Generate Domain" to get a free *.railway.app URL
  3. Share this URL with friends to play! 🎉

🎮 How to Play

  1. Create a Game: One player creates a room and gets a 4-letter code
  2. Invite Friends: Share the code with friends (or add bots!)
  3. Start Playing: The host clicks "Start Game" when everyone's ready
  4. Match Colors/Numbers: Play cards that match the color or number on the pile
  5. Use Special Cards: Skip, Reverse, Draw 2, and Wild cards add strategy!
  6. Call UNO: Press the UNO button when you have one card left - you have 3 seconds!
  7. Catch Others: If someone forgets to call UNO, press "Catch" to make them draw 2!
  8. Win!: First player to empty their hand wins! 🏆

The UNO Catch Rule 🎯

When a player gets down to 1 card, they have 3 seconds to press the UNO button. If they forget:

  • A countdown timer appears for all players
  • After 3 seconds, a "Catch [Name]!" button appears for everyone else
  • The first player to press it makes the forgetful player draw 2 penalty cards!
  • Bots automatically call UNO (they're clever!)

Card Types

Card Effect
0-9 Match by color or number
⊘ Skip Next player loses their turn
⟲ Reverse Change play direction
+2 Next player draws 2 cards
🌈 Wild Change the color
+4 Next player draws 4 + you pick the color

🛠 Local Development

Prerequisites

  • Node.js 18 or higher
  • npm

Setup

# Clone the repo
git clone https://github.com/YOUR_USERNAME/uno-game.git
cd uno-game

# Install dependencies
cd client && npm install
cd ../server && npm install

# Start the server (in one terminal)
cd server && npm run dev

# Start the client (in another terminal)
cd client && npm start

The game will be available at http://localhost:3000


🧮 About the Prime Phase RNG

This game uses a mathematically elegant random number generator based on the ℚ-linear independence of prime logarithms:

output = (γ × log(p)) mod 2π / 2π

Where:

  • γ (gamma) is a secret seed value
  • p cycles through prime numbers (2, 3, 5, 7, 11, ...)

This produces cryptographically unpredictable shuffles while being fully deterministic and verifiable.


📁 Project Structure

uno-multiplayer/
├── client/                 # React frontend
│   ├── public/
│   │   └── index.html
│   ├── src/
│   │   ├── App.jsx        # Main game component
│   │   ├── index.js
│   │   └── index.css
│   └── package.json
├── server/                 # Node.js backend
│   ├── index.js           # Socket.IO server + game logic
│   └── package.json
├── package.json           # Root scripts
└── README.md

🎨 Avatars

Players can choose from 16 adorable avatars:

🦄 Sparkle | 🐉 Flame | 🐱 Whiskers | 🐶 Buddy 🐰 Hoppy | 🐼 Bamboo | 🦁 Roary | 🦊 Rusty 🦉 Hoot | 🐧 Waddle | 🦋 Flutter | ⭐ Twinkle 🌈 Sunny | 🚀 Zoom | 🧙 Magic | 🧚 Pixie


🐛 Troubleshooting

"Room not found": Make sure you're entering the exact 4-letter code (case doesn't matter)

Players can't connect: Check that everyone is using the same URL (including https://)

Game feels laggy: The smart bots take ~1 second between moves to feel natural

Build fails on Railway: Make sure you set the correct build and start commands


📄 License

MIT License - Feel free to modify and share!


Made with ❤️ for family game nights!

About

UNO multiplayer card game

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages