Game Center Leaderboard: Best Practices

YodapolloYodapollo Inactive, Chef Emeritus Posts: 447
edited November -1 in News from the Dev Team
Hey, everybody!

Our dev & game teams got together and put together this awesome set of "Best Practices" for integrating Game Center leaderboards into your game.

Recommended practices:

1. Do not fire a Game Center behavior at the very beginning of a scene. Place it within a rule or within a timer so that Game Center behaviors don't fire at the beginning of a scene.
2. Do not try to fire all Game Center actions at once
3. Game Center will only work with published apps, not in Creator or Viewer. An ad hoc version can be used to test the leaderboards created in iTunes Connect for the game.
4. When creating your game, don't rapidly fire Login and Post Score actions.

Issue: I keep logging in and getting cancelled out

1. Login to Game Center
2. Error:There was an error logging into Game Center. The requested operation has been cancelled.

Explanation:

1. This occurs when a user has cancelled out of Game Center login three times
2. Every subsequent login attempt will display the Cancelled error

Work-around:

1. Open the Game Center app
2. Log into and then out of Game Center

Issue: My scores won't update in the leaderboard

1. Login to Game Center with one account
2. Post a score to the leaderboard
3. Login to Game Center with another account
4. Post a score to the leaderboard
5. The leaderboard may not display all scores from the different accounts, or it may show scores posted by one account under a different account

Explanation:

1. Leaderboard scores sometimes take a while to update

Work-around:

1. This is an Apple issue. Users may need to give Apple's Game Center servers time to update

Issue: Scores are appearing with the wrong account

1. Login to Game Center with one account
2. While in game, show the leaderboard and observe the name of the logged-in player
3. Login to Game Center with another account
4. While in game, show the leaderboard and observe the name of the logged-in player
5. Sometimes, the name of the player is "Me" and other times, it is the name of the player's Game Center account

Explanation:

1. Some versions of iOS display the player's Game Center account name, and other versions only show "Me"
2. This varies depending on the iOS version number and is an Apple feature

Issue: My game is crashing when I try to create a new account

1. In the Apple's Game Center app, log into and log out of an account
2. Start game
3. Initiate login
4. When the login prompt appears, tap the home button to cause the game to hibernate
5. In the Settings for your iPhone, enable Airplane mode
6. Return to the game
7. Click on Create New Account
8. Game crashes

Explanation:

1. This has been observed in Apple's Game Center test app as well and is likely an Apple issue.

Issue: My game locks up when I switch Game Center accounts

1. In the Apple's Game Center app, log into an account
2. Start game
3. Initiate login
4. Hibernate the game
5. Enter Apple's Game Center app, and log into a different account
6. Return to the game
7. User might be logged out at this point
8. Hibernate the game
9. Enter Apple's Game Center app and relogin to the account
10. Return to the game
11. After the login prompt appears and then disappears, game is locked

Explanation:

1. This has been observed sporadically, sometimes occurring 100% of the time and sometimes not at all
2. Suspect this is another Apple Game Center issue
«13

Comments

  • PhoticsPhotics Member Posts: 4,172
    What about the issue mentioned by tshirtbooth? I don't see how to detect if player's iOS device supports Game Center.
  • YodapolloYodapollo Inactive, Chef Emeritus Posts: 447
    The Game Center behaviors do that automatically and disable themselves if the device/iOS is not supported by Game Center.

    The user simply gets a message saying that Game Center is not supported on this device.

    --Yodapollo
  • PhoticsPhotics Member Posts: 4,172
    ...but what about buttons to launch leaderboards?

    Does that mean no custom buttons for launching Game Center?

    I noticed that the example template has a custom button, but if Game Center is not available... is there a custom alert?
  • YodapolloYodapollo Inactive, Chef Emeritus Posts: 447
    @Photics

    You can assign the behaviors to the actors of your choice. That means you can create custom Game Center buttons to launch your leaderboards. The login behavior pulls up Apple's login notification. Post Score will send score to the leaderboard you dictate. Show Leaderboard will bring the leaderboard you specify. The buttons these behaviors can be assigned to can be customized just like any other actor.

    --Yodapollo
  • PhoticsPhotics Member Posts: 4,172
    tshirtbooth said:
    It turns out you can have the buttons just the features need to be disabled.

    So Apple is OK with a button that doesn't work on iOS devices without Game Center? That doesn't seem right.

    It seems safer to simply hide Game Center buttons, and let players access the scores through the Game Center app... like Cut the Rope.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Photics said:
    So Apple is OK with a button that doesn't work on iOS devices without Game Center? That doesn't seem right.

    It seems safer to simply hide Game Center buttons, and let players access the scores through the Game Center app... like Cut the Rope.

    Apples guidelines say the app must be able to provide a gracefully fall back. That's it.
  • PhoticsPhotics Member Posts: 4,172
    jonmulcahy said:
    Apples guidelines say the app must be able to provide a gracefully fall back. That's it.

    What does that mean?

    What's a Leaderboards button going to do on an app without Game Center? If the answer is nothing, then I think that risks instant rejection.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    It will pop up an alert saying that game center is no supported on this device with an ok button
  • PhoticsPhotics Member Posts: 4,172
    jonmulcahy said:
    It will pop up an alert saying that game center is no supported on this device with an ok button

    Oh, so there is an alert. That's good!
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Please someone make a video of GC Leaderboards ad hoc Testing!
    Its not working for me.

    Cheers.
  • SRS777SRS777 Member Posts: 83
    MagoNicolas said:
    Please someone make a video of GC Leaderboards ad hoc Testing!
    Its not working for me.

    I to would love this I'm having trouble getting this going as well.
  • RiffelRiffel Member Posts: 1,272
    -goto itunes connect and enable/configure game center, take note de "scoreID" you choose
    -in your project ( use gamecenter template) change "com.gamename.scores1" for you "scoreID"
    -to test made an ahhoc using the same game ID (not gamecenter ID)
    -for every new version enable gamecenter

    sorry my english, hope you understand, good luck!

    RIM Games
  • beefy_clyrobeefy_clyro Member Posts: 5,390
    MagoNicolas said:
    Please someone make a video of GC Leaderboards ad hoc Testing!
    Its not working for me.

    Cheers.

    This would be a huuuuge benefit for all
  • PortymanPortyman Member, PRO Posts: 409
    Do I have to name leader board using the com.appname.leaderbaordname...

    Can I just call it leaderboard1
  • RiffelRiffel Member Posts: 1,272
    portyman said:
    Do I have to name leader board using the com.appname.leaderbaordname...

    Can I just call it leaderboard1

    just call it leaderboard1

    RIM Games
  • PortymanPortyman Member, PRO Posts: 409
    How can I post more than 1 leader board at a time. My second leader board is not posting.

    To answer my previous post, the leader board Id can be what you want.
  • quantumsheepquantumsheep Member Posts: 8,188
    Riffel said:
    just call it leaderboard1

    RIM Games

    Your leader board name needs to be unique to everyone else's. If someone else has a leader board called 'leaderboard1' then yours won't work.

    Best to use the com. System.

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • PortymanPortyman Member, PRO Posts: 409
    Can we stack 2 post scores on top of each other so that they will both post when you press post?

    I am only getting the top one to post to game center.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Please Someone Make a video of an Ad Hoc Test!
    Thanks!
  • SRS777SRS777 Member Posts: 83
    can any one post a link to the ad hoc instructions i can't find them any more.
  • mintmomegmintmomeg Member, PRO Posts: 261
    more question do I have to do my own keyboard or how can I use ios keyboard for add name... sorry for my pooor english
  • beefy_clyrobeefy_clyro Member Posts: 5,390
    mintmomeg said:
    more question do I have to do my own keyboard or how can I use ios keyboard for add name... sorry for my pooor english

    You do not need to do your own keyboard, one just appears for things like signing in
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Yodapollo said:
    3. Game Center will only work with published apps, not in Creator or Viewer. An ad hoc version can be used to test the leaderboards created in iTunes Connect for the game.

    I predict a lot of rejections if you don't test it thoroughly with an adhoc build. You could be prompted to think that everything goes well if those messages on the viewer are appearing. But it's not true. I had to test 4 builds before finding the correct placement of rules that didn't trigger error messages.

    Also I want to point to an annoying thing: when I open the app it logins successfully but the "Welcome" GC message appears in portrait direction and not in landscape. Can this be fixed? Or I'm doing something wrong?

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free high score demo here (simple) and here (advanced)
  • beefy_clyrobeefy_clyro Member Posts: 5,390
    Seems to be only portrait mode at the mo, i hope they give us the option to say what way we want it
  • LordTarantorLordTarantor Member, PRO Posts: 890
    It keeps telling me This game is not recognized by Game Center.
    I dont know what I am doing wrong. I know that for some of you this has been an easy process but for others it hasn't. Can somebody create a video like a step by step.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    LordTarantor said:
    It keeps telling me This game is not recognized by Game Center.
    I dont know what I am doing wrong. I know that for some of you this has been an easy process but for others it hasn't. Can somebody create a video like a step by step.

    If your phone is jail broken it causes that error message. Your adhoc build registers as a valid app, so it can't find the sandbox environment.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    I finally make it work, But I only see 0 Meters in Leaderboard, dunno why it says 0, Im posting a score that has a number that its not 0...
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    MagoNicolas said:
    I finally make it work, But I only see 0 Meters in Leaderboard, dunno why it says 0, Im posting a score that has a number that its not 0...

    are u trying to post more then one leaderboard at the same time?
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Nope, just one.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    jonmulcahy said:
    If your phone is jail broken it causes that error message. Your adhoc build registers as a valid app, so it can't find the sandbox environment.

    Thanks john, sorry for the delay, I was at work. My device is not jailbroken. Its been jailbrake free for a year now.
Sign In or Register to comment.