Questions tagged [gkturnbasedmatch]

The GKTurnBasedMatch class allows your game to implement turn-based matches between sets of players on Game Center. A turn-based match uses a store-and-forward approach to share data between the participants.

The GKTurnBasedMatch class allows your game to implement turn-based matches between sets of players on Game Center. A turn-based match uses a store-and-forward approach to share data between the participants.

When a player participating in the match performs actions that advance the state of the match, your game describes the new state of the match and decides which player acts next. The next player to act is notified by a push notification.

Later, when the next player launches your game, you download the match data from Game Center and continue the match. Players take turns acting (based on whatever internal logic your game implements) until the match ends.

One advantage of turn-based matches is that a player may participate in multiple matches simultaneously.

104 questions
4
votes
0 answers

Implement my own a custom GKTurnBasedMatchmakerViewController

I'm sure there are questions similar to this, but I couldn't find an example. I'm trying to recreate the apple GKTurnBasedMatchmakerViewController for my turn based game with my own custom interface for my turn based iphone game. I'm having…
4
votes
1 answer

Not sending turn with GKTurnBasedParticipant IOS 5 iphone

I am developing an app for iPad and iPhone with the Game Center Feature. The game is sending correctly one participant turns from iPad 2 IOS 6, but when I try to send the turn to another participant from an iPhone 4 IOS 5 the following error…
Aitul
  • 2,982
  • 2
  • 24
  • 52
3
votes
2 answers

GKTurnBasedMatch recognizing the playergroup

I' m working on a gamekit turnbased match. It's a wordgame in different languages. The player has the option to set the language for every game he wants to play. I would like to use the GKMatchRequest's playergroup property to differentiate between…
3
votes
2 answers

When using GKLocalPlayerListener's receivedTurnEventFor match, is there a way to determine if the turn event is the result of a matchmaking find?

In iOS 9 Apple deprecated the public func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, didFind match: GKTurnBasedMatch) method of the GKTurnBasedMatchmakerViewControllerDelegate. Apple's direction is to…
Stuart Breckenridge
  • 1,873
  • 1
  • 16
  • 18
3
votes
2 answers

iOS 10 GameCenter Invites via Messaging

We were utilising Turn Based Games via GameCenter since iOS 6, once it was introduced (running absolutely same code for years). However, since iOS 10 invites do not work any more. The person being invited does receive a message in Messages saying…
3
votes
2 answers

When does player(_:wantsToQuitMatch:) get called?

I'm implementing my first Turn Based game with Game Center, and I'm having a difficult time understanding who receives the notification from player(_:wantsToQuitMatch:). Does the current player who is quitting (via some in-game quitting method) get…
coopersita
  • 5,011
  • 3
  • 27
  • 48
3
votes
1 answer

Player swipe to remove match

Let's say I have a turn based match with two players. At some point player 1 recognizes that he is about to lose the game. When it is Player 1's turn, he uses Game Center App to do a swipe to remove the match. Issues: A. Take turn timer never…
EmilyJ
  • 872
  • 2
  • 8
  • 19
3
votes
1 answer

How do I reply to a GKTurnBasedExchange? GKLocalPlayerListener delegate receivedExchangeReplies is called intermittently

There are a handful of posts discussing how Game Center's push notifications were fairly unreliable in the sandbox. However, the sandbox is obfuscated with iOS 9 so, I'm not sure why my Game Center push notifications are so unreliable. When I reply…
STANGMMX
  • 973
  • 7
  • 18
  • 31
3
votes
1 answer

GameKit turn-based matches and communication with server error

When sending a turn, endTurnWithNextParticipants frequently (perhaps 30%-50% of the time) gives: Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." However, after sending…
cdub
  • 180
  • 1
  • 12
3
votes
2 answers

GameKit turn timeout

GameKit allow us to end a turn with a timeout for the next participant in the match. However, I couldn't find a way to set a timeout for the first participant for its first move. Is there anyway to do that? EDIT It started to make sense to me why…
mdonati
  • 1,049
  • 11
  • 24
3
votes
1 answer

How to remove Game Center game with 0 participants

I'm trying to clear all my matches in Game Center, and I'm using the following code to do so: if ([GKLocalPlayer localPlayer].authenticated == NO) { [[GKLocalPlayer localPlayer] setAuthenticateHandler:^(UIViewController* viewcontroller,…
MadShark
  • 139
  • 1
  • 9
3
votes
3 answers

GameCenter turn based matchmaking

I have a question about GameCenter's turn based functionality. The free version of the app will let users create a maximum of 3 matches at a time, and will block any attempt to create an auto-match or invite another player. My problem is the…
Macaret
  • 797
  • 9
  • 33
3
votes
0 answers

How to manage Game Center Invitation custom view

I am developing a Turn Based game for iPhone/iPad IOS 6. I manage my GameCenter different games of the game with my own view. It works OK. I want to know if it is possible to manage user invitations to play the game with my own view. If this is not…
Aitul
  • 2,982
  • 2
  • 24
  • 52
3
votes
1 answer

GKTurnBasedMatch receive data

I am trying to implement a turn-based app, and there is no problem with sending turn data, but I see no way of receiving data automatically. So far, I have found out that much: There is a GKTurnBasedEventHandlerDelegate-protocol. It is easy to…
arik
  • 28,170
  • 36
  • 100
  • 156
2
votes
2 answers

GKTurnBasedEventListener could not be set to delegate of my ViewController?

In objC the syntax written by Rawendrich for GKTurnBasedEventListener, which was GKTurnBasedEventHandler there at that time, now changed by Apple is as below. if (!gameCenterAvailable) return; void (^setGKEventHandlerDelegate)(NSError *) = ^…
Asim Khan
  • 508
  • 1
  • 7
  • 21