Platform Parameters

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.

Bridge.platform.id

Returns the platform ID on which the game is currently running. Possible values: playgama, vk, ok, yandex, facebook, crazy_games, game_distribution, playdeck, telegram, y8, lagged, msn, microsoft_store, poki, qa_tool, discord, gamepush, bitquest, huawei, jio_games, reddit, youtube, mock, xiaomi.

Language

circle-exclamation

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

Bridge.platform.language

Returns the language set by the user on the platform. If the platform does not provide this data, it returns 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.

Bridge.platform.payload

Allows embedding auxiliary information into the game URL.

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.

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

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

Is Get Game By Id Supported

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

Get All Games

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

Get Game By Id

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

Sending a Message to the Platform

triangle-exclamation

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

Message
Parameters
Description

GameReady

No parameters

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

InGameLoadingStarted

No parameters

Some loading inside the game has started. For example, when a level is loading.

InGameLoadingStopped

No parameters

Loading inside the game is finished.

PlayerGotAchievement

No parameters

The player has reached a significant milestone. For example, defeating a boss or setting a new record.

LevelStarted

Optional. Example: { "world": "desert", "level": 1 }

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

LevelCompleted

Optional. Example: { "world": "desert", "level": 1 }

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

LevelFailed

Optional. Example: { "world": "desert", "level": 1 }

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

LevelPaused

Optional. Example: { "world": "desert", "level": 1 }

Gameplay has paused. Opened setings menu or used pause button

LevelResumed

Optional. Example: { "world": "desert", "level": 1 }

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

Is Audio Enabled

Check if the audio is turned on on the platform.

Pause

Server Time

Current Visibility State

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

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

circle-info

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

Last updated