Achievements
Achievements in HTML5 games are an exciting and rewarding feature that adds an extra layer of engagement for players. They serve as milestones, celebrating a player's progress, skill, and dedication.
Support
Use this to determine if you can implement achievements for your game on the current platform.
bridge.achievements.isSupportedCheck if getting list of achievements is supported.
bridge.achievements.isGetListSupportedCheck if built-in popup is supported.
bridge.payments.isNativePopupSupportedUnlock achievement
Unlocks achievement for a player.
let options = { }
switch (bridge.platform.id) {
case 'y8':
options = {
achievement: 'ACHIEVEMENT_NAME',
achievementkey: 'ACHIEVEMENT_KEY'
}
break
case 'lagged':
options = {
achievement: 'ACHIEVEMENT_ID'
}
break
}
bridge.achievements.unlock(options)
.then((result) => {
// success
})
.catch(error => {
// error
})Get List
Returns the achievement list in JSON
Show Native Popup
Some platforms support built-in achievement list which is shown in overlay
Last updated