Skip to content

It is an online chess game where players can play against each other in real-time

Notifications You must be signed in to change notification settings

gorod0k/tg-online-chess

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ONLINE CHESS

!!! https://github.com/shaack/chess-console?tab=readme-ov-file !!! https://shaack.com/projekte/cm-chessboard https://github.com/shaack/cm-chessboard

Based on https://github.com/Amey-Thakur/ONLINE-CHESS-GAME Demo: https://amey-thakur-online-chess-game.onrender.com

NPM modules: path http chess.js express socket.io

Docs for libs: Chessboard lib documentation: https://chessboardjs.com/docs Chess lib documentation: www.npmjs.com/package/chess.js perfect alternative Chessboard library: https://caustique.github.io/chessboard-js

nice article about socket io and online gameplay https://medium.com/@manjulajayawardana/lets-build-our-own-online-multiplayer-chess-game-ba7d56d00700 https://www.slmanju.com/2024/01/lets-build-our-own-online-multiplayer.html

game processing:

  1. onDrop -> game.move When a player moves a piece on the chess board, client send this data to the server with a message move.
  2. socket.on('Dropped -> io.to(room).emit('Dragging', io.to(room).emit('DisplayBoard', io.to(room).emit('updateStatus The server receives a message and broadcast messages move to all clients in a room.
  3. The client(s) receive(s) the message move with the data will update its chessboard state.

Todo: выкинуть нахер semantic UI

реализовать html layer для: socket.on('gameOver', (turn, win) socket.on('inCheck', turn => {

About

It is an online chess game where players can play against each other in real-time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.0%
  • HTML 26.3%
  • SCSS 2.5%
  • CSS 2.2%