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
, 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.
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: jp
, 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.
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.
Bridge.platform.tld
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.
Bridge.platform.is_get_all_games_supported
Is Get Game By Id Supported
Verify whether the platform supports thegetGameById
method to retrieve the correct link to a specific game.
Bridge.platform.is_get_game_by_id_supported
Get All Games
This method retrieves the correct links to the developer's other games.
func _ready():
Bridge.platform.get_all_games(funcref(self, "_on_get_all_games_completed"))
func _on_get_all_games_completed(success, games):
print(success)
match Bridge.platform.id:
"yandex":
for game in games:
print("App ID: " + str(game.appID))
print("Title: " + str(game.title))
print("URL: " + str(game.url))
print("Cover URL: " + str(game.coverURL))
print("Icon URL: " + str(game.iconURL))
Get Game By Id
This method retrieves the correct link to a specific game from the developer.
func _ready():
var options
options = {
"gameId": "111111"
}
Bridge.platform.get_game_by_id(options, funcref(self, "_on_get_game_by_id_completed"))
func _on_get_game_by_id_completed(success, game):
print(success)
match Bridge.platform.id:
"yandex":
print("App ID: " + str(game.appID))
print("Title: " + str(game.title))
print("URL: " + str(game.url))
print("Cover URL: " + str(game.coverURL))
print("Icon URL: " + str(game.iconURL))
print("Is Available: " + str(game.isAvailable))
Sending a Message to the Platform

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.
Bridge.platform.send_message("game_ready")
To use constants for convenience:
Bridge.platform.send_message(Bridge.PlatformMessage.GAME_READY)
game_ready
The game has loaded, all loading screens have passed, and the player can interact with the game.
in_game_loading_started
Some loading inside the game has started. For example, when a level is loading.
in_game_loading_stopped
Loading inside the game is 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 from a level to the main menu or opening the pause menu.
player_got_achievement
The player has reached a significant milestone. For example, defeating a boss or setting a new record.
Server Time
func _ready():
Bridge.platform.get_server_time(funcref(self, "_on_get_server_time_completed"))
func _on_get_server_time_completed(result):
print(result) # UTC time in milliseconds
Current Visibility State
Check if the game tab is visible or hidden, and adjust game behavior accordingly, such as muting sound when hidden.
Bridge.game.visibility_state
Returns the current visibility state of the game (the tab with the game). Possible values: visible
, hidden
.
# To track visibility state changes, connect to the signal
func _ready():
Bridge.game.connect("visibility_state_changed", self, "_on_visibility_state_changed")
func _on_visibility_state_changed(state):
print(state)
Last updated