Game Center set Turn Timeout?

I’m using the gameNetwork Library for a turn-based iOS game and I would like to set the Turn Timeout date

of the nextParticipant when ending the currentParticipant turn.

Is it possible to set the GameKit turnTimeout date though gameNetwork?

If it is not possible, what is the default turnTimeout in gameNetwork set to?

From Apple’s Game Kit Reference:

Turn Timeouts

Common values for turn timeouts.

  extern NSTimeInterval GKTurnTimeoutDefault;

  extern NSTimeInterval GKTurnTimeoutNone;

Constants

  GKTurnTimeoutDefault

Indicates that the player has one week to take a turn.

Available in iOS 6.0 and later.

Declared in GKTurnBasedMatch.h.

  GKTurnTimeoutNone

Indicates that the player’s turn never times out.

Available in iOS 6.0 and later.

Declared in GKTurnBasedMatch.h.

Thanks,

Warren

From my tests it appears that there is no way to set the turnTimeout though gameNetwork and the default timeout is set to never.

So opponents can currently bail on a game with no consequence. 

Hi @animonger,

Can you just do this “locally” on the player’s side, as in, when their turn starts you begin a timer and take the proper action if it expires? I’m not an expert on Game Center, but I’m merely suggesting a potential option which might work.

Brent

Hi Brent,

Thanks for the suggestion. Technically it would be possible but it would only work if the lagging player was logged into Game Center and had the game open to dispatch a quitMatch event.

With the GameKit turnTimeout date set, the Game Center server could determine the winner without the lagging player logged in.

Warren

Hi Warren,

I asked the engineers and they report that it’s set to “GKTurnTimeoutDefault” which is 1 week. Currently we don’t support letting the user change this value.

Best regards,

Brent

Thanks for the info, Brent!

1 week is the iOS GameKit default and will work fine for my game.

Maybe the time out isn’t firing for my tests because of the Game Center sandbox.

I’ll post an update when the game goes live.

Warren

From my tests it appears that there is no way to set the turnTimeout though gameNetwork and the default timeout is set to never.

So opponents can currently bail on a game with no consequence. 

Hi @animonger,

Can you just do this “locally” on the player’s side, as in, when their turn starts you begin a timer and take the proper action if it expires? I’m not an expert on Game Center, but I’m merely suggesting a potential option which might work.

Brent

Hi Brent,

Thanks for the suggestion. Technically it would be possible but it would only work if the lagging player was logged into Game Center and had the game open to dispatch a quitMatch event.

With the GameKit turnTimeout date set, the Game Center server could determine the winner without the lagging player logged in.

Warren

Hi Warren,

I asked the engineers and they report that it’s set to “GKTurnTimeoutDefault” which is 1 week. Currently we don’t support letting the user change this value.

Best regards,

Brent

Thanks for the info, Brent!

1 week is the iOS GameKit default and will work fine for my game.

Maybe the time out isn’t firing for my tests because of the Game Center sandbox.

I’ll post an update when the game goes live.

Warren