Skip to content

bobbythelobster/multiplayer-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplayer Chess

A real-time multiplayer chess game built with Node.js, Socket.io, and vanilla JavaScript.

Features

  • 🎮 Real-time multiplayer gameplay
  • 🏠 Room-based matchmaking
  • ♟️ Full chess rules validation
  • 📱 Responsive design
  • 🎨 Clean, modern UI
  • 🔄 Automatic reconnection handling

How to Play

  1. Create a Game: Click "Create New Game" to generate a room
  2. Share Room ID: Copy the room ID and share it with your opponent
  3. Join a Game: Enter a room ID and click "Join Game"
  4. Play: Take turns making moves - white goes first!

Deployment Options

Option 1: Glitch (Recommended - Easiest)

  1. Go to glitch.com
  2. Click "New Project" → "Import from GitHub" (or upload zip)
  3. Upload the project files
  4. The app will auto-start and provide a public URL

Option 2: Render

  1. Go to render.com
  2. Create a new Web Service
  3. Connect your GitHub repo or upload files
  4. Set build command: npm install
  5. Set start command: npm start

Option 3: Local Development

npm install
npm start

Then open http://localhost:3000

Technical Details

  • Backend: Node.js + Express + Socket.io
  • Frontend: Vanilla JavaScript + CSS Grid
  • Chess Logic: chess.js library
  • Real-time: WebSockets via Socket.io

Game Controls

  • Click a piece to select it
  • Valid moves are highlighted
  • Click a highlighted square to move
  • Use "Resign" to forfeit
  • Use "Offer Draw" to propose a draw

Enjoy your game! ♟️

About

Real-time multiplayer chess game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors