problem in gamecenter - iphone

I am facing some problems, that is, In my application the gamecenter works fine , but when ever I run another application then the multiple player list not showing... when I click on the all month data (ie,. who is playing that game) it will give me only my info. not giving me the full detail

From Apple's Game Kit Programming Guide:
To help you test your application, Apple provides a sandbox environment for Game Center. This sandbox environment duplicates the live functionality of Game Center, but is separate from the live servers. The sandbox allows you to test your Game Center features without making your application visible to regular users.
When you log in to Game Center on the app you're developing, you're logged in to the sandboxed version of Game Center (for apps in development). To log back in to the standard Game Center environment, log yourself out and log back in from a different (i.e. released as opposed to in-development) game.

Related

Game Center Mutliplayer

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!

Game Center Leaderboard Issues

I have successfully put game center leaderboards into my app with them updating the highscores correctly so I'm not worried about that.
The problem I am having is even though they are displaying and updating correctly in my app, when I view the leaderboards in the game center app it says there are no scores???
Anyone else has this trouble???
Disco
It seems there is just a delay between the gamecenter servers and the saving of highscores when developing.
While you develop your app all scores get submitted to the sandbox gamecenter servers.
Maybe you are logged in the live servers with the game center app ?

Best practice: Presenting Game Center options in iPhone game?

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.

What are some ways I can sync iPhone Game data between multiple devices?

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

Game Center API + In-App Purchases API = Two different user accounts for a single app?

If I have an app that supports Game Center and I'd like to provide Achievements for completing a puzzle pack that's sold as an in-app purchase, how do I sync the iTunes account that's being charged for the in-app purchase with the Game Center user account that's doing the buying? As I understand it, they're two separate user accounts that are accessed in two different locations (The Game Center account is accessed in the Game Center app and the iTunes account is accessed in the Settings app).
How do I avoid this from happening...
Game Center Player1 logs in, runs my app and purchases a puzzle pack
Game Center Player1 logs out, Game Center Player2 logs in, runs my app and plays to completion the puzzle pack that Player1 purchased and Player2 is awarded the Achievement.
Game Center Player2 logs out, Game Center Player1 logs in and finds the puzzle pack he/she purchased as already completed, so Player1 is unable to gain that same achievement.
Am I misunderstanding something with how these user accounts work? If not, is there a way to sync a Game Center account with an iTunes account as players log in and out of my game? Is there any kind of a work around for this problem? This seems like it would be a fairly common issue with any multiplayer games that sell content.
Thanks so much!
That is a good question. :) As far as achievements go, I guess you could store them on the device with the playerId from the logged in GKPlayer, and once an achievement has been finished for a logged in player, you synch with Game Center.
As far as synching iTunes and Game Center accounts I really don't know. Usually you store some information on whether a purchase has been made (i.e. a feature available) on the device. Would it be logical that using that feature (or being allowed to use it) should be device dependent, not GC user dependent? But then what happens if someone uses their account to just download your content again and again to their friends' devices?
Hmm... I hope some other people will share their thoughts on this. But I found that Game Center questions receive very low views and answers :(
So here's how I'm going to do this, it's actually a fairly straightforward approach. I'm going to locally track users progress in the purchased puzzle packs using core data, since it's quick to get up and running. Each time a new GC user logs in, I'll create a new user object and track their progress in the puzzle packs and report the achievements in GC when needed. When that GC user logs in later, I'll just adjust the state of the puzzle packs to match their current progress defined in core data. This way, any iTunes account can purchase the puzzle packs and they'll inherently be available to anyone using the device. Whenever any GC users log into GC and play my app, they'll all have access to the same purchased puzzle packs, but their progress and achievements will be maintained independently of other GC users.
If GC isn't installed on the device, I can disable all GC features and just init the app as tho there's only one default player.
Should be simple to do.
I am trying to come up with the solution to resolve this issue as well. If using the server product delivery mode, the problem could be largely resolved. The application sends the purchased items to server;sever deliver the item to application after checking credentials. There are some corner cases I still don't know how to resolve, basically to handle the case when the whole flow is interrupted, which depeneds on the implementation of IAP. Still not 100% sure yet.
Could you keep a record on the phone about which achievements have been bought by particular users, and then check which user is on and either enable or disable the purchased content - you'd have to have a means of keeping track of different players progress (I can see potential problems where a user might not be logged in to GC, etc etc). I haven't done this yet, tho I'm planning it for my next game.