Game Center Achievements - does the banner show in-app when the achievement is attained?

I’ve a quick question for those who’ve implemented game center achievements in Xcode.

The plugin comments say this about submitting achievements:

Submit an achievement with a percent complete amount (0.0 - 100.0)
 gamecenter.submitAchievement( “AchievementID”, percent )

So, say I have an achievement that is “Kill 5 goblins”. So, for each goblin killed, I submit 20%. The question is, am I supposed to track the percent completed in-app?

In other words, is it:

kill goblin 1
submit 20%

kill goblin 2
submit 40%

kill goblin 3
submit 60%


or, does game center track this for me, and I just submit 20% for each goblin killed?


No, Game Center will not track it. If you want the percentage to change you need to submit the new percentage.

@MrCoxall great, thanks!

2nd question. Has anyone tried having an achievement that’s “Kill 3 goblins” and then submitting 33.3333333333333? Or is it better to stick to numbers that go cleanly into 100?

@yojimbo2000 In that case I would just round down so and only submit whole numbers, so in your case - 1 goblin killed = 33%, 2 = 66% and then all goblins killed = 100%

@TechDojo thanks, I don’t know why it didn’t occur to me to floor it.

I have a couple more questions.

Testing this on TestFlight, and the achievements seem to be working (when I look at the the achievement board, I can see that I’ve completed some), but the banner at the top of the screen saying that an achievement has been reached didn’t show. I see the banner saying “welcome back to Game Center” when I first fire up the app, but then that’s it. Does anyone else have this issue? Or can you see the banners appear at the top of the screen as each achievement is earned? Is there some setting I need to adjust in Xcode to allow this?

Second, it looks as if the API doesn’t support the read gamecenter command ( loadAchievementsWithCompletionHandler)? So, does that means that in effect, our API is not fully supporting cross-device play? In other words, if someone has the game installed on an iPhone and an iPad, and they progress 60% towards an achievement on the iPad, then when they start playing on the iPhone, that achievement will be at 0%, and they’ll have to catch up to the 60% before new progress will be recorded. Have I got that right?

Can anyone with a Codea app with Game Center achievements answer this? In your app, does the achievement banner display in-app when the achievement is attained? Currently, in my testflight distribution of the app, the banners aren’t displaying, but the achievements do otherwise seem to be working. But I’d like to know whether the banners not showing is because it’s a testflight rather than a final release, or because I missed some setting in Xcode, or whether that this is just how the gamecenter plugin operates.

Thanks in advance