Skip to content

This project is a web-based chess game built using WebSocket, Express, and EJS. It allows players to connect in real-time, get paired into rooms, and play against each other.

Notifications You must be signed in to change notification settings

Kartik989-max/ChessMate.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Game using WebSocket

This project is a web-based chess game built using WebSocket, Express, and EJS. It allows players to connect in real-time, get paired into rooms, and play against each other. The game handles multiple players and ensures smooth gameplay through efficient room management.

Demo Link: https://chess-com-vhzl.onrender.com

Features

Real-time multiplayer:

Players can join a room and play against another player in real-time using WebSocket.

Room Management:

The game pairs players in rooms for a 1v1 match.

Game Persistence:

The game state is maintained even if a player refreshes the page.

Move Validation:

The app uses chess.js for validating moves.

Spectator Mode (Optional):

Support for spectators to watch ongoing games.

Tech Stack

Backend: Express.js for server management and WebSocket for real-time communication.

Frontend: EJS templates for rendering dynamic content.

Chess Logic: Chess.js for game logic, including move validation and piece interaction.

WebSocket: Real-time communication between players.

Installation

Clone the repository:

git clone https://github.com/Kartik989-max/chess.com.git

Navigate to the project directory:

cd chess.com

Install the dependencies:

npm install

Start the server:

npm start

Open your browser and go to http://localhost:3000 to play the game.

How to Play

Open the app in your browser.

Wait to be paired with another player.

Once paired, the chess game will begin automatically.

Make your moves, and the game will handle turn-based play.

If you refresh the page, the game will restore your state in the same room.

Contributing

Contributions are welcome! Please open an issue or a pull request if you'd like to contribute or fix a bug.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Feel free to adjust this based on any additional features or details you want to highlight!

About

This project is a web-based chess game built using WebSocket, Express, and EJS. It allows players to connect in real-time, get paired into rooms, and play against each other.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published