The AccelByte Gaming Services (AGS) Achievement service enables you to give a virtual reward or recognition to your players for completing a specific task within the game. You can set various types of achievements, such as incremental achievements, non-numerical achievements, and hidden achievements.
In this section, you will learn about the key concepts related to the achievement service, and best practices to utilize the service.
It is important to understand some of the key concepts that are used in the design of the Achievement service.
Achievement configuration provides a way for you to unlock an achievement, that you can set and adapt to suit your game. Each achievement configuration allows you to set up properites, such as the unique string identifier for the achievement, achievement type, achievement visibility, and more.
Instead of using a machine generated code, an achievement code is a unique string used to identify an achievement.
Examples of achievements:
Non-incremental achievement is a type of game achievement that is not based on numerical metrics or statistics. These kinds of achievements are usually based on a player's completion of certain objectives, milestones, or challenges, that don't require a goal value to be hit. These achievements do not require integration with the AccelByte Statistics service.
Here are some examples of non-incremental achievements:
- New Year, New Me!: login after new year to unlock the achievement
- First Timer: complete a single match to unlock the achievement
Incremental achievement is a type of achievement that is measured by a specific numerical value or quantity. These types of achievements typically require the player to complete specific actions to reach a certain number within the game.
The Achievement service will work in conjunction with the Statistics service. The value that is collected by the players will be stored in user statistics, and it will be used to check whether the value has met the condition that is set to unlock the achievement.
Here are some examples of incremental achievements:
- Sharpshooter: complete 100 headshots to unlock the achievement
- Treasure Hunter: collect 100 rare items to unlock the achievement
- Speedmaster: win 100 races to unlock the achievement
A Global achievement is an achievement that requires players to collaborate in order to unlock them. These types of achievements often involve a large number of players, and it requires them to achieve a certain goal value. It is similar to incremental achievement, because the contributed value will be stored in the AccelByte Statistics service, and only players who contributed can claim the achievement reward once the target is reached.
This is only available for incremental achievements. Statcode is an identifier from a Statistic configuration that stores the user statistics value that will be compared with the achievement goal value to unlock the achievement.
Goal value refers to the amount of progression that a player must achieve to unlock an achievement. It represents the statistics that the game uses to track players' progress towards completing a goal.
Goal Value is only available for incremental achievements and the value that is set in the goal value should not exceed the maximum value defined in the statistic configuration.
A hidden achievement is an achievement that is not shown to the player when they are locked. They are typically kept as a secret and not revealed to the player until they are unlocked.
The best scenario is to use the achievement service when you want to provide a sense of satisfaction and accomplishment for a player who completes a challenging task, or a significant objective within your game. Achievements can motivate players to engage with the game more deeply, and can encourage players to continue playing and exploring the game.
If you require your game to have a sense of competition amongst players, consider using the Leaderboard service, as you can display the players' rank and they can see how they are doing relative to others.