Achievements is a service with a series of API calls that allows you to reward players when a milestone in a game is reached. These "milestones" or "achievements" are defined and created by you for each game under the Achievements panel. Achievements are defined by providing four different values.
- Identifier - a unique value that identifies an achievement within a game
- Title - the title of the achievement
- Description - the description of the achievement
- Progress Goal - an integer value equal to or bigger than 1
Achievement objects loaded for players and accessible to the game developer contian the above list of properties plus the following properties.
- Progress - the current progress of the achievement which is between [0 and ProgressGoal]
- LastUpdate - the last updated time in UTC
- ProgressRatio - A value in the range [0:1] indicating the progress made towards completion
- Completed - a boolean value idicating whether and achievement is completed or not
- ImageUrl - A url to the image of the achievement
Each player is eligible for all achievements defined for a game. This means that when achievement list for a player is loaded, it contains all the achievements available for that game. It is the "Progress" value relative to the "ProgressGoal" that indicates whether an achievement is completed, in-progress, or not started. The "Achievements" service provides the following API calls to access and modify achievements for each player in a game
Loading and modifying Achievements for current user
Loading Achievements for other players
Once an achievement is "Complete", its "Progress" value cannot be changed. In other words the achievement cannot be undone and modified.