https://github.com/huseynovvusal/multiplayer-snake-game
đ Multiplayer Snake Game using Nest.js (Socket.io) and React.
https://github.com/huseynovvusal/multiplayer-snake-game
canvas multiplayer nestjs react snake-game socket-io websockets
Last synced: about 2 months ago
JSON representation
đ Multiplayer Snake Game using Nest.js (Socket.io) and React.
- Host: GitHub
- URL: https://github.com/huseynovvusal/multiplayer-snake-game
- Owner: huseynovvusal
- License: mit
- Created: 2025-03-30T07:58:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-13T08:07:51.000Z (about 1 year ago)
- Last Synced: 2025-04-14T02:56:27.339Z (about 1 year ago)
- Topics: canvas, multiplayer, nestjs, react, snake-game, socket-io, websockets
- Language: TypeScript
- Homepage:
- Size: 2.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multiplayer Snake Game đ
Welcome to the **Multiplayer Snake Game**, a modern twist on the classic snake game where you can compete with friends in real-time! This project is built using **NestJS** for the server and **React** with **Vite** for the client, ensuring a fast and scalable gaming experience.
---
## Features â¨
- **Multiplayer Gameplay**: Join or create rooms to play with friends. đĢ
- **Dynamic Game Board**: Real-time updates of the game state. đšī¸
- **Customizable Player Colors**: Each player gets a unique color. đ¨
---
## Screenshots đ¸
### Game Room

### In-Game

---
## Getting Started đ
### Prerequisites â
- **Node.js** (v16 or later)
- **npm** (v7 or later)
### Installation đ ī¸
1. Clone the repository:
```bash
git clone https://github.com/your-username/multiplayer-snake-game.git
cd multiplayer-snake-game
```
2. Install dependencies for both the server and client:
```bash
cd server && npm install
cd ../client && npm install
```
### Running the Application âļī¸
#### Server đĨī¸
1. Navigate to the `server` directory:
```bash
cd server
```
2. Start the server in development mode:
```bash
npm run start:dev
```
#### Client đ
1. Navigate to the `client` directory:
```bash
cd client
```
2. Start the client in development mode:
```bash
npm run dev
```
3. Open your browser and navigate to `http://localhost:5173`.
---
## How to Play đŽ
1. **Create or Join a Room**: Enter your name and either create a new room or join an existing one. đ
2. **Start the Game**: The room owner can start the game once all players are ready. đĸ
3. **Control Your Snake**: Use the arrow keys to move your snake and collect food to grow. âŦī¸âŦī¸âŦ
ī¸âĄī¸
4. **Avoid Collisions**: Stay alive by avoiding walls and other players' snakes. đ§
---
## Project Structure đī¸
```
multiplayer-snake-game/
âââ client/ # Frontend code (React + Vite)
âââ server/ # Backend code (NestJS + Socket.io)
âââ assets/ # Images and other assets
```
---
## Contributing đ¤
Contributions are welcome! Feel free to open an issue or submit a pull request. đ ī¸
---
## License đ
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
## Acknowledgments đ
- **NestJS**: For the robust backend framework. đĄī¸
- **React**: For the dynamic and responsive frontend. âī¸
- **Socket.IO**: For real-time communication. đ
- **Vite**: For the fast development experience. âĄ