Hacker News new | ask | show | jobs
by yashwi_ 58 days ago
Nice implementation. Out of curiosity, how are you handling multiplayer state sync?

For a board game like this I’d imagine sending move events and letting clients recompute the board locally rather than syncing the whole board every turn. Curious what approach you took.

1 comments

You can look at the repo to find out the details.

Essentially sending moves over web socket and the server having authority to accept/reject them to prevent cheating moves. Client updates optimistically and rolls back if server rejects/network times out etc.