New Apple’s Game Center and how to prepare the Achievements System for the iOS 14

Vinícius Higa
Academy@EldoradoCPS
6 min readJul 2, 2020
The renewed dashboard! Credits by Apple!

On the past week we saw the big event made by Apple, which is called Worldwide Developers Conference (WWDC) 2020!

At one of the sessions we had a big surprise of Apple’s bringing / reinnovating the Game Center, which is a platform / social gaming network that brings the possibility to developers implements the following features in their games:

  • Leaderboards: For ranking the best of your friends or showing the best ones of the world!
  • Achievements: Who doesn’t like to earn rewards by putting effort in something?!
  • Multiplayer: For matchmaking the players worldwide or between friends! You decide!

So… As the title says… I’ll present you the new features about the new Apple’s Game Center and how to implement the Achivements System!

Redesigned User Experience and Interface

There’s a new feature that we can look from the sessions of the WWDC in this year… We call this new feature the “Access Point” (or just “A.P.”), where you can press on your game center’s user icon on the screen and open the social dashboard!

There is some pictures below that I took while playing with the simulator (iPhone 11) with iOS 14.0 beta.

The first screen you'll see here it's the normal notification that you are used to be to see while gaming!

Now that "push notification" stays fixed as an icon!

Wait… Now on that second screen there's the new feature! The "Access Point"! In that case I made stay fixed on top-leading area!

Ladies and gentlemen that is the “Access Point” on the top-left!

If you click on it, it will open the dashboard for showing the list of friends, achievements challenges and also the player can invite someone to play together!

The renewed dashboard!

There is an example when I tapped into the Achievements part!

A "list" of available achievements!

In my opinion this reminds the Steam’s overlay and that’s a cool thing! Because… Imagine you are in the middle of a conflict in a game and you want a help from your friends and then you just click on the “A.P.” and “bam”! There’s your friends list to invite someone!

About the new Human Interface Guidelines (HIG)

There are some design tips that Apple recommends before we get into the step of development, because we need somehow to make the game center's "Access Point" visible and without interfering the user’s experience!

With the new “Access Point” feature we need to “hide” the icon somewhere in our game screen that we are developing! So… Where we need to “hide” it?! According to Apple’s HIG, it says that it is recommend to be put on the top-center of the screen, when in portrait mode and on the top-leading part, when in landscape mode.

Implementing the Achievements System from the Game Center

Well… While we wait for the launch of the new redesign of the Game Center for we developers, we can still implement the Achievements System by just downloading the XCode Beta 12.0!

The first thing you should do it's to authenticate with the Game Center! But if you don't know how to authenticate… In some another post here in Medium I'll teach how to add the Game Center to your Game!

The second thing you should do it's to add the following code into your entry view controller of your App (in my case I just added into my main UIViewController) to enable the "Access Point" and the Highlights (the banner for showing the Achievements):

The GKAccessPoint is the class that handles the "Access Point" itself and inside of it there is a Singleton where you can share globally

The third one… You need to go to App Store Connect and click on the Features Tab / Game Center. Scroll down until you see the following session:

In this screen you must click on the plus button to add a new Achievement. It'll show for you a screen to add information about an Achievement you want to add… So feel free to be creative (better than me hahaha)!

One thing to note is that you can make an Achievement hidden (secret)… So the user can't see the Achievement until someone one of the world get it!
Here you add the image (icon) for that Achievement, the title and it's description in certain language
Well… We can make some messages here to challenge the player, right?!

So… After making some "challenges" for the users… You must save and then you'll see the list of Achievements on App Store Connect updated!

I guess I must be more creative by creating theses achievements hahaha

Finally… Let's go back to XCode and add some code!

But… Wait… Before everything there are 2 things you must know!

The first one is the GKAchievement class, because it's where we set the status / percentage of completing of an Achievement, also if we want to be shown to the user! A tip that I can give as a part of game design is if the Achievement you made must be hidden… So if it must be hidden, it'll be cool to not show the banner!

The second thing is that you must get the "Achievement ID" for each Achievement you want to update it's status. You can check on the previous steps where you can get!

The third one is about the function called "report"! That function reports into game center the progess of certain Achievements and returns into a callback if the update was successful!

Coding time!

In my case I have added when the player starts the game for the first time… So when I click on the icon and start to play the idea is to show that Achievement called "Hello World"!

Now… The time of truth!

It works! Yay!

Conclusion

In my opinion that new reinvented Apple's Game Center it'll be the best thing for us game developers, because it brings the feeling to the final user that is playing on a gaming console or on a game from steam where you can interact with the worlwide or with the friends at any time when he/she is playing.

Implementing the new feature called "Access Point" it's very easy, because you only need a device with iOS 14 (currently in Beta) and practically 3 lines of code in Swift and knowledger of Human Interface Guidelines to bring a better user experience (UX).

After adding the "A.P.", it's also easy to add the Achievement part (of course disregarding the game center's authentication), because you only need to access the App Store connect and add a desired Achievement. Futhermore, you only need to update it's status on the code and reporting it.

So… That's all folks!!! =)

Did you like it? Press the like button! But… If you don't and if possible leave a constructive comment for me please! Thank you!

--

--

Vinícius Higa
Academy@EldoradoCPS

iOS Sw. Engineer @ CI&T and student of MSc in Computer Science (Deep Learning)