Reasons to not use "client: false" in move functions? #1202
-
Why would you ever not use I'm trying to wrap my head around on how exactly G is handled on client / server. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Some games do not have secret state. For example, think of chess: all information about the game state is publicly visible to both players. In games with secret state (decks of face down cards, player state that is not visible to other players, etc.) then the move can’t run on the client, so that’s why |
Beta Was this translation helpful? Give feedback.
Some games do not have secret state. For example, think of chess: all information about the game state is publicly visible to both players.
client: false
means the player has to wait for a server response to see the result of their action, so when it is OK to do so, calculating on the client is a snappier user experience because they get immediate feedback about their move.In games with secret state (decks of face down cards, player state that is not visible to other players, etc.) then the move can’t run on the client, so that’s why
client: false
is needed.