For the complete documentation index, see llms.txt. This page is also available as Markdown.

Platform (required)

The Platform module exposes host-platform data and lets the game report lifecycle events back to the host.

Implementation order

  1. Required — Read platform.language and apply localization.

  2. Required — Send platform.sendMessage('game_ready') when the first playable frame is ready.

  3. Required — On game start, check platform.isAudioEnabled and mute the game if it is false. Also react to audio and pause state events to mute or pause the game when the user switches tabs or the platform requests it.

  4. Recommended — Send additional sendMessage lifecycle events (level_started, level_completed, etc.).

Language

Returns the language selected by the user on the host platform. If the platform does not provide a language, Bridge falls back to the browser 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.

Platform support · all 25 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Sending a Message to the Platform

Send lifecycle messages to the host platform. game_ready is required; the other messages help the platform understand gameplay state.

Add the PlaygamaBridge Send Message to Platform action and pick a message from the list (see the table below). Send Game Ready once the first playable frame is ready.

Copy This Example

Add the Send Message action and pick a message from the list (see the table below). Send Game Ready once the first playable frame is ready.

Copy This Example

To use constants for convenience:

Message
Parameters
Description

game_ready

No parameters

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

in_game_loading_started

No parameters

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

in_game_loading_stopped

No parameters

In-game loading has finished.

player_got_achievement

No parameters

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

level_started

optional "world" and "level", example: {"world":"desert","level":"1"}

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

level_completed

optional "world" and "level", example: {"world":"desert","level":"1"}

Gameplay has completed. For example, the player won level.

level_failed

optional "world" and "level", example: {"world":"desert","level":"1"}

Gameplay has failed. For example, the player lost level.

level_paused

optional "world" and "level", example: {"world":"desert","level":"1"}

Gameplay has paused. Opened settings menu or used pause button

level_resumed

optional "world" and "level", example: {"world":"desert","level":"1"}

Gameplay has resumed. Returned from settings menu or hit unpause button

Platform support · varies by message

The matrix below lists, for each message, the platforms whose host SDK receives a corresponding signal. On any other platform the call is a silent no-op.

Message
Platforms that relay the message

game_ready

dlightek, facebook, gamesnacks, playgama, poki, portal, telegram, tiktok, xiaomi, yandex, youtube

in_game_loading_started

crazy_games

in_game_loading_stopped

crazy_games

level_started

crazy_games, poki, yandex

level_completed

crazy_games, gamesnacks, poki, yandex

level_failed

crazy_games, gamesnacks, poki, yandex

level_paused

crazy_games, poki, yandex

level_resumed

crazy_games, poki, yandex

player_got_achievement

crazy_games

Does not relay any message: discord, game_distribution, gamepush, huawei, jio_games, lagged, microsoft_store, msn, ok, reddit, samsung, vk, y8

Sending a Custom Message

Sends a message with an id of your own, for game events the built-in list does not cover — shop_opened, boss_defeated, settings_closed. Bridge treats it like a built-in message:

  • the message is recorded in Bridge analytics under its id;

  • it triggers the matching Advanced Banners placement, if the config declares one;

  • it shows an interstitial when the id is listed in advertisement.interstitial.autoShow in the config.

This is what makes banners and interstitials follow your own game flow without extra show/hide calls.

Platform SDKs do not receive custom messages — no platform defines messages of its own, so the call is resolved inside Bridge. Keep using built-in messages for lifecycle reporting, game_ready above all.

Add the PlaygamaBridge Send Custom Message to Platform action and type your own id.

Copy This Example

Add the Send Custom Message action and type your own id.

Copy This Example

Use the send custom message [id] to platform with data [data] block and leave data empty — the field is not forwarded anywhere.

Is Audio Enabled

Returns whether the host platform currently allows game audio.

On game start, check the Is Platform Audio Enabled condition and mute the game if it is false. React to later changes with the On Platform Audio State Changed trigger condition (re-check Is Platform Audio Enabled inside it).

Copy This Example

On game start, check the Platform Is Audio Enabled condition and mute the game if it is false. React to later changes with the Platform On Audio State Changed trigger condition (re-check Platform Is Audio Enabled inside it).

Copy This Example
Platform support · all 25 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Pause

Listen for host pause/resume requests. Pause gameplay, timers, and audio while isPaused is true.

React to host pause/resume with the On Platform Pause State Changed trigger condition, and read the current state with the Is Platform Paused condition. Pause gameplay, timers, and audio while paused.

Copy This Example

React to host pause/resume with the Platform On Pause State Changed trigger condition, and read the current state with the Platform Is Paused condition. Pause gameplay, timers, and audio while paused.

Copy This Example
Platform support · all 25 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Platform ID

Returns the ID of the platform on which the game is currently running.

Platform support · all 25 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

URL Parameter

Read optional launch data passed through the platform URL. Use it for referral codes, deep links, invited-user context, or other launch parameters.

The payload works only on platforms that pass it into the game URL. The exact URL format is platform-specific:

Platform
URL Format

Playgama

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

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

On any other platform there is no way to pass the payload through the URL, so the value is null.

The same property also delivers the payload of the notification the game was launched from, on platforms that support notifications, and the payload attached to a post with createPost(id, payload). There the value does not come from the URL, so the table above does not apply to it.

Platform support · 5 of 25 platforms

Supports: crazy_games, playgama, reddit, vk, yandex

Does not support: discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, poki, portal, samsung, telegram, tiktok, xiaomi, y8, youtube

Launch Source

Tells where the game was opened from: notification for a scheduled notification, post for one of the game's own posts. It is null on an ordinary launch, which is the common case — treat anything else as a bonus path, never as a requirement.

Launch Data

Everything the launch carries, as key-value pairs: the parameters the platform passed to the game, plus postId — the id of the social.posts entry the post was created from — when the game was opened from a post. Together with payload this is what lets a game restore what was shared: the entry says which kind of post it is, the payload carries the level, seed or challenge itself.

PlaygamaBridge.PlatformDataAsJSON returns everything at once.

PlaygamaBridge::PlatformDataAsJSON() returns everything at once.

Server Time

Returns trusted UTC server time. Use it for daily rewards, cooldowns, or time-limited offers where local device time is not reliable.

In the event sheet:

  1. On a trigger (e.g. Button → On clicked), add the Get Server Time action.

  2. Add the On Get Server Time Completed condition. Inside it, check Has Server Time and read the PlaygamaBridge.ServerTime expression (UTC time in milliseconds).

Copy This Example

In the events sheet:

  1. On a trigger (e.g. Button is clicked), add the Get Server Time action.

  2. Add the On Get Server Time Completed condition. Inside it, check Has Server Time and read the PlaygamaBridge::ServerTime() expression (UTC time in milliseconds).

Copy This Example
Platform support · 19 of 25 platforms

Supports: crazy_games, discord, dlightek, gamepush, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, portal, samsung, telegram, tiktok, vk, xiaomi, y8, yandex

Does not support: facebook, game_distribution, gamesnacks, poki, reddit, youtube

Native SDK

Returns the original platform SDK object when Bridge exposes it. Use it only for platform-specific features that Bridge does not wrap.

Domain Information

Returns the platform top-level domain when the host provides it. Use it for regional links, legal text, or domain-specific configuration.

Returns null when no data is available; otherwise returns a TLD such as com or ru.

Platform support · 1 of 25 platforms

Supports: yandex

Does not support: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, youtube

Is External Calls Supported

Returns whether the platform environment allows the game to make external HTTP requests (your own backend, third-party services). Some platforms run games in a sandbox that blocks outgoing requests — check this flag before relying on any external service.

Use the PlaygamaBridge condition Is Platform External Calls Supported.

Use the PlaygamaBridge condition Is External Calls Supported.

Platform support · 19 of 25 platforms

Supports: crazy_games, discord, dlightek, gamepush, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, portal, samsung, telegram, tiktok, vk, xiaomi, y8, yandex

Does not support: facebook, game_distribution, gamesnacks, poki, reddit, youtube

Returns whether the platform allows opening external links from the game. Hide buttons that lead outside the platform (your socials, other stores) when this is false.

Use the PlaygamaBridge Is External Links Allowed condition. Hide buttons that lead outside the platform when it is false.

Use the PlaygamaBridge Is External Links Allowed condition. Hide buttons that lead outside the platform when it is false.

Platform support · 15 of 25 platforms

Supports: crazy_games, discord, dlightek, facebook, gamepush, gamesnacks, huawei, lagged, microsoft_store, msn, portal, reddit, telegram, tiktok, vk

Does not support: game_distribution, jio_games, ok, playgama, poki, samsung, xiaomi, y8, yandex, youtube

Last updated