A real-time multiplayer chess game built using Node.js, Express, Socket.IO, and Chess.js, with a simple front-end powered by vanilla JS + Tailwind CSS.
✅ Two players can play together
✅ Others can spectate live
✅ Drag & Drop chess pieces
✅ Real-time moves synced with Socket.IO
💡 Fun bug: All pawns are purple 👾 – feel free to fix it and submit a PR!
(Attach a screenshot or a demo video link here)
- Backend: Node.js, Express, Socket.IO
- Game Logic: chess.js
- Frontend: HTML, TailwindCSS, Vanilla JS
- View Engine: EJS
- Clone the repo
git clone https://github.com/AnujAga2005/MultiplayerChessGame.git cd MultiplayerChessGame - Install dependencies
npm install
- Run the server
npx nodemon
Server will start at http://localhost:3000
First player to join becomes White
Second player becomes Black
Additional users become Spectators
Moves are validated using chess.js and synced to all clients via Socket.IO
Board auto-flips for Black
✅ Real-time multiplayer chess
✅ Spectator mode
✅ Drag & Drop interface
✅ Board flip for Black
🚧 Coming soon: Multiple games support
All pawns appear as purple pieces (PRs welcome!)
Only one game can run at a time
Fork the project
Create your feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add some feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
This project is open-source under the MIT License .