Playgama
  • Welcome
  • 🚀Quick start
  • Submitting a game
  • Game Requirments
    • 💥Self-check
    • Technical Requirements
    • Advertising Requirements
    • User Experience Requirements
    • Content Requirements
    • Other Requirements
    • Platform-Specific Requirements
  • In-Game Purchases
    • Step-by-step IAP integration guide for Unity
  • FAQ
    • General
    • Submitting a Game
    • Game Moderation
    • Payments and Statistics
  • SDK
    • Getting started
    • Engines
      • Core (Plain JS)
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Unity
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Construct 3
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • GDevelop
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Godot
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Game Maker
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Defold
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
    • Changelog
  • For Partners
    • Getting Started
    • Embed the Widget
      • Adding Games Widget to Your WordPress Site
      • Adding Games Widget to Your Tilda Site
      • Adding Games Widget to Your Framer Site
    • Import the Game Catalog
    • Share your referral link
Powered by GitBook
On this page
  1. SDK
  2. Engines
  3. Game Maker

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.

playgama_bridge_achievements_is_supported()

Check if getting list of achievements is supported.

playgama_bridge_achievements_is_get_list_supported()

Check if built-in popup is supported.

playgama_bridge_achievements_is_native_popup_supported()

Unlock achievement

Unlocks achievement for a player.

var options
switch playgama_bridge_platform_id() {
    case "y8":
        options = {
            "achievement": "ACHIEVEMENT_NAME",
            "achievementkey": "ACHIEVEMENT_KEY"
        }
        break
    case "lagged":
        options = {
            "achievement": "ACHIEVEMENT_ID"
        }
        break
}

playgama_bridge_achievements_unlock(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_unlock_callback" {
    if async_load[? "success"] {
        // your logic here
    }
}

// callback via script
function playgama_bridge_achievements_unlock_callback(success, data) {
    if success {
        // your logic here
    }
}

Get List

Returns the achievements list

playgama_bridge_achievements_get_list()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_get_list_callback" {
    if async_load[? "success"] {
        var achievements_list = json_parse(async_load[? "data"])
    }
}

// callback via script
function playgama_bridge_achievements_get_list_callback(success, data) {
    if success {
        var achievements_list = json_parse(data)
    }
}

Show Native Popup

Some platforms support built-in achievement list which is shown in overlay

playgama_bridge_achievements_show_native_popup()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_show_native_popup_callback" {
    if async_load[? "success"] {
        // your logic here
    }
}

// callback via script
function playgama_bridge_achievements_show_native_popup_callback(success) {
    if success {
        // your logic here
    }
}
PreviousLeaderboardsNextIn-Game Purchases

Last updated 3 months ago