Skip to content

Banners

Requirements for Advertisements

Please be sure to read our advertisement requirements, since your game will be rejected without any feedback if it doesn't follow them.

There are two types of banners: standard banners, and responsive banners.

Standard banners

Standard banners are fixed-size banners that you choose according to your container size. Available sizes are:

  • 728x90
  • 300x250
  • 320x50
  • 468x60
  • 320x100

You can request one or more banners using the crazy_request_banner() function which takes one argument of type string, provided as a JSON string. In the following example, we first create args, an array of structs, where each struct is a single banner request. And then we convert args into a JSON string using json_stringify(); to pass into the function.

In the struct, containerId corresponds to the id attribute of the container you wish to request a banner for and size corresponds to its size. Here is an example of requesting and showing one standard banner:

args = [
    {
        containerId: "crazy_banner_1",
        size: "320x50",
    },
    {
        containerId: "crazy_banner_2",
        size: "300x250",
    },
];

args_json = json_stringify( args );
crazy_request_banner( args_json );

crazy_show_banner("crazy_banner_1");
crazy_show_banner("crazy_banner_2");
  • You can display up to two banners of each size at the same time at once (ex: 728x90 and 300x250, two 300x250, ...), we ask you to make a reasonable usage of banners in order not to deteriorate the player's experience.
  • You can refresh the banner displayed in a container simply by re-executing the banner request. You'll have to wait a minimum of 60 seconds before refreshing a container. You can do a maximum of 60 refreshes per container for a game session.
  • The banner has to be fully inside the game window and not overlap any UI element.
  • If you want to display multiple banners on a screen, you must request them at the same time.

Responsive banners

The responsive banners feature will requests ads that fit into your container, without the need to specify or select a size beforehand. The resulting banners will have one of the following sizes: 970x90, 320x50, 160x600, 336x280, 728x90, 300x600, 468x60, 970x250, 300x250, 250x250 and 120x600.

Only banners that fit into your container will be displayed, if your container cannot fit any of these sizes no ad will be rendered. The rendered banner is automatically vertically and horizontally centered in your container.

You can request one or more banners using the crazy_request_responsive_banner() function which takes one argument of type string, provided as a JSON string. We first create args, an array of strings, where each string corresponds to the id attribute of the container. And then we convert args into a JSON string using json_stringify(); to pass into the function.

args = ["crazy_banner_1", "crazy_banner_2"];
args_json = json_stringify( args );
crazy_request_responsive_banner( args_json );

crazy_show_banner("crazy_banner_1");
crazy_show_banner("crazy_banner_2");
  • You can refresh the banner displayed in a container simply by re-executing the banner request. You'll have to wait a minimum of 60 seconds before refreshing a container. You can do a maximum of 60 refreshes per container for a game session.
  • The container has to be fully inside the game window and not overlap any UI element.
  • If you want to display multiple banners on a screen, you must request them at the same time

Clearing the banners

You can clear all banners with:

crazy_hide_all_banners();

To clear a single banner, use the crazy_hide_banner() function, which takes 1 argument of type string:

crazy_hide_banner( containerId );

For example:

crazy_hide_banner( "crazy_banner_1" );