Gamification
brainCloud's Gamification features provide server-side support common metagame elements, including:
- Experience Points (XP) and Levels
- Achievements
- Milestones
- Quests
- Stats Events
These features build upon the Statistics APIs and a concept of Player Rewards.
Player Rewards
brainCloud provides an ability to reward players for completing meta-goals: leveling up, completing a milestone and/or completing quests. Rewards can consist of:
- Achievements
- Experience Points
- Currencies
- User Statistics
- Global Statistics
XP Levels
brainCloud can manage experience points (XP) and levels, and reward the player for levelling up.
A player's XP starts at 0, and is incremented using methods of the Player Statistics service. A list of player XP levels can be read from the client using ReadXPLevelsMetaData.
Achievements
Achievements can be triggered manually, or as the result of player rewards. Achievements can be awarded directly using the AwardAchievements API. There are also API calls for retrieving the full list of achievements, and the list of achievements that have already been awarded for the player.
Milestones
Milestones are used to define conditions under which rewards are to be delivered. Milestones must first be unlocked before they can be completed and then awarded.
Quests
Quests are essentially compound Milestones. The completion status of the Quest is derived from the completion status of the Tasks (i.e. embedded Milestones) that it is composed of.
API Summary
General
Achievements
Milestones
Milestone Management
The Milestone Management APIs are available from cloud-code only.
Quests
- ReadQuests
- ReadQuestsByCategory
- ReadQuestsWithStatus
- ReadQuestsWithBasicPercentage
- ReadQuestsWithComplexPercentage
- ReadNotStartedQuests
- ReadInProgressQuests
- ReadCompletedQuests
Quest Management
The Quest Management APIs are available from cloud-code only.
Resetting Milestone/Quest Status (useful when debugging)
The Rest APIs are available from cloud-code only.
📄️ AwardAchievements
Method will award the achievements specified.
📄️ ReadAchievedAchievements
Method retrieves the list of achieved achievements.
📄️ ReadAchievements
Read all of the achievements defined for the game.
📄️ ReadAllGamification
Method retrieves all gamification data for the player.
📄️ ReadCompletedMilestones
Method retrieves the list of completed milestones
📄️ ReadCompletedQuests
Method returns all completed quests.
📄️ ReadInProgressMilestones
Method retrieves the list of in progress milestones.
📄️ ReadInProgressQuests
Method returns quests that are in progress.
📄️ ReadMilestones
Method retrieves all milestones defined for the game.
📄️ ReadMilestonesByCategory
Method returns milestones for the given category.
📄️ ReadNotStartedQuests
Method returns quests that have not been started.
📄️ ReadQuests
Method retrieves all of the quests defined for the game.
📄️ ReadQuestsByCategory
Method returns quests for the given category.
📄️ ReadQuestsWithBasicPercentage
Method returns quests with a basic percentage.
📄️ ReadQuestsWithComplexPercentage
Method returns quests with a complex percentage.
📄️ ReadQuestsWithStatus
Method returns quests with a status.
📄️ ReadXpLevelsMetaData
Method returns all defined XP levels and any rewards associated with those XP levels.
📄️ ResetAllQuestsAndMilestones
Sets all quests and milestones for the current user.
📄️ ResetMilestones
Resets the specified milestones' statuses.
📄️ ResetQuests
Resets the specified quests' statuses.
📄️ SysAddQuestTask
Adds a new task to the specified quest. The id of the newly added task will be returned in the data.newTask field of the JSON result.
📄️ SysCreateMilestone
Creates the specified milestone. Note that users will not see the milestone in their data until the next time they log in.
📄️ SysCreateQuest
Creates the specified quest. Note that users will not see the quest in their data until the next time they log in.
📄️ SysDeleteMilestone
Deletes the specified milestone.
📄️ SysDeleteQuest
Deletes the specified quest.
📄️ SysDeleteQuestTask
Deletes an embedded task in the specified quest. The id of the deleted task will be returned in the data.deletedTask field of the JSON result.
📄️ SysGetMilestonePage
Retrieves the first page of milestones.
📄️ SysGetMilestonePageOffset
Retrieves the next/prev page of milestones.
📄️ SysGetQuestPage
Retrieves the first page of quests.
📄️ SysGetQuestPageOffset
Retrieves the next/prev page of quests.
📄️ SysReadMilestone
Retrieves the meta-data for the specified milestone.
📄️ SysReadQuest
Retrieves the meta-data for the specified quest.
📄️ SysReorderQuestTasks
Re-orders the tasks in the quest. If any tasks are missing from the new order, they will be deleted. The ids of any deleted tasks will be returned in the data.deletedTasks field of the JSON result.
📄️ SysUpdateMilestone
Updates the specified milestone. Note that only the fields present in the JSON object will be updated. (i.e. to leave ACL as is, don't include it in the milestoneJson field).
📄️ SysUpdateQuest
Updates the specified quest. Note that only the fields present in the JSON object will be updated. (i.e. to leave ACL as is, don't include it in the questJson field).
📄️ SysUpdateQuestTask
Updates an embedded task in the specified quest. The id of the newly updated task will be returned in the data.updatedTask field of the JSON result.
📄️ UpdateRewards
Updates player rewards.