skip navigation
Home | zeronumbers
Эта страница на русском

All projects

sorted by date (newest first)

Client part of WebRTC chess game. WebSocket server is here.

It includes frontend and the game itself.

Made on vite with react, prettier, eslint, aribnb style guide, BEM css methodology.

Visuals of board are done using SVG.

Manual and WebSocket signaling, as well as hotseat game is possible.

Moves history is shown using react-window.

react-router is used to differentiate type of game:

  • hotseat
  • WebSocket signaling
  • manual signaling

On board you can see which pieces control selected square, which squares selected square controls, which pieces check, which moves piece could make, squares of previous move. Legend is provided to show what symbols mean.

It is possible to:

  • save/load game
  • undo move
  • reverse board

To deal with lost messages (two generals problem) when player makes an action that should be sent to opponent an interval is created that keeps sending message with action type and id of this action, interval is cleared only when acknowledgement message is recieved with same id. Recieving side knows last recieved id and compares it to newly recieved one.

As a result for sender: if message is lost a new one would be sent. For reciever: out of all recieved messages with the same id only one would be processed (idempotence).

view project on github