2 ms·
Multiplayer backgammon doesn't require a full working ruleset on the client side at all. Like I mentioned, these are _turn-based games_. To an extent, you're t
by filleduchaos 6y ago
Multiplayer backgammon doesn't require a full working ruleset on the client side at all.
Like I mentioned, these are _turn-based games_. To an extent, you're thinking about them like they're real time, and that's where the problem is. With backgammon (as with Ludo, which I'm building at the moment, so I have direct experience with this) you _have_ to roll the dice on the server or else the enterprising player is just going to game them. And if you're returning the value of the rolled die from the server, you can simply return the set of legal moves as well.
- nurettin 6y agoYou could return the set of moves, or you could -not- do that, and just run the state machine in the client. That way, you don't have to complicate the server by making it calculate future moves and write yet another client which is purposefully less featured, but still intelligent enough to parse the returned moves and map them to whichever piece is selected and you have less code to maintain. You can keep on gambiting around the problem with "concessions" which is easily solved by activaing code you've already written on the client side but that's no more than a mental exercise and has little to do with efficiency in problem solving.