Access
Connect cross-platform accounts & identity management
Achievements are a tool developers can use to increase player engagement with their game. Recognizing players’ progress in your game and rewarding them with items or new characters not only fosters deeper enjoyment of your game but brand loyalty as well. There are two main types of achievements: incremental and non-incremental. Both of these types are explained below.
Incremental achievements work in conjunction with our Statistics service. When a player’s stats are updated, the Achievement service checks if the conditions for any incremental achievements have been met. If the conditions for an achievement have been met the achievement will be unlocked. Here are a couple examples of incremental achievements:
Non-incremental achievements don’t require a goal value to be hit, and as such do not need to be integrated with the Statistics service. Here are some examples of non-incremental achievements:
You’ll need the statistics code you created earlier when you fill in the configuration form.
Permissions are used to grant access to specific resources within our services. Make sure your account has the following permissions before you attempt to manage achievements in the Admin Portal. For a full list of permissions that impact achievements management, see the Achievements tab of the permissions reference.
Usage | Resource | Action |
Create New Achievement | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Create |
Export Achievement Configuration | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Read |
Import Achievement Configuration | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Update |
Query All Achievements | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Read |
Get an Achievement | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Read |
Update an Achievement | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Update |
Delete an Achievement | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Update |
Update Achievements List Order | ADMIN:NAMESPACE:{namespace}:ACHIEVEMENT | Update |
Query User Achievements Include Achieved and In-progress Achievement | ADMIN:NAMESPACE:{namespace}:USER:{userId}:ACHIEVEMENT | Read |
Unlock an Achievement | NAMESPACE:{namespace}:USER:{userId}:ACHIEVEMENT | Update |
Permissions work slightly differently depending on whether they are assigned to IAM Clients or Roles assigned to users. For more information, read the Authentication and Authorization documentation.
You’ll need the statistics code you created earlier when you fill in the configuration form.
On the Achievements page of the Admin Portal, click the Add Configuration button.
Once the form appears, fill in the appropriate fields.
Click Add. Your new configuration will be added to the list.
You can export your achievement configurations in JSON format by following the steps below.
In the Achievements menu of the Admin Portal, open the dropdown menu next to the Add Configuration button and choose Export Configuration.
The download will be started. Once it’s finished, open the JSON file to see your achievement configs.
In the Achievements menu of the Admin Portal, open the dropdown menu next to the Add Configuration button and choose Import Configuration.
The Import Configuration form will appear.
Click Import.
Confirm the import configuration by typing IMPORT in the pop-up form below.
There are two ways to unlock a player’s achievement: either from Game Client or from the Game Dedicated Server.
Note that this function can only be used for non-incremental achievements that do not affect gameplay. For example, the first time going to the gallery, first time inviting a friend, etc.
Unlocking an achievement from the server is usually done after a match is completed.
You can use this function to retrieve achievement info, such as the achievement name, description, goalValue, etc.
You can use this function to retrieve a list of all achievements in the related namespace.
You can use this function to query a player’s unlocked and in-progress achievements.
Before using the Achievement service from the SDK, you will need to initialize your server-side SDK to make you authorized and able to perform create, read, update, and delete actions.
Before using the Achievement service from the Golang SDK, you will need to initialize the SDK by following the steps below:
Once completed, you can use the Golang SDK to create, read, update, or delete the Achievement (opens new window) service from your serverless app.
Before using the Achievement service from the Python SDK, you will need to initialize the SDK by following the steps below:
Once completed, you can use the Python SDK to create, read, update, or delete the Achievement (opens new window) service from your serverless app.
Before using the Achievement service, you will need to set some permissions. Use the following .NET namespaces:
using AccelByte.Sdk.Api.Achievement.Model;
using AccelByte.Sdk.Api.Achievement.Operation;
using AccelByte.Sdk.Api.Achievement.Wrapper;
Before using the Achievement service, you will need to set some permissions. Initialize the Achievements wrapper from Achievement service using the following code:
Achievements wAchievements = new Achievements(sdk);
Once completed, you can use the SDK to create, read, update, or delete achievements.
Use the following function to create an achievement (opens new window):
Use the following function to delete an achievement (opens new window):
Use the following function to retrieve all achievements (opens new window):
Use the following function to retrieve an achievement by code (opens new window):
Use the following function to update an achievement (opens new window):