Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a quiz game, which i would like to integrate Game Center for. This is a "local" multiplayer game with the possibility to play six players per match.

Is it possible to submit scores to the Game Center leaderboard for all six players in this setup given that it is only one player, the one that owns the device, that is logged on to Game Center?

If so, how is that done?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

You cannot submit scores to game center for multiple players on a single device without forcing the players to log in and out of their GC accounts.

When you report a score to a leaderboard you only pass in the leaderboard ID you want to report the score to, not the player ID.

share|improve this answer
    
thanks, then i know :-( –  PeterK Nov 16 '12 at 22:48
add comment

As of iOS 7, it is now possible to submit scores for multiple players from one device. However, an app can do so only when ending the game, using the task endMatchInTurnWithMatchData:scores:achievements:completionHandler: in the GKTurnBaseMatch class.

From the documentation about this method:

endMatchInTurnWithMatchData:scores:achievements:completionHandler:
Ends the match while submitting all of the scores and achievements.
Parameters:
...
scores
An array of GKScore objects containing the final scores for every participant in the match.
...
Availability
Available in iOS 7.0 and later.

share|improve this answer
    
What is no longer true? Are you referring to the accepted answer? –  Seth Battin Apr 6 at 17:04
    
Yes. I have not had the chance to use the iOS 7 specific API I mentioned, but it should allow submitting scores for multiple players. –  David Dunham Apr 7 at 18:24
    
Sounds good, glad you answered with the latest info. I tried to edit your answer to make it stand on its own. Feel free to revert or improve, of course. –  Seth Battin Apr 7 at 18:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.