Re:A multiplayer board game in Rust and WebAssembly
by CobrastanJorji on Saturday June 27, 2020 @03:12AM
(#23660064)
For client side prediction, probably, yes. But having a single library that could tell you "given game state X, which plays are legal" would be nice for rendering the UI without needing to ask the server for every last detail.
[ Parent
| on HN ]
Re:A multiplayer board game in Rust and WebAssembly
by filleduchaos on Saturday June 27, 2020 @04:19AM
(#23660314)
For many if not most turn-based (board) games (like Ludo, which I'm actually currently implementing for myself/my friends, or Reversi) the set of legal plays is small enough that the server can simply send them to the player along with the information about the last turn taken. Even chess can be implemented in such a way if you get a little creative with the move data format. I prefer to build board games this way because (ironically enough) it really decouples the client/rendering and the server/game logic, greatly simplifying building additional or even alternative clients.