- Node.js
- Express
- Socket.IO
- HTML5 Canvas
- Vanilla JavaScript
- Tailwind CSS
Backend uses gameManager.js for logic and socketHandlers.js for networking.
git clone <YOUR-REPO-URL> multisnake
cd multisnakenpm installnpm startThen visit:
👉 http://localhost:3000
- Enter Your Name
- (Host only) Choose:
- Grid Size (10–60)
- Game Timer (minutes)
- Game Speed (Slow / Normal / Fast / Blazing)
- Click Create New Room
A 4-letter room code appears.
Friends:
- Enter their name
- Enter the room code
- Click Join Room
- View list of connected players
- Host has 👑 crown
- Host clicks Start Game
- Move with WASD or Arrow Keys
- Eat red food → grow and score
- Avoid collisions
- Your name floats above your snake head
Final leaderboard shows:
- Winner 🏆
- Ranking
- Scores
Host can click Play Again to restart with same players & settings.
- Each room has a unique game state (
gameStates[roomCode]) - Game tick cycle:
- Compute next positions
- Detect collisions
- Apply deaths
- Grow snakes if food eaten
- Respawn food
- Timer decreases every tick
- Game ends when:
- Only 0–1 player alive, or
- Timer reaches 0
(Modify this for your team)
- Guido He
- Donghoon Oh
- Radman Mohammadi
- Nathan Hilde
- Power-ups
- Mobile touch controls
- In-room chat
- Persistent high scores
- Spectator mode
This project is for educational and hackathon use.
Feel free to fork, improve, and customize it.