Skip to content
Notifications You must be signed in to change notification settings

mzums/collaborative_snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 12, 2025
e569bae · · Jul 12, 2025

History

5 Commits
Jul 12, 2025
Jul 10, 2025
Jul 12, 2025
Jul 12, 2025
Jul 12, 2025
Jul 12, 2025
Jul 12, 2025

Repository files navigation

Collaborative Snake

alt text

Overview

A real-time multiplayer Snake game built with Node.js, Express, and Socket.IO. Players can join rooms, customize their snake's color and name, chat with other players, and compete for the highest score.

Features

  • 🎮 Real-time multiplayer gameplay with collision detection
  • 🏠 Room-based system for creating/joining game sessions
  • 🎨 Customization of snake colors and player names
  • 💬 In-game chat with player colors and timestamps
  • 📊 Scoreboard showing all players' scores
  • 🔁 Restart functionality after game over
  • 🌐 Responsive UI with intuitive controls

Technologies Used

  • Backend: Node.js, Express
  • Real-time Communication: Socket.IO
  • Frontend: HTML5 Canvas, JavaScript, CSS
  • Deployment: Render (or any Node.js hosting platform)

How to Run Locally

Prerequisites

  • Node.js (v14 or higher)
  • npm (Node Package Manager)

Installation

  1. Clone the repository:
git clone https://github.com/your-username/multiplayer-snake-game.git

cd multiplayer-snake-game
  1. Install dependencies:
npm install
  1. Start the server:
npm run dev
  1. Open your browser and visit:
http://localhost:5000

How to Play

  1. Join a Room:

    • Enter a room name (create new or join existing)
    • Choose your player name and snake color
  2. Game Controls:

    • Use arrow keys to control your snake
    • Collect food (red circles) to grow and earn points
    • Avoid walls and other snakes
  3. Chat:

    • Type messages in the chat box
    • Press Enter to send
  4. After Game Over:

    • Restart to play again in the same room
    • Or go back to room selection

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published