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

Platform Parameters

PreviousSetupNextUser Data

Last updated 25 days ago

At any time, you can retrieve values for specific parameters that you might use in your game, such as the user's browser language.

Platform ID

Identify the platform on which the game is currently running to customize features and settings accordingly.

playgama_bridge_platform_id()

Returns the ID of the platform on which the game is currently running. Possible values: playgama, vk, ok, yandex, facebook, crazy_games, game_distribution, wortal, playdeck, telegram, y8, lagged, msn, poki, qa_tool, mock.

Language

Check the language to display proper text labels.

Get the language set by the user on the platform or the browser language if not provided by the platform, to localize game content.

playgama_bridge_platform_language()

If the platform provides user language data, this will be the language set by the user on the platform. If not, it will be the browser language.

Format: ISO 639-1. Example: ru, en.

URL Parameter

Embed auxiliary information into the game URL to pass additional data or settings when launching the game.

playgama_bridge_platform_payload()

This parameter allows embedding auxiliary information into the game URL. If there is no data – undefined.

Platform
URL Format

VK

http://vk.com/game_id#your-info

Yandex

http://yandex.com/games/app/game_id?payload=your-info

Crazy Games

crazygames.com/game/game_name?payload=your-info

Mock

site.com/game_name?payload=your-info

Domain Information

Retrieve the top-level domain of the platform to handle domain-specific configurations and behavior.

playgama_bridge_platform_tld()

Returns the top-level domain (TLD) of the platform. If there is no data – undefined. If the data is available – com, ru, etc.

Is Get All Games Supported

Verify whether the platform supports the playgama_bridge_platform_get_all_games() method to retrieve the correct links to the developer's other games.

playgama_bridge_platform_is_get_all_games_supported()

Is Get Game By Id Supported

Verify whether the platform supports the playgama_bridge_platform_get_game_by_id method to retrieve the correct link to a specific game.

playgama_bridge_platform_is_get_game_by_id_supported()

Get All Games

This method retrieves the correct links to the developer's other games.

playgama_bridge_platform_get_all_games()

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

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

Get Game By Id

This method retrieves the correct link to a specific game from the developer.

var options
switch playgama_bridge_platform_id() {
    case "yandex":
        options = {
            "gameId": "GAME_ID"
        }
        break
}

playgama_bridge_platform_get_game_by_id(json_stringify(options))

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

// callback via script
function playgama_bridge_platform_get_game_by_id_callback(success) {
    if success {
        // your logic here
    }
}

The call to send_message with the parameter game_ready is mandatory!

Don't forget to implement it.

Send predefined messages to the platform to trigger specific actions or events, such as signaling that the game is ready.

playgama_bridge_platform_send_message("game_ready")
Message
Description

game_ready

The game has loaded, all loading screens have passed, the player can interact with the game.

in_game_loading_started

Any loading within the game has started. For example, when a level is loading.

in_game_loading_stopped

In-game loading has finished.

gameplay_started

Gameplay has started. For example, the player has entered a level from the main menu.

gameplay_stopped

Gameplay has ended/paused. For example, when exiting a level to the main menu, opening the pause menu, etc.

player_got_achievement

The player reached a significant moment. For example, defeating a boss, setting a record, etc.

Server Time

playgama_bridge_platform_get_server_time()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_platform_get_server_time_callback" {
	if async_load[? "success"] {
		var server_time = async_load[? "data"]
	}
}

// callback via script
function playgama_bridge_platform_get_server_time_callback(success, data) {
	if success {
		var server_time = data
	}
}

Current Visibility State

Check if the game tab is visible or hidden, and adjust game behavior accordingly, such as muting sound when hidden.

playgama_bridge_game_visibility_state()
// Listen for visibility state changes

// via Async Social Event
if async_load[? "type"] == "playgama_bridge_game_visibility_state_changed" {
	switch async_load[? "data"] {
		case "visible":
			// your logic here
			break
		case "hidden":
			// your logic here
			break
	}
}

// via script
function playgama_bridge_game_visibility_state_changed(data) {
	switch data {
		case "visible":
			// your logic here
			break
		case "hidden":
			// your logic here
			break
	}
}

Returns the current visibility state of the game (the tab with the game). Possible values: visible, hidden.

React to visibility state changes. For example, mute the game sound when hidden and unmute when visible.

Sending a Message to the Platform