3

From the research I've done, GameKit seems to be mostly about leaderboards and achievements. I am trying to develop a turn-based game like Words with Friends or Checkers. Can GameKit be used for this? The Game Center app seems to require you and your friend to simultaneously have the app open and invite each other to play. I want the Words With Friends approach where you receive notifications that your friend has made a move. Can GameKit do this?

If not, how is this achieved?

sol
  • 6,402
  • 13
  • 47
  • 57

5 Answers5

3

GameCenter can be utilized for both real-time and turn-based, check out the tutorial here: http://www.raywenderlich.com/5480/beginning-turn-based-gaming-with-ios-5-part-1. It has two parts with the second one contains most of the game logic. The project code is also downloadable.

Anh Nguyen
  • 5,245
  • 1
  • 20
  • 18
2

I've some suggestions for you. You can use GKTurnBasedMatch class for the reference. In GKTurnBasedMatch you will find

1)Retrieving Existing Matches,

2)Creating a New Match,

3)Retrieving Information About the Match,

4)Retrieving the Match’s Custom Data,

5)Handling the Current Player’s Turn,

6)Leaving a Match,

7)Ending a Match and Deleting a Match From Game Center.

However you can also read detailed description here about this class. For more details visit following link.Thanks

http://developer.apple.com/library/ios/#documentation/GameKit/Reference/GKTurnBasedMatch_Ref/Reference/Reference.html

Gajendra K Chauhan
  • 3,387
  • 7
  • 40
  • 55
2

It's worth checking out the new GameKit APIs in iOS 5. GKTurnBasedMatch should probably do the trick if you haven't rolled your own solution yet.

Joe Osborn
  • 1,145
  • 7
  • 10
2

Using GKTurnBasedMatch in the new iOS 5 SDK will allow you to do this

Jonathan Brown
  • 3,644
  • 3
  • 25
  • 31
-4

GameKit / Game Center can be used to solve many of the social gaming aspects you might need, but the actual game play (ala Words with Friends) would need a server that has web services created specifically for the rules of your game.

There are many threads here about webservices, here are a few:

Community
  • 1
  • 1
NWCoder
  • 5,296
  • 1
  • 26
  • 23
  • So what is Game Center Matchmaking good for? You can only find someone to play with, but not actually play the game? – sol Mar 15 '11 at 22:10
  • it can be used to play real-time multiplayer games.. Turn-based yes.. but you cannot quit the app.. – xuanweng Mar 16 '11 at 05:51
  • 1
    GKTurnBasedMatch class is ideal to pass game data around in such games - no need for any kind of extra webservices you mention. – kervich Feb 14 '13 at 08:58