Gamekit turn based game

202 views Asked by At

I plan to give another try to one of my iOS board game, it was built around the GameKit's turn based API.

I would like to offer the best game experience by limiting the amount of time available for each turn. From here, is it possible with the turn based API ?

The goal is to let players play during 60 seconds, and display a counter at the top of the board so they can see when it will be their turn.

So, the global question is: is there a way to prevent players to stop playing without resigning the game? What should happen if the player loose his data connection for a while?

I'll be glad if someone could share his experience in this type of game.

Cheers.

Cyril

1

There are 1 answers

0
kervich On

I implemented similar behaviour using socket connections between the two devices in a turn-based match. The idea is that once player1 is taking turn, it sends respective message to player2, so player2 knows that 1-minute timer started for player1 and vice-versa. The same happened when a player did submitTurn - the other player stopped the countdown and started waiting for turn to arrive via GC. However, in my case in the event of application going to the background (or the game being otherwise interrupted) the game ends immediately with a tie outcome.