Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fratorgano/socketchess
Node.js and Socket.io project that allows you play chess with your friends online.
https://github.com/fratorgano/socketchess
chess css html javascript nodejs socket-io
Last synced: 5 days ago
JSON representation
Node.js and Socket.io project that allows you play chess with your friends online.
- Host: GitHub
- URL: https://github.com/fratorgano/socketchess
- Owner: fratorgano
- License: mit
- Created: 2021-09-23T07:45:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T19:59:05.000Z (5 months ago)
- Last Synced: 2024-07-31T00:09:36.306Z (5 months ago)
- Topics: chess, css, html, javascript, nodejs, socket-io
- Language: JavaScript
- Homepage: https://chess.fratorgano.me/
- Size: 387 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [SocketChess](https://chess.fratorgano.me/)
Small Node.js and Socket.io project that allows you play chess with your friends online.
This project was devolped on Node.js 16.10 but is currently deployed on 14.17.6.
Feel free to contribute!
You can play with it here: [chess.fratorgano.me](https://chess.fratorgano.me/)## Current features
* Drag and drop to move pieces
* See possible moves when hovering over a piece
* Highlight the king when in check
* Allow only legal moves
* Restart game, switch sides (both players need to agree)
* Show last move
* Automatic white/dark mode
* Play multiplayer with friends
* Play against the computer with various algorithms
* Spectate games## Try it
If you want to try it on your local machine, you just need to run some simple commands
1. Either download the repo or clone it (git clone https://github.com/fratorgano/SocketChess/)
1. Go to the folder you cloned it to
1. Run the following commands
1. ```npm install``` (Which install all the modules needed but wasm-chess-algorithms)
1. ```git clone https://github.com/fratorgano/wasm-chess-algorithms``` in a separate folder
1. ```wasm-pack build --target nodejs --out-dir /wasm-chess-algorithms``` in the wasm-chess-algorithms folder to compile the rust code to wasm
1. ```npm start``` (Starts the server on localhost:3001)## Dependencies/Modules Used
### Server-side
* [Node.js](https://github.com/nodejs/node) - Javascript runtime
* [socket.io](https://github.com/socketio/socket.io) - Library for realtime communication server-side
* [Express](https://github.com/expressjs/express) - Web Framework
* [workerpool](https://github.com/josdejong/workerpool) - Library to manage workers to allow for non-blocking find-moves calls
* [chess.js](https://github.com/jhlywa/chess.js) - Library for chess moves validation/generation
* [wasm-chess-algorithms](https://github.com/fratorgano/wasm-chess-algorithms) - Library that uses Rust for more performant chess game tree exploration### Client-side
* [socket.io-client](https://github.com/socketio/socket.io-client) - Library for realtime communication client-side
* [chess.js](https://github.com/jhlywa/chess.js) - Library for chess moves validation/generation
* [chessboard.js](https://github.com/oakmac/chessboardjs) - JavaScript chessboard component## License
SocketChess is released under the MIT License.