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

Advanced Banners

Advanced Banners let you define responsive banner layouts that adapt to device type, orientation, and screen size. Unlike regular banners, which support one top/bottom placement, Advanced Banners can render multiple banners at custom positions and switch layouts automatically when conditions change.

When to use Advanced Banners over regular Banner

  • You need banner placement other than top/bottom (corners, sides, multiple banners at once).

  • Layouts must differ between mobile and desktop, or portrait and landscape.

  • You want banner visibility to react to game lifecycle messages (e.g. show on level_paused, hide on level_resumed) without writing show/hide calls everywhere.

Automatic behavior

  • Fullscreen ad coordination — Advanced Banners are auto-hidden when an interstitial or rewarded opens, and restored when it closes/fails.

  • Responsive re-evaluation — on orientation change or window resize, Bridge re-evaluates condition keys and switches to the best-matching variant (200ms debounce).

Advanced Banner settings are stored in playgama-bridge-config.json. Use the config editor to create or update them.

Checking Support

if (bridge.advertisement.isAdvancedBannersSupported) {
    // Advanced Banners are available
}
if (Bridge.advertisement.isAdvancedBannersSupported)
{
    // Advanced Banners are available
}

Use Is Advanced Banners Supported to check availability before showing banner-related UI.

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"is-advanced-banners-supported","objectClass":"PlaygamaBridge"}],"actions":[]}]}

Use Is Advanced Banners Supported to check availability before showing banner-related UI.

Copy This Example
Platform support · 3 of 28 platforms

Supports: crazy_games, msn, playgama

Does not support: absolute_games, bitquest, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, ok, playdeck, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Usage

Method 1: Explicit API Call

Show and hide Advanced Banners directly from game code when placement timing is controlled by your own UI flow.

Show Advanced Banners

If placementFallback is set in the config, you can call without arguments:

If placementFallback is set in the config, you can call without arguments:

Display Advanced Banners for a placement configured in playgama-bridge-config.json. Parameters:

  • Placement (optional)

Copy This Example

Display Advanced Banners for a placement configured in playgama-bridge-config.json. Parameters:

  • Placement (optional)

Copy This Example

If placementFallback is set in the config, you can call without arguments:

If placementFallback is set in the config, you can call with an empty string:

If placementFallback is set in the config, you can call without arguments:

If placementFallback is set in the config, you can call without arguments:

Hide Advanced Banners

Hide the currently displayed Advanced Banners.

Copy This Example

Hide the currently displayed Advanced Banners.

Copy This Example

Method 2: Automatic via Platform Messages

Advanced Banners can react to platform messages. When you send a built-in or custom message, Bridge checks whether the config has a matching placement and runs that placement action.

Use Send Message or Send Custom Message to trigger placements configured in playgama-bridge-config.json.

This will automatically show banners if gameplay_stopped placement is configured:

Copy This Example

This will hide banners if gameplay_started has action: "hide":

Copy This Example

Custom messages work the same way:

Copy This Example

Use Send Message or Send Custom Message to trigger placements configured in playgama-bridge-config.json.

This will automatically show banners if gameplay_stopped placement is configured:

Copy This Example

This will hide banners if gameplay_started has action: "hide":

Copy This Example

Custom messages work the same way:

Copy This Example

This is the recommended approach because banner visibility follows your game lifecycle without extra show/hide calls.

Tracking State

Possible values: loading, shown, hidden, failed.

Unsubscribe when the listener is no longer needed:

Use these conditions to react to specific state transitions. Each fires once per transition.

On Advanced Banners State Changed

Fires whenever the state changes to any value.

Copy This Example

On Advanced Banners Loading

Copy This Example

On Advanced Banners Shown

Copy This Example

On Advanced Banners Hidden

Copy This Example

On Advanced Banners Failed

Copy This Example

Use these conditions to react to specific state transitions. Each fires once per transition.

On Advanced Banners State Changed

Fires whenever the state changes to any value.

Copy This Example

On Advanced Banners Loading

Copy This Example

On Advanced Banners Shown

Copy This Example

On Advanced Banners Hidden

Copy This Example

On Advanced Banners Failed

Copy This Example

To listen for state changes, handle the Async Social event (Other_70.gml):

Automatic Behavior

Fullscreen Ad Coordination

Advanced Banners are automatically hidden when an interstitial or rewarded ad starts (loading or opened) and automatically restored when the ad finishes (closed or failed). No extra code is needed.

Responsive Re-evaluation

When the screen orientation changes or the window is resized, Bridge re-evaluates conditions and switches to a better-matching variant if one exists. This uses a 200ms debounce to avoid excessive updates.

For example, if the player rotates a phone from portrait to landscape and your config has layouts for both orientations, Bridge switches banners automatically.

Complete Example

Config

Game Code

Create Event (Create_0.gml):

Game Logic (e.g. in a Step or button handler):

Async Social Event (Other_70.gml):

Configuration

Use the config editor to configure Advanced Banners in playgama-bridge-config.json under advertisement.advancedBanners.

General Options

Parameter
Type
Default
Description

disable

boolean

false

Disable Advanced Banners entirely, even if the platform supports them

placementFallback

string

—

Default placement to use when Show Advanced Banners is called without a placement

Placement Configuration

Each key under advancedBanners except disable and placementFallback defines a placement. A placement is identified by a string that matches either:

  • A built-in or custom platform message, such as game_ready, level_paused, or gameplay_started

  • A custom message ID passed to Send Custom Message

  • A string passed directly to Show Advanced Banners

Each placement contains:

Property
Type
Default
Description

action

"show" | "hide"

"show"

Whether to show or hide banners when this placement is triggered

default

array

—

Fallback banner layout when no condition-based variant matches

condition key

array

—

Banner layout for a specific set of conditions (see Condition Keys below)

Each banner in the array is an object with CSS positioning values:

Property
Type
Description

width

string

CSS width (e.g. "300px", "100%")

height

string

CSS height (e.g. "250px", "80px")

top

string

CSS top offset (e.g. "0", "10%")

bottom

string

CSS bottom offset

left

string

CSS left offset

right

string

CSS right offset

You can define multiple banners per variant to show several ads simultaneously:

Condition Keys

Condition keys are colon-separated segments that describe when a variant should be used. Bridge evaluates all keys against the current environment and picks the best match.

Available Segments

Segment
Example
Description

Device type

mobile, desktop, tablet, tv

Matches the current device type

Orientation

portrait, landscape

Matches the current screen orientation

Width condition

w>600, w<=1024, w>=768

Matches against window width (or canvas width if canvas segment is present)

Height condition

h>400, h<=900

Matches against window height (or canvas height)

Aspect ratio

ar>1.5, ar>=1.78, ar<=1.0

Matches screen width/height ratio

Canvas mode

canvas

Use game canvas dimensions instead of window size for all w/h/ar conditions. If no canvas is found, the variant will not match

Combining Segments

Combine segments with : to create compound conditions. All segments must match for the variant to be selected:

Priority Scoring

When multiple variants match, the one with the highest score wins:

Segment Type
Score

Device type (mobile, desktop, etc.)

+4

Orientation (portrait, landscape)

+2

Canvas mode (canvas)

+1

Each dimension/aspect ratio condition

+1

If two variants have the same score, the one with more segments wins. If they also have the same number of segments, the one whose dimension/aspect ratio threshold is closest to the actual value takes priority.

Example: screen is 1300px wide, device is desktop

Key
Matches?
Score

default

yes (fallback)

-1

desktop

yes

4

desktop:w>500

yes

4 + 1 = 5

desktop:w>1200

yes

5 + higher specificity bonus

desktop:landscape:w>1200

yes

4 + 2 + 1 = 7

mobile:portrait

no

—