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.is_supported

Check if getting list of achievements is supported.

Bridge.achievements.is_get_list_supported

Check if built-in popup is supported.

Bridge.achievements.is_native_popup_supported

Unlock achievement

Unlocks achievement for a player.

func _ready():
    var options

    match Bridge.platform.id:
        "y8":
            options = {
                "achievementkey": "YOUR_ACHIEVEMENT_KEY",
                "achievement": "YOUR_ACHIEVEMENT_NAME"
            }
        "lagged":
            options = {
                "achievement": "YOUR_LEADERBOARD_ID",
            }

    Bridge.achievements.unlock(options, funcref(self, "_on_unlock_completed"))

func _on_unlock_completed(success):
    print(success)

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