Game Center

by Jon (Updated on 2014-11-15)


  • Introduction
  • Starting Game Center
  • Reporting High Scores
  • Reporting Achievements
  • Displaying Boards
  • Troubleshooting



Game Center is an Apple-operated service that records high scores, achievements, and charts these types of stats against those of friends and acquaintances. If you’re familiar with XBox Live, it’s similar.

For Stencyl, we’re primarily interested in getting games to display and submit high scores and achievements.

Note: For brevity, we’ve assumed that you’ve set up Game Center in iTunes Connect - otherwise none of the following will work. If you have not done that, read this article (starting at Step 5) for details.


Starting Game Center

You must start the Game Center service through a behavior before using it. You want to do this as early as possible, preferably at the start of the game.

For example, create a behavior that uses the following block (located under Game > Mobile) and add it to your starting scene. 

When the Game Center bar appears, the player is signed in. 

You can check for this status using the following block, or you can use an Event (Add Event > Mobile > Game Center > Game Center is started) if you wish to be notified when this happens.

Reporting High Scores

To submit a score, use the block shown below (located under Game > Mobile). The ID is the Leaderboard ID you specified on iTunes Connect. The value should always be a number.

Note: Submitting a score does *not* pause the game. If you'd like to pause the game, consider using a Game Center event (Add Event > Mobile > Game Center > Game Center receives a score)


Reporting Achievements

To submit an achievement, use the block shown below (located under Game > Mobile). Use the Achievement ID you specified on iTunes Connect. The value must be between 0 - 100 inclusive.

Note: Submitting an achievement does *not* pause the game. If you'd like to pause the game, consider using a Game Center event (Add Event > Mobile > Game Center > Game Center receives an achievement)


Displaying the High Score and Achievements Boards

Displaying the high score or achievements board involves the following blocks (located under Game > Mobile). Like before, in the leaderboard case, you want to specify the Leaderboard ID entered into iTunes Connect.

Using these blocks in a behavior will cause the boards to slide in.



Scores and Achievements not showing up?

Sometimes you have to wait a few hours for the data to show up in Game Center. This seems to afflict those who are far from Apple's server farms in the US, particularly Europe.

Another common cause is that sometimes, Game Center requires that at LEAST 2 players need to submit scores for the board to show up at all.


Game Center doesn't work at all in iOS 7 for my app. I canceled Game Center a few times.

Is a user has canceled Game Center 3 or more times, Game Center is permanently disabled for that app. The following post explains how to reverse this. 



Game Center doesn't work in iOS 8 while I'm testing it.

Solution - You must enable Game Center Sandbox Mode. Consult the following page.



Disclaimer: All articles are geared towards Stencyl 3.0 and above. Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!


Does this works on Android?
0 3 months, 4 weeks ago
All outstanding issues with Game Center (especially on iOS 7) were resolved a few months back.
0 1 year, 7 months ago
I can't get the leaderboard to launch on the iPad without crashing my game. Any ideas?

Also, the leaderboard almost always goes to my default leaderboard instead of the leaderboard for the specified ID.

1 2 years, 3 months ago
Cleaned up and updated for Stencyl 3.0.
0 2 years, 4 months ago
That's correct. You use the ID of the board. It's coincidental that the names used above looked like real names, but were in fact IDs.
0 3 years, 1 month ago

I had no luck displaying the right Leaderboard with using its name, like described above. But using the ID of the board instead fixed the issue!

0 3 years, 2 months ago

Sign In to Comment