6

Have been working on a two-player turn based game that uses a custom UI for match management. Considering restricting the app to iOS 6+ in order to use player timeouts. I would like to show the user the remaining amount of time to move, but the participant.timeoutDate is always null? Per the WWDC 2012 video (that says the timeout won't apply to the last participant in nextParticipants), I pass an array with two entries (opponent at index 0 and local player at index 1) when calling endTurnWithNextParticipants:turnTimeout:matchData:completionHandler: to take a turn. I've tried both GKTurnTimeoutDefault and various integer literals ... no luck ... always seems to be null. The player's last turn date works fine.

On the subject of player timeouts ... after I get them working, how is this delivered? I see GKTurnBasedMatchOutcomeTimeExpired ... does this come in a turn event?

  • 1
    Have you ever made any progress with this issue? I am facing the exact same thing. All my timeout dates are null even when setting a timeout interval. – rymagno Aug 01 '14 at 23:26

1 Answers1

1

From Apple's developer forum

Elian Gidoni -

+1 The doc should be: timeoutDate The date and time when the participant’s turn timed out. (read-only)

nuclearnova
  • 785
  • 7
  • 10
  • It also appears that once a user times out, their timeout value is always set to that value, even when a new turn starts, unless/until they timeout again. I started checking if timeout was nil to determine if a player had timedout and found that once set, it never goes back to nil ever again. If you need to know that someone timedout on any given turn, you'll need to track that yourself in the matchData. – Thunk Apr 08 '15 at 19:40