5 Replies
      Latest reply on Jan 25, 2019 8:39 AM by PBK
      dlshores Level 1 Level 1 (0 points)

        I am working on a two player turn based game.  I'm struggling to undestand the informaiton flow of starting a match, exchanging moves and saving status to the local device and to Game Center.  However while looking at the GameCenter documents at apple.com they all seem to lead to depricated functions.


        Is there and example using non-depricated functions?


        When starting a match, when will the remote player be notified of the match starting?


        When ending a turn and sending data, do I send all of the game data or just the current move?


        Do I have to have two seperate devices with seperate phone numbers or just apple ids?  I have two apple id's, one of my phone and one on my iPad, but I can only invite my phone from my ipad because the ipad does not have a seperate phone number.


        I have more questions, but for now if I could just get the match to be started on both devices it would be a good start.  Any help with that would be appreciated.

        • Re: GKTurnBasedMatch
          PBK Level 7 Level 7 (3,145 points)

          I am unfamiliar with a turn based match.  But with a real time match (and I think they are similar if not identical) there are two avenues you need to cover (the inviter and the invitee).  In one, you just present a GKMatchmakerViewController to invite someone; you use that to invite;  it returns to a matchmakerViewController:didFindMatch:  and your done.  In the other you get invited through Game Center and you 'accept'; you get a call to player:didAcceptInvite:  you display a GKMatchmakerViewController and that then returns to a matchmakerViewController:didFindMatch:  your done.




            • Re: GKTurnBasedMatch
              dlshores Level 1 Level 1 (0 points)

              Thanks for the reply, I've read and followed that documentation.  Currently I can send an invite from one device to the other and it shows up as a message.  When I touch the invite a popup appears saying retreiving and then goes away with nothing happening.  I assume there is some action I need to take in the code to process and activate this but I am unclear on that.  What needs to be done and where in the documentation is it?