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 onlevel_resumed) without writing show/hide calls everywhere.
Configuration
Advanced Banner settings live in the config under the advertisement.advancedBanners key.
{
"advertisement": {
"advancedBanners": {
"disable": false, // disable Advanced Banners entirely
"placementFallback": "main_menu", // placement used when showAdvancedBanners() is called without one
"main_menu": { // every other key defines a placement
"action": "show", // 'show' (default) or 'hide' — what to do when the placement is triggered
"default": [ // layout used when no condition key matches
{ "width": "20%", "height": "25%", "top": "10%", "right": "10%" }
],
"mobile:portrait": [ // condition key — layout for a specific environment
{ "width": "100%", "height": "10%", "bottom": "0%", "left": "0%" }
],
"desktop:landscape:w>1200": [ // several banner objects = several banners shown at once
{ "width": "10%", "height": "60%", "top": "10%", "left": "2%" },
{ "width": "10%", "height": "60%", "top": "10%", "right": "2%" }
]
},
"level_resumed": {
"action": "hide"
}
}
}
}Every key except disable and placementFallback defines a placement. The placement name matches a built-in or custom platform message (level_paused, gameplay_started, shop_opened, …) or the string you pass to showAdvancedBanners(). Each banner object inside a layout positions the banner with width, height, top, bottom, left, right.
Condition keys
A condition key is a colon-separated list of segments; its layout is used only when all segments match the current environment:
Device type —
mobile,desktop,tablet,tvOrientation —
portrait,landscapeWidth / height —
w>600,w<=1024,h>400, … (window size)Aspect ratio —
ar>1.5,ar>=1.78, … (width ÷ height)canvas— evaluate the size and aspect-ratio segments against the game canvas instead of the window
Combine segments with :, e.g. desktop:landscape:w>1200. When several variants match, the most specific one wins: device type weighs the most, then orientation, then each size / aspect-ratio segment; ties go to the key with more segments, then to the threshold closest to the actual value. If no variant matches, default is used.
Is Advanced Banners Supported
Check this before showing banner-related UI.
Use Is Advanced Banners Supported to check availability before showing banner-related UI.
Use Is Advanced Banners Supported to check availability before showing banner-related UI.
Show Advanced Banners
Show banners for a placement configured in the config file. If placementFallback is set, the placement argument can be omitted.
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)
Display Advanced Banners for a placement configured in playgama-bridge-config.json. Parameters:
Placement (optional)
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.
Hide the currently displayed Advanced Banners.
Show / Hide 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:
This will hide banners if gameplay_started has action: "hide":
Custom messages work the same way:
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:
This will hide banners if gameplay_started has action: "hide":
Custom messages work the same way:
This is the recommended approach because banner visibility follows your game lifecycle without extra show/hide calls.
Advanced Banners 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.
On Advanced Banners Loading
On Advanced Banners Shown
On Advanced Banners Hidden
On Advanced Banners Failed
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.
On Advanced Banners Loading
On Advanced Banners Shown
On Advanced Banners Hidden
On Advanced Banners Failed
To listen for state changes, handle the Async Social event (Other_70.gml):
Automatic Behavior
Fullscreen ad coordination — Advanced Banners are hidden automatically when an interstitial or rewarded ad starts (
loadingoropened) and restored when it finishes (closedorfailed). No extra code is needed.Responsive re-evaluation — when the screen orientation changes or the window is resized, Bridge re-evaluates condition keys and switches to the best-matching layout variant (with a 200 ms debounce).
Last updated