News for hackers. Stuff that matters.
Re:Boardgame.io: an engine for creating turn-based games usi... by fleabitdev on Friday December 20, 2024 @06:36PM (#42476225)
boardgame.io only runs game logic on the server, and it censors the State just before sending it to each client. This strategy makes the UI feel less responsive, but it keeps things simple.

The Swords and Ravens blog post recommends resolving actions on the client when they don't require secret information, but resolving other actions on the server. You'd also need to resolve actions on the server when they involve RNG.

Re:Boardgame.io: an engine for creating turn-based games usi... by Savageman on Friday December 20, 2024 @06:49PM (#42476298)
Interesting, would you share the link of this post please?
Re:Boardgame.io: an engine for creating turn-based games usi... by fleabitdev on Friday December 20, 2024 @06:54PM (#42476330)
Re:Boardgame.io: an engine for creating turn-based games usi... by Longwelwind on Saturday December 21, 2024 @04:22AM (#42478488)
I don't recommend resolving actions on the server in any situation:

For actions that require secret information, you would filter the actions sent to the client of any secret information and make sure the code handling the action can handle both the action and the filtered actins.

For actions involving RNG, make all randomness rely on a seed. This seed would be stored server-side and passed along the action when sent to the client. This makes sure the clients can deterministically reproduce the update.