A professional, full-featured game arena platform built with React, Tailwind CSS, and modern web technologies. Play multiple games, compete with friends, track your progress, and climb the leaderboards!
- 🎯 Multiple Games: Tic-Tac-Toe, Snake, Memory Match, 2048 Puzzle
- 👥 Multiplayer Arena: Create rooms and play with friends
- 🏆 Leaderboards: Compete globally and track rankings
- 📊 Player Profiles: Level system, XP tracking, and achievements
- 💾 Local Storage: Auto-save progress and game history
- 🎨 Beautiful UI: Modern glass-morphism design with smooth animations
- 📱 Responsive: Works perfectly on mobile, tablet, and desktop
- ⚙️ Settings: Customize sound, theme, and notifications
- 🎮 Game Modes: Single-player and multiplayer options
- 🏅 Achievements: Unlock badges as you play
- Node.js 18+ and npm/yarn installed
- Create the project:
npm create vite@latest game-arena -- --template react
cd game-arena- Install dependencies:
npm install
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install react-router-dom zustand clsx tailwind-merge lucide-react framer-motion date-fns react-hot-toast react-hook-form zod @hookform/resolvers-
Copy all the source files from this repository into your project following the folder structure provided.
-
Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
game-arena/
├── src/
│ ├── assets/ # Images and sounds
│ ├── components/ # Reusable React components
│ │ ├── common/ # Button, Card, Modal, etc.
│ │ ├── layout/ # Navbar, Footer, Layout
│ │ ├── game/ # Game-specific components
│ │ ├── player/ # Player-related components
│ │ └── arena/ # Arena components
│ ├── games/ # Game implementations
│ │ ├── TicTacToe/
│ │ ├── Snake/
│ │ ├── Memory/
│ │ └── Puzzle/
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── store/ # Zustand state management
│ ├── services/ # Business logic and API
│ ├── utils/ # Helper functions
│ ├── config/ # Configuration files
│ └── styles/ # Global styles
├── public/ # Static assets
└── package.json
- Play against AI (Easy, Medium, Hard)
- 2-player local multiplayer
- Smart AI using Minimax algorithm
- Classic snake gameplay
- Adjustable difficulty
- Score tracking and high scores
- Find matching card pairs
- Multiple difficulty levels
- Timer and move counter
- Combine tiles to reach 2048
- Unlimited gameplay
- Score calculation
- React 18 - UI library
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- React Router - Navigation
- Zustand - State management
- Lucide React - Icons
- Framer Motion - Animations
- React Hot Toast - Notifications
- Zustand stores for game state, player data, and arena management
- Persistent storage with localStorage
- Clean and simple API
- React Router v6 for navigation
- Protected routes (can be extended)
- Dynamic game routes
- Mobile-first approach
- Touch controls for mobile devices
- Adaptive layouts for all screen sizes
- Optimized rendering with React best practices
- Lazy loading for better initial load times
- Efficient state updates
- Create a new folder in
src/games/YourGame/ - Implement game logic in
gameLogic.js - Create game components
- Add game config to
src/config/games.js - Import in
src/pages/GamePlay.jsx
- Modify
tailwind.config.jsfor theme colors - Update
src/styles/globals.cssfor global styles - Use Tailwind utility classes throughout
npm run buildThe optimized build will be in the dist/ folder.
Deploy to any static hosting service:
- Vercel:
vercel --prod - Netlify: Drag and drop
distfolder - GitHub Pages: Use
gh-pagespackage
Contributions are welcome! Feel free to submit issues and pull requests.
MIT License - feel free to use this project for personal or commercial purposes.
Prince Kothari (@princekotharii)
- Icons by Lucide
- Inspired by classic arcade games
- Built with modern web technologies
Enjoy playing! 🎮🏆
For questions or support, please open an issue on GitHub.