If I'd want to implement multiplayer checkers game using game center API, does it mean that I don't have to write a server, and I'll be using game center's servers?
I'm new to game center, and I'd like to know its use.
Thanks.
Here is a great tutorial that will get you up and running in a couple of hours!
Beginning Turn Based Gaming with iOS5
Yes, Obsolutely you don't want to write any servers. The apple's Game Center handles it. First of all you need to import GameKit framework. It will maintain game center servers.In Game Center you have Leaderboards (Where you can see the scores of all players who are using your app), and Achievements (You can setup some achievements that when a user crosses particular scores 1000, 2000, 3000.. etc. in your app). The Leaderboards and achievements are two different viewControllers you can show them through coding. For More Details You can visit the following link http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html it is very clear. And if you have any doubts feel free to contact me. I have implemented Leaderboards and achievements recently, but not multiplayer features. And to perform all these you have to enable GameCenter in your iTunes account.
As matter of fact in order to have a good multiplayer game experience, you need to consider eventually writing server side code that saves the user data in your database.
I have experienced the same scenario and ended it up using Parse along with push notifications.
If you insist you can do the following with Game Center :
With Game Center services you can connect players to each others either by Real-Time Matches or Turn-Based Matches. Everything is fine as long as you don't care about the user data storage or the game experience!
Related
I made a game with cocos2d for iOS. and I will put a network kit for people to play multiplay game. but I wanna put also a ranking system so that people would see how well he does.
but I don't wanna make a server.. nor do something, so I just wanna use a game center leader board. Do you think is this OK?
I mean people play with random people and get a points if they win. so It shows on leader board as ranking. It's like "battle.net" of Warcraft 3 or Starcraft. Is it possible with just using game center?
[POINT]
- Can I play with random person?
yes you can totally do that! game center allows you to match users of the same groups , you can sort your users into groups, (example: by their level) and game center allows you to match users based on these groups
here you can read up about matchmaking in game center, of course you will need to read up on most of gamecenter docs as this is not so much of a plug and play piece of code
similarly it leads to here where they talk about player groups and how you sort your players into groups which you can add to your matchmaking request to sort matchrequest by groups so that players get someone of their own skill level
and yes it will be a random person
cheers
Yes, GameKit supports Leader boards.
In Game Center, a leaderboard is used to record scores earned by anyone who plays your game. Your game posts player scores to Game Center. When a player wants to see their scores, they bring up a leaderboard screen, either in the Game Center application or by viewing the leaderboard inside your game.
You can also use matchmaking to create games with random persons.
Your game can provide automatic matching to create a match. When you use automatic matching, players do not invite other players into the match. Instead, you send a request to Game Center and the player is connected into a match with any other players waiting to join a match (not just friends).
I've made an iOS game that works over both Bluetooth and bonjour. It works great both ways, but I'd really like it if players could play with eachother with any Internet connection, be it edge, 3G, or different wi-fi addresses.
The catch: I don't have the resources or knowledge to set up dedicated servers or anything like that. It seems that surely GameKit has something in it that will let me do this, but despite spending dozens of hours over the last week figuring out how to use it, I've found nothing.
So, does anyone have ideas for solutions? My game is just one on one, if that makes it any easier.
Why don't go through the Game Center with GameKit?
Apple provides all the infrastructure to play all around the world via their servers (in 3G or Wifi). With the Game Center you can play up to 4 players (so in your case there is no problem), it's free, you don't have to manage any server, there is a mechanism of invitation between friends, and many more.
The logic of your game stay in the client side, so it'll be same design as your actual game (expect for the API I think).
You can find all information on the official documentation here.
If you want, there is a very tuto on the ray wenderlich's blog (but it uses the cocos2d framework instead of the CocoaTouch).
Yep, try GameCenter with GKMatch - works really well if game doesnt need to send tons of data. If you make additional layer between your app and GKMatch and GKSession, you can use both transparently (so your game supports local AND global multiplayer). Tested, it works
I'm about to add highscore support to my mobile game and I have a basic understanding problem with leaderboard services like OpenFeint or Apples Game Center:
Suppose I'm logged in to OpenFeint and/or Game Center with my account. Then a pal of mine wants to play, I hand him my device and he gets the best score ever. Is there any way he can get his score listed under his name now? My understanding is that he can't, because when the game is over the score is saved, and it is automatically saved for the current account, which happens to be mine at that moment. Tough luck.
This would mean that if I play the game with my pal in turns we would constantly have to log in and out from both services after each game to get it right in the case that one of us gets a highscore. That seems a bit awkward...
Do I overlook something or is this just the way it works? Or do I have to take care for this situation as a developer? Or do the OpenFeint/GameKit SDKs handle this automatically somehow?
I don't know about Open Feint, but at least for Game Center I think the answer to your question is: Yes, that's just the way it works. Even if you know the Game Center id's for both you and your friend, you don't have the ability to save stats for anyone but the logged in game center player.
It does seems possible that they could have supported this use case, to allow more than one player to be "signed in" on a given device, and then the game could just present a "PlayerA", "PlayerB" button to choose who's playing, instead of having to run the Game Center app to do the switch. But I imagine this use case wasn't a super high priority. (They'd rather have each of you playing on your own devices. And in fact some services like ScoreLoop keep things simple by enforcing a single player per device, period.)
I'm more than halfway through development of my first iPhone game and I'm currently implementing Game Center features for devices that support it. I have successfully added leaderboard functionality, but have some questions on how to present the Game Center features to the user.
Should Game Center be on and active when the user first runs the app?
Or should Leaderboards and autosubmitting highscores be an option the user have to turn on?
Right now I only submit the score when the user gets a highscore to keep data transfers to a minimum. I just want to make sure the experience is as hassle-free as possible for both Game Center users and people who don't care about highscore/achievements.
I would love to hear from other developers how you chose to present these features!
I'm personally activating the Game Center immediately. If the user has opted in by logging in through Game Center application (or another game), why bug him? Turning off Game Center system-wide is easy. I'm also submitting leaderboard scores, since that allows me to see how many players (or at least Game Center users) enjoy playing the game continuously.
I don't think majority of users that are logged into Game Center would actually want choice. For comparison, OpenFeint provides the choice, but I find that annoying.
What about collecting all the data and only sending it when the users sends the application to the background or terminates it?
From my personal experience I like the Game Center Integration as intrusively as possible. A short notice while game boots and/or a small banner on the highscore table should avoid to much distraction away from your game experience.
From the Getting Started with Game Center doc
A player might have the same Game Center enabled game loaded on multiple devices. If your
app has reported progress on an achievement from one device, note that the same
achievement progress data will be provided by Game Center on other devices where the user
plays your game. However, other game state maintained by your app may not be in sync and
should be handled accordingly.
I'm relatively new to iOS development and about to begin researching how to sync local game state data (i.e. which levels the player has completed, which levels the player is currently on, etc.) between the different hardware (iPhone, iTouch, and iPad) running my game and I was hoping I could get some insight from the SO users on some good ways to do this. Do I need to build a web service for this? Can iTunes be used to sync this data? Is there an API specifically built for this?
Thanks for your wisdom!
I think using a web serivice and making a JSON post and request would be a good route.
One suggested method by Apple is to use the Application Preferences, which is backed up by iTunes when the user syncs the phone.
I use NSUserDefaults for this and and it works great!
iCloud is your ticket