Integration Guides


GameMaker: Studio - version 9.2.1

Full Guide

Getting Started

Ad Unit

Advanced

SDK Package

1 Overview

Follow these 4 simple steps to start monetizing:

  1. Add your app to our system and get your App ID.
  2. Download our SDK.
  3. Import the .gmez extension to your project.
  4. Implement our ad units as desired.
media_id

2 Configuration

Requirements: Game Maker Studio Pro and Android export module.

  1. Add your app to our system and get your App ID.
  2. Download the latest version of the SDK;
  3. Import the Revmob extension to your project: in your resource tree in Game Maker Studios (left panel) right click Extensions, choose Import Extension and select the downloaded .gmez file.

Android:

In your Global Game Settings, under the Android tab, the INTERNET permission must be enabled

iOS:

iOS is currently not supported by this extension

app_store_idfa

3 Start Session

Before showing any ads, you must start a Revmob session, that is, initialize our SDK.
It's a best practice to do that as soon as your app is ready, so you can call ads easily whenever you want to.
Create an object and add the following piece of code to its creation event:

RevMob_Initialize("<YOUR_APP_ID>");
            

4 Testing

While you're developing your app, you will only receive test ads. Your app must make at least one ad request while on test mode in order to be validated before receiving live ads. Be sure you are able to receive at least one of our sample ads and that it’s redirecting to our "Success Page" when clicked. Once you are able to receive our sample ads it means you’ve successfully integrated our sdk.

sample_ads

Fullscreen sample, Banner sample, and Success Page

5 Go Live

Once you're finished and your app is in the store with our SDK, click on the "Go live" button in your Apps page and insert your app's URL. It may take up to 48h for your app to be approved. After that, it will start receiving live ads.

app_store_idfa

6 Upload to App Store

When uploading your app to App Store with Revmob SDK, you will be asked about the use of IDFA.
Revmob uses IDFA for targeting purposes. Check "Yes" on the option at the right side of the page, as it will improve your earnings a lot.
Then, on the last three checkboxes:

  1. Check this box to serve ads.
  2. Check this box if you are also advertising the app you are uploading, and its installations will be tracked.
  3. This check is optional, as it's not used by Revmob.
app_store_idfa

1 Native Button/Link

You have full control over this ad unit's layout. You design it, attach our method to its click event and the user will be redirected to the Play Store.
A common usage is to associate it to a "more games" button or to a custom banner your team designed.
Keep in mind that the image associated with this link must be clearly identified as an advertising.

Implementation

The best implementation is to pre-cache the ad before redirecting the user. On the create event of your object, you should include the following code:

RevMob_cacheNativeLink();
            

When you want the user to be redirected to the store, for example on the button click, you can just call:

RevMob_openNativeLink();
            

You can also only call the openNativeLink() method, and the user will be redirected as soon as the Native Button is loaded.

Reminder:
Before calling any of our ads, you must start a Revmob session, otherwise ads won't be shown.
See here how to start a Revmob session.

Listeners

You can only show our ads after they have been successfully received. See our Listeners Section for more information.

ant_smasher_native

100-million-downloads Ant Smasher's success case.

2 Fullscreen

The Interstitial is an advertisement that fills the whole screen. It's usually shown:

  1. On app start;
  2. Before/after a game round;
  3. After a service is used (e.g. alarm turned off).

When pre-caching, the ad received can either be a static interstitial or a video ad. Our servers will always return the one that can pay you more.

Implementation

You should pre-cache the ad before showing it. Call the following method on the create event of your object (best practice):

RevMob_cacheFullscreen();
            

Call the RevMob_showLoadedFullscreen() method when you want the ad to be shown:

RevMob_showLoadedFullscreen();
            

You can also only call RevMob_basicUsageFullscreen() to automatically load and show the ad.
Using this method can affect the UX as the loading of the ad may take a long time due to user's net speed.
That's why we recommend you to pre-cache your ads and serve them after receiving the event that the ad was completely loaded, as it will improve UX.
Reminder:
Before calling any of our ads, you must start a Revmob session, otherwise ads won't be shown.
See here how to start a Revmob session.

Listeners

You can only show our ads after they have been successfully received. See our Listeners Section for more information

ant_smasher_fullscreen

Revmob's Fullscreen test ad.

3 Banner

Banner ad is a View with the standard size of 320x50 for phones and 728x90 for tablets, though you can customize it for your app.
You can use it in 2 different ways:

  • Basic Banner
  • Custom Banner

Basic Banner

This method is the simplest way to show a banner ad.
The banner will be displayed at the bottom of the screen, with its specific width.
You should pre-cache the ad before showing it using the RevMob_showBanner() method:

RevMob_cacheBanner();
          

When "onRevMobBannerReceived" listener is fired, call:

RevMob_showBanner();
          

To hide the basic banner, just write the code below:

RevMob_hideBanner();
          

If you hide the ad, you can call RevMob_showBanner() to show the same add. To request a new banner, you have to release the old ad and then call RevMob_cacheBanner() again.

RevMob_releaseBanner();
          

Custom Banner

You can display a banner with custom positioning and size. The origin will always be the top left corner of the screen.
You should pass 4 Int value parameters to the load and show methods:

RevMob_cacheCustomBanner(leftMargin, topMargin, bannerWidth, bannerHeight);
          

And then when "onRevMobCustomBannerReceived" listener is fired, call:

RevMob_showCustomBanner();
          

To hide the custom banner, just write the code below:

RevMob_hideCustomBanner();
          

If you hide the ad, you can call RevMob_showBanner() to show the same add. To request a new banner, you have to release the old ad and then call RevMob_cacheBanner() again.

RevMob_releaseBanner();
          

Reminder
Before calling any of our ads, you must start a Revmob session, otherwise ads won't be shown.
Check here how to start a Revmob session.

ant_smasher_banner

100-million-downloads Ant Smasher's home menu banner.

4 Video

Videos can only be displayed if you pre cache them first. To do that just call the following method (we suggest calling it on the room's creating event):

RevMob_cacheVideo();
            

Then, you can show it after it has been successfully loaded:

RevMob_showVideo();
            

To know when the video is loaded, create an object and add the following code to an Asynchronous->Social event:

///Listeners
//should only be in a single object instance
var type=async_load[? "type"];
switch (type) {
    case "onRevMobVideoLoaded":
    {
        //Video successfully loaded
        break;
    }
    case "onRevMobVideoNotReceived":
    {
        //Video not successfully loaded
        break;
    }
    case "onRevMobVideoStarted":
    {
        //Video started playing
        break;
    }
    case "onRevMobVideoClicked":
    {
        //Video clicked
        break;
    }
    case "onRevMobVideoDismissed":
    {
        //Video dismissed
        break;
    }
    case "onRevMobVideoNotPreloaded":
    {
        //Video not preloaded
        break;
    }
}
            

Listeners

You can only show our ads after they have been successfully received. See our Listeners Section for more informaiton

ant_smasher_video

Revmob's Video test ad

5 Rewarded Video

Rewarded Video ads are offered as an option to earn digital currency in your app. You must tell the user it's an advertising video before showing the ad and giving the reward.
You can either prompt the user with a pre-roll box for him to accept or customize a button that he spontaneously will click, being aware that he's going to watch an advertising video.
Rewarded video ads are not skippable after the user has accepted to watch them.

Rewarded video ads can only be displayed if you pre cache them first. To do that just call the following method, we suggest calling it on the room's creating event:

RevMob_cacheRewardedVideo();
            

Then, you can show it after it has been successfully loaded:

RevMob_showRewardedVideo();
            

To know when the rewarded video is loaded, create an object and add the following code to an Asynchronous Social event:

///Listeners
//should only be in a single object instance
var type=async_load[? "type"];
switch (type) {
    case "onRevMobRewardedVideoLoaded":
    {
        //Rewarded video successfully loaded
        break;
    }
    case "onRevMobRewardedVideoNotReceived":
    {
        //Rewarded video not successfully loaded
        break;
    }
    case "onRevMobRewardedVideoStarted":
    {
        //Rewarded video started playing
        break;
    }
    case "onRevMobRewardedVideoClicked":
    {
        //Rewarded video clicked
        break;
    }
    case "onRevMobRewardedVideoDismissed":
    {
        //Rewarded video dismissed
        break;
    }
    case "onRevMobRewardedVideoNotPreloaded":
    {
        //Rewarded video not preloaded
        break;
    }
}
            

Listeners

You can only show our ads after they have been successfully received. See our Listeners Section for more informaiton

ant_smasher_video

Revmob's Rewarded video test ad

1 Event Listeners

With Listeners (also known as Delegates or Callbacks) you can follow the ad workflow. The RevMob SDK will fire events for every important change in the ad state. For example, you can identify if the ad was loaded successfully or if the user clicked on the ad.
In a single object, an Asynchronous Social Event should be created:

social_event

Then you can add the following code to catch any of the callbacks. Note that this code is for all of our ad units, you can just add the piece of code suited for your app:

///Listeners
//should only be in a single object instance
var type=async_load[? "type"];
switch (type) {
    case "onRevMobSessionStarted":
    {
        var textToShow = "Started session";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobSessionNotStarted":
    {
        var textToShow = "Session not started";
        show_debug_message(textToShow);
        break;
    }
    //BASIC USAGE FULLSCREEN CALLBACKS
    case "onRevMobBasicUsageFullscreenReceived":
    {
        var textToShow = "Basic usage fullscreen received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBasicUsageFullscreenNotReceived":
    {
        var textToShow = "Basic usage fullscreen not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBasicUsageFullscreenDisplayed":
    {
        var textToShow = "Basic usage fullscreen displayed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBasicUsageFullscreenDismissed":
    {
        var textToShow = "Basic usage fullscreen dismissed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBasicUsageFullscreenClicked":
    {
        var textToShow = "Basic usage fullscreen clicked";
        show_debug_message(textToShow);
        break;
    }
    //FULLSCREEN
    case "onRevMobFullscreenReceived":
    {
        var textToShow = "Fullscreen received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobFullscreenNotReceived":
    {
        var textToShow = "Fullscreen not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobFullscreenDisplayed":
    {
        var textToShow = "Fullscreen displayed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobFullscreenDismissed":
    {
        var textToShow = "Fullscreen dismissed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobFullscreenClicked":
    {
        var textToShow = "Fullscreen clicked";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobFullscreenNotPreloaded":
    {
        var textToShow = "Fullscreen not preloaded";
        show_debug_message(textToShow);
        break;
    }
    //BANNER
    case "onRevMobBannerReceived":
    {
        var textToShow = "Banner received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBannerNotReceived":
    {
        var textToShow = "Banner not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBannerDisplayed":
    {
        var textToShow = "Banner displayed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBannerDismissed":
    {
        var textToShow = "Banner dismissed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobBannerClicked":
    {
        var textToShow = "Banner clicked";
        show_debug_message(textToShow);
        break;
    }
    //CUSTOM BANNER
    case "onRevMobCustomBannerReceived":
    {
        var textToShow = "Custom banner received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobCustomBannerNotReceived":
    {
        var textToShow = "Custom banner not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobCustomBannerDisplayed":
    {
        var textToShow = "Custom banner displayed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobCustomBannerDismissed":
    {
        var textToShow = "Custom banner dismissed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobCustomBannerClicked":
    {
        var textToShow = "Custom banner clicked";
        show_debug_message(textToShow);
        break;
    }
    //NATIVE LINK
    case "onRevMobLinkReceived":
    {
        var textToShow = "Native link received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobLinkNotReceived":
    {
        var textToShow = "Native link not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobLinkClicked":
    {
        var textToShow = "Native link clicked";
        show_debug_message(textToShow);
        break;
    }
    //VIDEO
    case "onRevMobVideoLoaded":
    {
        var textToShow = "Video loaded";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobVideoNotReceived":
    {
        var textToShow = "Video not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobVideoStarted":
    {
        var textToShow = "Video started";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobVideoClicked":
    {
        var textToShow = "Video clicked";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobVideoDismissed":
    {
        var textToShow = "Video dismissed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobVideoNotPreloaded":
    {
        var textToShow = "Video not preloaded";
        show_debug_message(textToShow);
        break;
    }
    //REWARDED VIDEO
    case "onRevMobRewardedVideoLoaded":
    {
        var textToShow = "Rewarded video loaded";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobRewardedVideoNotReceived":
    {
        var textToShow = "RewardedVideo not received";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobRewardedVideoStarted":
    {
        var textToShow = "RewardedVideo started";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobRewardedVideoCompleted":
    {
        var textToShow = "RewardedVideo completed";
        show_debug_message(textToShow);
        break;
    }
    case "onRevMobRewardedVideoNotPreloaded":
    {
        var textToShow = "RewardedVideo not preloaded";
        show_debug_message(textToShow);
        break;
    }
}
            

1 Change Log (yyyy/mm/dd)

9.2.1 (2016/09/08)

  • ImportantUpdate Improved Android banner pre caching

9.2.0 (2016/08/17)

  • ImportantBugfix Improved memory performance.
  • New Added Load and Release Banner.
  • Update Improved Video Ad UX.
  • Bugfix Fixed minor bugs.

9.1.1 (2016/06/14)

  • NewImportant Updated all ad methods
  • New New SampleApp
  • New New listeners for each ad unit
  • New Added custom banner
  • New Added basic fullscreen
  • New Added video ads
  • New Added rewarded video ads
  • Important Removed pop up ad

9.1.0 (2016/05/12)

  • NewImportantBugfix Passed through new extensive Quality Assurance procedures.
  • Bugfix Fixed onRevMobAdNotReceived listener being fired on some click events

9.0.8 - (2016/03/17)

  • New Support for Android.
  • New Added Native Button.
  • New Added fullscreen.
  • New Added banner.
  • New Added PopUp.