Playgama
  • Welcome
  • 🚀Quick start
  • Submitting a game
  • Game Requirments
    • 💥Self-check
    • Technical Requirements
    • Advertising Requirements
    • User Experience Requirements
    • Content Requirements
    • Other Requirements
    • Platform-Specific Requirements
  • In-Game Purchases
    • Step-by-step IAP integration guide for Unity
  • FAQ
    • General
    • Submitting a Game
    • Game Moderation
    • Payments and Statistics
  • SDK
    • Getting started
    • Engines
      • Core (Plain JS)
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Unity
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Construct 3
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • GDevelop
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Godot
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Game Maker
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
      • Defold
        • 💥Intro
        • Setup
        • Platform Parameters
        • User Data
        • Advertising
          • Banner
          • Interstitial
          • Rewarded
          • AdBlock
        • User Parameters
        • Social Interactions
        • Leaderboards
        • Achievements
        • In-Game Purchases
        • Remote Configuration
    • Changelog
  • For Partners
    • Getting Started
    • Embed the Widget
      • Adding Games Widget to Your WordPress Site
      • Adding Games Widget to Your Tilda Site
      • Adding Games Widget to Your Framer Site
    • Import the Game Catalog
    • Share your referral link
Powered by GitBook
On this page
  1. SDK
  2. Engines
  3. Game Maker
  4. Advertising

Banner

PreviousAdvertisingNextInterstitial

Last updated 26 days ago

Is Banner Supported

Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game

playgama_bridge_advertisement_is_banner_supported()

Ensure that in-game banners are not displayed during gameplay on CrazyGames. Please refer to .

Show Banner

Display a banner ad within your game to generate revenue through advertising.

var options
switch playgama_bridge_platform_id() {
    case "vk":
	options = {
    	    "position": "top",
            "layoutType": "resize", // optional parameter
            "canClose": false // optional parameter
        }
        break
    case "crazy_games":
        options = {
            "position": "top", // optional parameter, default = bottom
        }
        break
    case "game_distribution":
        options = {
            "position": "top", // optional parameter, default = bottom
        }
    case "msn":
        options = {
            "position": "top:728x90", // optional parameter, default = "top:728x90"
        }
        break
}

playgama_bridge_advertisement_show_banner(json_stringify(options))

Hide Banner

Hide the currently displayed banner ad when it is no longer needed.

playgama_bridge_advertisement_hide_banner()

Banner State

Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.

playgama_bridge_advertisement_banner_state()
// Listen for banner state changes

// via Async Social Event
if async_load[? "type"] == "playgama_bridge_advertisement_banner_state_changed" {
	switch async_load[? "data"] {
		case "loading":
			// your logic here
			break
		case "shown":
			// your logic here
			break
		case "hidden":
			// your logic here
			break
		case "failed":
			// your logic here
			break
	}
}

// via script
function playgama_bridge_advertisement_banner_state_changed(data) {
	switch data {
		case "loading":
			// your logic here
			break
		case "shown":
			// your logic here
			break
		case "hidden":
			// your logic here
			break
		case "failed":
			// your logic here
			break
	}
}

Possible values: loading, shown, hidden, failed.

Advertisement - CrazyGames Documentation