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. Construct 3

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.

PlaygamaBridge.PlatformId

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

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

PlaygamaBridge.PlatformLanguage

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: en, ru

URL Parameter

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

PlaygamaBridge.PlatformPayload

This parameter allows embedding auxiliary information into the game URL:

Platform
URL Format

VK

vk.com/game_id#your-info

Yandex

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.

PlaygamaBridge.PlatformTld

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

Is Get All Games Supported

Is Get Game By Id Supported

Get All Games

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

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"get-all-games","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-get-all-games-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformAllGamesCount","comparison":4,"second-value":"0"}}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"for","objectClass":"System","parameters":{"name":"\"games\"","start-index":"0","end-index":"PlaygamaBridge.PlatformAllGamesCount - 1"}}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformId","comparison":0,"second-value":"\"yandex\""}}],"actions":[{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"AppID:\" & PlaygamaBridge.PlatformAllGamesPropertyValue(loopindex(\"games\"), \"appID\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Title:\" & PlaygamaBridge.PlatformAllGamesPropertyValue(loopindex(\"games\"), \"title\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"URL:\" & PlaygamaBridge.PlatformAllGamesPropertyValue(loopindex(\"games\"), \"url\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Cover URL:\" & PlaygamaBridge.PlatformAllGamesPropertyValue(loopindex(\"games\"), \"coverURL\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Icon URL:\" & PlaygamaBridge.PlatformAllGamesPropertyValue(loopindex(\"games\"), \"iconURL\")"}}]}]}]}]}]}

Get Game By Id

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

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"add-action-parameter","objectClass":"PlaygamaBridge","parameters":{"key":"\"gameId\"","value":"\"111111\""}},{"id":"get-game-by-id","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-get-game-by-id-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"is-last-action-completed-successfully","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformId","comparison":0,"second-value":"\"yandex\""}}],"actions":[{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"AppID:\" & PlaygamaBridge.PlatformGameByIdPropertyValue(\"appID\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Title:\" & PlaygamaBridge.PlatformGameByIdPropertyValue( \"title\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"URL:\" & PlaygamaBridge.PlatformGameByIdPropertyValue(\"url\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Cover URL:\" & PlaygamaBridge.PlatformGameByIdPropertyValue(\"coverURL\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Icon URL:\" & PlaygamaBridge.PlatformGameByIdPropertyValue(\"iconURL\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Is Available:\" & PlaygamaBridge.PlatformGameByIdPropertyValue(\"isAvailable\")"}}]}]}]}]}

The call to SendMessage with the parameter GameReady 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.

Message
Description

Game Ready

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

In-Game Loading Started

Any loading inside 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 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

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"get-server-time","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-get-server-time-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"has-server-time","objectClass":"PlaygamaBridge"}],"actions":[{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"PlaygamaBridge.ServerTime"}}]}]}]}

Current Visibility State

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

PlaygamaBridge.VisibilityState

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

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

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-visibility-state-changed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.VisibilityState","comparison":0,"second-value":"\"visible\""}}],"actions":[{"type":"comment","text":"visible"}]},{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.VisibilityState","comparison":0,"second-value":"\"hidden\""}}],"actions":[{"type":"comment","text":"hidden"}]}]}]}

Verify whether the platform supports the action to retrieve the correct links to the developer's other games.

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

Sending a Message to the Platform