If you are an iOS game developer, it's important to understand how Game Center differs from Google Play Games. This topic describes some recommendations to help you ensure that your game works seamlessly on both game services.
Implementing game features for Game Center and Google Play Games
While Google Play Games and Game Center support some similar game concepts such as achievements and leaderboards, the way that you implement specific features depends on which game service you are targeting.
Here are a few important implementation notes and recommendations to keep in mind when you integrate Google Play Games with a game that already uses Game Center, or vice versa.
|Game Feature||Game Center||Google Play Games|
|User sign-in||You should authenticate the player as soon as possible within your game; no sign-in button required.||Try to call
|Authentication||You should confirm that the player is still authenticated when your application returns to the foreground.||Implement the
|Achievements||Use achievement IDs that are unique in your app. You must provide the IDs to Game Center. These IDs do not have to be globally unique.||Use the achievement IDs in Play Games generated for you by the Google Play Console. These IDs are globally unique across all applications. To learn how to create achievements in the Google Play Console, see Creating an achievement.|
Game Center does not distinguish between incremental and non-incremental achievements. A player’s progress towards an achievement is represented by a completion percentage value. This value is absolute, and it is up to your game client to track the player's total completion progress.
To update the player’s achievement progress, supply its completion percentage. A value of 100% indicates that the achievement is fully unlocked.
Play Games achievements can be either incremental or standard (non-incremental).
To increment an achievement, supply the incremental number of steps the player has made towards completing this achievement. The service keeps track of the total amount of progress the player has made. To learn how to update a player’s progress towards incremental achievements, see Incremental achievements.
To unlock a standard achievement, call the
|You should submit updated achievement progress whenever the player makes any amount of progress.||You should submit cumulative achievement progress only once every few minutes to avoid getting throttled by the game service. To learn more about how to avoid rate limits for your app, see Managing quota and rate limiting.|
|Leaderboards||Use leaderboard IDs that are unique for your app. You must provide the IDs to Game Center. These IDs do not have to be globally unique.||Use the leaderboard IDs in Play Games generated for you by the Google Play Console. These IDs are globally unique across all applications. To learn how to create achievements in the Developer Console, see Creating a leaderboard.|
|In Game Center, you can use an optional
||Play Games provides an optional
|Game Center supports combined leaderboards (which add up the scores of other leaderboards) and leaderboard sets.||These types of leaderboards are not supported by Play Games.|
|When you submit a time value to a Game Center leaderboard, the unit of the value is interpreted as minutes, seconds, or hundredths of a second, depending on the format that you specified for the leaderboard in iTunes Connect.||When you submit a value to a time leaderboard, the unit of the value is always interpreted as milliseconds. For more information about the formatting of leaderboards, see Score formatting.|
|When you submit a currency value to a Game Center leaderboard, the unit of the value is interpreted as dollars or hundredths of a dollar, depending on the format that you specified for the leaderboard in iTunes Connect.||When you submit a value to a currency leaderboard, the unit of the value is always interpreted as 1/1,000,000 of the unit of currency that you specified in the Google Play Console. For more information about the formatting of leaderboards, see Score formatting.|
Best Practices for Coexistence
Follow these best practices when developing your iOS game so that it works seamlessly with both Game Center and Google Play Games.
Give both services equal prominence in your game
We recommend that both Game Center and Google Play Games are equally visible within your application. For instance, if you have buttons to view achievements, consider making the button for Game Center the same size as the button for Google Play Games.
One exception to the equal prominence guideline is that you should only pick one notification or banner to display when the user earns an achievement and is signed in to both services. For more information about hiding achievement notiifcations, see Hiding notifications.
To remind players that they are signed in to both services, you can display a
"Welcome Back" notification for each service when players resume your game. To
avoid having the notifications visually overlap, you can change the placement of
the banner for Google Play Games by setting the
Sync achievement progress
There are two common situations where Game Center and Google Play Games achievement progress can appear disjoint:
- A player initially signs in to Game Center to start playing your game, then later signs in to Google Play Games.
- A player initially unlocks an achievement while playing your game on their Android device, then continues playing the same game on their iOS device.
You should address both situations in your application; otherwise, it can create a poor experience for players if they see that an achievement is unlocked on one service, but see that same achievement still locked on the other service.
To sync the player's achievement progress on both services, take the following actions when you load the game (and the player's achievement data):
- If an achievement is locked on one service but unlocked on the other, make sure the achievement is unlocked on both services.
- Set the achievement progress to the higher progress value of the two services. For example, If an achievement is at 40% completion on one service, and at 60% completion on the other, set it to 60% completion on both services.
- Don’t show any notifications or banners again for achievements that the player already unlocked. Your user should have seen the notification already when they first earned the achievement. It isn't necessary to display the notification a second time.
Sync leaderboards only if appropriate
If a player is signed in to both Game Center and Google Play Games, you should submit the player’s high scores to leaderboards on both services. However, you don’t need to consistently keep high scores in sync across the different services as is the case for achievements. Since a player might be comparing their scores to potentially different sets of friends on the two services, it is less important for a player's score to stay consistent between the two. It might also be surprising for a user to see a high score on Game Center that they previously earned on their Android device.