A high-performance arcade snake game where you compete against AI bots in a massive neon arena
🌐 Live Demo • 🎮 Play Now • 📖 Features • 🚀 Tech Stack • 🤝 Contributing
Customize difficulty and opponent count before entering the arena
Compete against AI bots, grow your snake, and climb the leaderboard
- 🎨 Stunning Neon Visuals - Beautiful gradient UI with glowing effects
- 🤖 AI Opponents - Battle against intelligent bots with customizable difficulty
- 📊 Real-time Leaderboard - Compete and track your rank
- ⚡ Nitro Boost System - Hold space to boost and outmaneuver opponents
- 🎚️ Customizable Difficulty - Easy, Normal, and Hard modes
- 👥 Adjustable Bot Count - Control the number of opponents (1-20+)
- 🏆 Score Tracking - Track your length and score in real-time
- 🎮 Smooth Controls - Mouse steering with intuitive click-to-boost
- Frontend: React 19 + TypeScript
- Build Tool: Vite 6
- Rendering: Canvas API with custom renderer
- Game Engine: Custom spatial hash system for collision detection
- Styling: Tailwind CSS (via inline styles)
- Node.js 18+ and npm
# Clone the repository
git clone https://github.com/yourusername/slither-vs-bots.git
cd slither-vs-bots
# Install dependencies
npm install
# Start the development server
npm run devOpen http://localhost:5173 in your browser and start playing!
npm run build
npm run preview- Start: Click "ENTER ARENA" from the main menu
- Steer: Move your mouse to control your snake's direction
- Boost: Hold left-click (or spacebar) to activate nitro boost
- Grow: Collect colorful dots to increase your length and score
- Survive: Avoid colliding with other snakes or yourself
- Dominate: Climb the leaderboard and become the top snake!
- 🖱️ Mouse Movement - Steer your snake
- 🖱️ Left Click - Hold to boost (uses nitro energy)
- ⌨️ Spacebar - Alternative boost control
slither-vs-bots/
├── components/ # React components
│ ├── GameCanvas.tsx # Main game canvas
│ ├── HUD.tsx # Heads-up display
│ └── Menu.tsx # Main menu
├── services/ # Game logic services
│ ├── GameEngine.ts # Core game engine
│ ├── Renderer.ts # Canvas rendering
│ └── SpatialHash.ts # Collision detection
├── types.ts # TypeScript definitions
├── constants.ts # Game constants
└── App.tsx # Main app component
Contributions are welcome! Feel free to:
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🔀 Open a Pull Request
- 🎨 New visual effects and themes
- 🤖 Improved AI bot behaviors
- 🎵 Sound effects and music
- 📱 Mobile touch controls
- 🌐 Multiplayer support
- 🏆 Achievement system
This project is licensed under the MIT License - see the LICENSE file for details.