Achievements can be a great way to increase your users' engagement within your game. You can implement achievements in your game to encourage players to experiment with features they might not normally use, or to approach your game with entirely different play styles. Achievements can also be a fun way for players to compare their progress with each other and engage in light-hearted competition.
To learn how to implement achievements for your platform, see Client implementations.
To understand how achievements work, you'll want to be familiar with some of the attributes associated with them.
These basic elements are associated with every achievement:
- Id is a unique string that is generated by Google Play Console. You'll use this unique ID to refer to the achievement in your game clients.
- Name is a short name of the achievement (for example, "Master Pieman"). The value can be up to 100 characters.
- Description is a concise description about your achievement. Usually this tells your player how to earn the achievement (for example, "Bake a lemon meringue pie before sundown"). The value can be up to 500 characters.
- Icon is a square icon that is associated with your achievement. For best practices when creating your achievement icons, see the Icon Guidelines section.
- List order is the order in which the locked achievements appear when a player views the achievements associated with your game. This can be in any order that you like. Unlocked achievements appear at the top of the list in the order achieved.
Achievements can be in one of three different states:
- A hidden achievement means that details about the achievement are hidden from the player. Play Games Services provides a generic placeholder description and icon for the achievement while it's in a hidden state. We recommend making an achievement hidden if it contains a spoiler you don't want to reveal about your game too early (for example, "Discover that you were a ghost all along!").
- A revealed achievement means that the player knows about the achievement, but hasn't earned it yet. Most achievements start in the revealed state.
- An unlocked achievement means that the player has successfully earned the achievement. An achievement can be unlocked offline. When the game comes online, it syncs with Play Games Services to update the achievement's unlocked state.
Achievements can be designated as standard or incremental. Generally, an incremental achievement involves a player making gradual progress towards earning the achievement over a longer period of time. As the player makes progress towards the incremental achievement, you can report the player's partial progress to Play Games Services.
The Google Play service keeps track of the progress information, alerts the game when the player has met the criteria necessary to unlock that achievement, and tells the player how far along they are towards meeting that goal.
Incremental achievements are cumulative across game sessions, and progress cannot be removed or reset from within the game. For example, "Win 50 games" would qualify as an incremental achievement. "Win 3 games in a row" would not, as the player's progress would be reset when they lose a game. "Have 5,000 poker chips" would not qualify either, as a player could gain and lose chips as they play. For the latter two achievements, it's up to you to track the player's "Wins in a row" state or chip total and to unlock standard achievements when the player earns them.
When creating an incremental achievement, you must define the total number of steps required to unlock it (this must be a number between 2 and 10,000). As the user makes progress towards unlocking the achievement, you should report the number of additional steps the user has made to Play Games Services. Once the total number of steps reaches the unlock value, the achievement is unlocked (even if it was hidden). There's no need for you to store the user's cumulative progress.
Achievements have a point value associated with them. The player's score must be a multiple of 5 and a game can never have a total of more than 1000 points for all of its achievements (although it can have less). In addition, no single achievement can have more than 200 points.
Track experience points (XP)
Players can gain levels on their Game Profile when they earn achievements in Play Games enabled games. For every point associated with an achievement, the player gains 100 experience points (XP) when they earn that achievement. In other words:
XP for an achievement = 100 * (point value for the achievement)
Play Games services keeps track of the XP earned by each player and sends out a notification to the Google Play Games app when the player has earned enough points to 'level up'. Players can view their level and XP history from their Profile page in the Google Play Games app.
A game that integrates achievements should have at least five achievements before it is published. You can test with fewer than five achievements, but it is recommended you have at least five achievements created before you publish your game.
The number of achievements is limited by the points limits and distribution. With a maximum number of points of 1000, and each achievement assigned 5 points, the maximum number of achievements is 200. However, if achievements are assigned more points then the number of achievements available decreases as a result.
Icons should be created as 512 x 512 PNG or JPG files. You only need to provide us with the icon for the unlocked achievement. We will generate a grayscale version for the revealed icon automatically. For that reason, we recommend your achievement icons include colorful elements, so your users can easily distinguish between revealed and unlocked achievements.
When an achievement icon is displayed in an Android toast, the icon is overlaid with a circle and its outer corners are hidden. Make sure that your icon still looks good under these circumstances.
The same icon is used in all locales, so we recommend against including any text or localized content in an icon.
Create an achievement
This section describes how to create achievements for new and published games.
To create an achievement for a new and unpublished game, go to Google Play Console entry for your game under the Games with Game Services tab.
Select the Achievements tab on the left, and click the Add Achievement button.
Then, simply fill out the information required for this achievement.
Click Save, and your achievement will be made available in "Ready to publish" mode. Once you publish your game, all of your game's achievements will be published with it.
To create an additional achievement for a game that has already been published, follow the same steps as above. The only difference is that the Save button will be relabeled as Save as draft and your achievement will be in a "Ready to test" mode. For more information on testing an updated version of a game, see Publishing Your Game Changes.
Once you've tested your achievement and are happy with it, you can republish your game with the new achievements, and they will be pushed out to the world.
Edit an achievement
To edit an achievement that you've already created, select the achievement in the Achievements tab of Google Play Console. At this point, you will see the same form you used when first creating the achievement, and you can edit any of the fields as you wish.
When you're done editing an achievement, click the Save as draft button. The newly edited achievement will be in a "ready to test" stage, and you'll be able to test it out. If it is working correctly, select Republish from the drop-down list. This republishes your game, along with all your updated achievements, to the public.
Undo an edit
If you decide you don't like your current achievement and want to go back to your achievement the way it was before, select Revert from the drop-down list in Google Play Console, and all of your achievements will revert back to the previously published version.
Delete an achievement
Once your achievement has been published, it cannot be deleted.
You can only delete an achievement in a pre-published state by clicking the button labeled Delete at the bottom of the form for that achievement.
Reset an achievement
You can only reset player progress data for your draft achievements.
- To reset achievements in Google Play Console, click the button labeled Reset achievement progress at the bottom of the form for that event.
- To reset achievement data programmatically, call the
Add translations for achievements
You can specify your own translations for achievements that are associated with your game. Before you do so, first make sure to complete the steps described in Adding translations for your game. You must also have created one or more achievements for your game.
To add your own translations for achievements, open the Achievements tab for your game in the Google Play Console, then select an existing achievement. On the achievements details page, select the tab for a language that you previously added in the Game details tab. In the achievement details page for that language, edit the form with your translations for that achievement. Click Save to store your translated achievement details.
To learn how to implement achievements for your platform, see the following resources: