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

```javascript
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`, `playdeck`, `telegram`, `y8`, `lagged`, `msn`, `microsoft_store`, `poki`, `qa_tool`, `discord`, `gamepush`, `bitquest`, `huawei`, `jio_games`, `reddit`, `youtube`, `mock`, `xiaomi`.

#### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Platform Language

{% hint style="warning" %}
Check the language to display proper text labels.&#x20;
{% endhint %}

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

```javascript
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.

```javascript
PlaygamaBridge::PlatformPayload()
```

This parameter allows embedding auxiliary information into the game URL:

| Platform    | URL Format                                                |
| ----------- | --------------------------------------------------------- |
| VK          | vk.com/game\_i&#x64;**#your-info**                        |
| Yandex      | yandex.com/games/app/game\_i&#x64;**?payload=your-info**  |
| Crazy Games | crazygames.com/game/game\_nam&#x65;**?payload=your-info** |
| Mock        | site.com/game\_nam&#x65;**?payload=your-info**            |

#### Domain Information

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

```javascript
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

Verify whether the platform supports the <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F6C7JA0YSaUAPS1GoUX0p%2FScreenshot%202025-03-17%20at%2018.23.50.png?alt=media&#x26;token=5a3d1300-910a-4bf6-8068-bd7945e700e1" alt="" data-size="line"> action to retrieve the correct links to the developer's other games.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FnRjVPpRYCkOR0l14jO2y%2FScreenshot%202025-03-17%20at%2017.48.03.png?alt=media&#x26;token=d297497e-7866-4498-a6e2-01411649d89e" alt=""><figcaption></figcaption></figure>

#### Is Get Game By Id Supported

Verify whether the platform supports the <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FIZn50R2oT7BnHU1aCn4M%2FScreenshot%202025-03-17%20at%2018.24.36.png?alt=media&#x26;token=db960cfd-2f2b-4c1c-bdf0-cb6428089934" alt="" data-size="line"> action to retrieve the correct link to a specific game.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FCZy7FAFQUdxB7j2f5mpm%2FScreenshot%202025-03-17%20at%2017.48.13.png?alt=media&#x26;token=71b180a8-031f-42e4-9bfb-3bc95e92016f" alt=""><figcaption></figcaption></figure>

#### Get All Games

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

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F75WKJGN4af0nrNPRgHio%2FScreenshot%202025-03-17%20at%2018.10.17.png?alt=media&#x26;token=e6784d93-31b2-4b4a-b1ed-6327299304a6" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```json
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::PlatformGetAllGames"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnGetAllGamesCompleted"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["PlaygamaBridge::PlatformAllGamesCount()",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"PlaygamaBridge::PlatformAllGamePropertiesCount()","conditions":[],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"yandex\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"AppID:\" + PlaygamaBridge::PlatformAllGamesPropertyValue(CurrentIndex, \"appID\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Title:\" + PlaygamaBridge::PlatformAllGamesPropertyValue(CurrentIndex, \"title\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"URL:\" + PlaygamaBridge::PlatformAllGamesPropertyValue(CurrentIndex, \"url\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"cover URL:\" + PlaygamaBridge::PlatformAllGamesPropertyValue(CurrentIndex, \"coverURL\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"icon URL:\" + PlaygamaBridge::PlatformAllGamesPropertyValue(CurrentIndex, \"iconURL\")","\"info\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","+","1"]}]}]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>

#### Get Game By Id

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

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FQHjAxhXSX59q6ITzar6r%2FScreenshot%202025-03-17%20at%2018.21.30.png?alt=media&#x26;token=a46d21a9-128b-4141-b8dc-0244c71e8a4b" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```json
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"gameId\"","\"111111\"",""]},{"type":{"value":"PlaygamaBridge::PlatformGetGameById"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnGetGameByIdCompleted"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::IsLastActionCompletedSuccessfully"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"yandex\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"App ID:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"appID\"))","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Title:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"title\"))","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"URL:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"url\"))","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Icon URL:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"iconURL\"))","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Cover URL:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"coverURL\"))","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Is Available:\" + ToString(PlaygamaBridge::PlatformGameByIdPropertyValue(\"isAvailable\"))","\"info\"",""]}]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>

#### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Sending a Message to the Platform

{% hint style="danger" %}
The usage of <mark style="color:purple;">Send Message</mark> action with the parameter <mark style="color:orange;">GAME\_READY</mark> is mandatory!

Don't forget to implement it. Send this message only when the game is fully loaded.
{% endhint %}

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

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FQB7PyNsjkV6zDZjfIcbU%2FScreenshot%202025-01-20%20at%2011.37.36.png?alt=media&#x26;token=0a4e2282-9e65-4a57-9e9d-24656a0f1c6f" alt=""><figcaption></figcaption></figure>

| Message                 | Parameters                                                    | Description                                                                                    |
| ----------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Game Ready              | No parameters                                                 | The game has loaded, all loading screens are passed, the player can interact with the game.    |
| In-Game Loading Started | No parameters                                                 | Any loading inside 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" parameters                      | Gameplay has started. For example, the player has entered a level from the main menu.          |
| Level Completed         | <p>Optional. "world" : "desert<br>Optional. "level" : "1"</p> | Gameplay has completed. For example, the player won level.                                     |
| Level Failed            | <p>Optional. "world" : "desert<br>Optional. "level" : "1"</p> | Gameplay has failed. For example, the player lost level.                                       |
| Level Paused            | <p>Optional. "world" : "desert<br>Optional. "level" : "1"</p> | Gameplay has paused. Opened settings menu or used pause button                                 |
| Level Resumed           | <p>Optional. "world" : "desert<br>Optional. "level" : "1"</p> | Gameplay has resumed. Returned from settings menu or hit unpause button                        |

#### Is Audio Enabled

Check if the audio is turned on on the platform.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FaUA8aLonXfnJtFa8LMOP%2FScreenshot%202025-07-25%20at%2010.05.41%E2%80%AFAM.png?alt=media&#x26;token=16ee8e1f-4e8b-46c5-af87-4dbbddafa5f2" alt=""><figcaption></figcaption></figure>

#### Pause

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FoKMdFcPWBlXEOq0kkKpf%2FScreenshot%202025-07-25%20at%2010.06.05%E2%80%AFAM.png?alt=media&#x26;token=ac4ac964-41d2-438f-baa4-a4df64e5c28b" alt=""><figcaption></figcaption></figure>

#### Server Time

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F2WBVA0KgiR1qyNdWVAkT%2FScreenshot%202025-01-20%20at%2014.44.17.png?alt=media&#x26;token=82defc33-3ef9-4c85-8558-16230dcbf997" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::GetServerTime"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnGetServerTimeCompleted"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::HasServerTime"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["ToString(PlaygamaBridge::ServerTime())","\"info\"",""]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>

#### Current Visibility State

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

```javascript
PlaygamaBridge::VisibilityState()
```

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

{% hint style="info" %}
React to changes in visibility state. For example, mute the game sound when `hidden` and unmute when `visible`.
{% endhint %}

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2Fns41YNMvwNSRlcAWGhaw%2FScreenshot%202025-01-20%20at%2015.07.01.png?alt=media&#x26;token=91ecfbb9-4eeb-4fd4-9870-77d9ea94eb4f" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnVisibilityStateChanged"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::VisibilityState()","=","\"visible\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Visible\"","\"info\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::VisibilityState()","=","\"hidden\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Hidden\"","\"info\"",""]}]}]}],"eventsCount":1,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>
