Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kartik989-max/chessmate.io

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.
https://github.com/kartik989-max/chessmate.io

chessjs css ejs express html javascript node socket-io tailwindcss websocket

Last synced: 3 days ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 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!