I need your opinion on the turn structure of my turn-based game

Hi folks.

I need your opinion on the turn structure of my turn-based game.

Game Info:

This is a card game and 2 players play against each other.
Each player has 5 seconds to choose a “face down card” and open it.
If after 5 seconds the player does not choose any card, the turn passes to the other player.

**Network infrastructure: **
Dedicated Server and Netcode For GameObject.

My question :

If a player clicks on any “face down card” should I open the card immediately (of course always checking local controls like timer, active client, etc.) or wait to server’s response?

For user experience, most people recommend opening the selected card and then closing it if the server rejects it. Because client => server => client communication takes some time (also if there is a delay, this time will be much longer)

However, if the player clicks on a card with 0.1 seconds left, the card is turned over, but the server rejects this action because the time on the server has reached zero due to the delay. Then we should close the card and move on to the next player.

However, this behavior makes the player feel that there is an bug in the game.

Solution:
We can set the client time to 5 seconds and the server time to 6 seconds. This seems like this solution would be enough if there is no delay more than 1 second.

Is this solution good or do you have any other suggestion?

Thank you for your time.

Would it give an unfair advantage to a cheating player if he could see the card instantly but the other party won’t see it? If so, it should be server-side.

You can also start playing the “card turn” animation instantly and make it so that it takes say 300 ms for the card to turn by 90 degrees - so that the front side of the card isn’t yet visible. That would give you time to wait for the response.

If the response arrives late, say 500 ms, it would cause the animation to stop momentarily. This is something you’d have to tweak to best match the expected latency of players. But generally such hiccups are accepted by players, particularly with high latencies.

2 Likes

Actually yes, since the server keeps the information of all the cards, the player always has to wait for the server’s response for the unopened card information.

Thank for this advice, this is really good and appropriate behavior.
Thanks for your time.