Welcome to the Gamedistribution.com HTML5 SDK for Construct 2 wiki!
- Jump to: Template Game (with existing SDK Initialization)
11-12-2017 - It should now be possible to minify and mangle your project. Please let us know if problems persist. Do make sure you download a new version of the SDK.
Feel free to request for help by sending an email to our customer support at firstname.lastname@example.org, when you're having trouble implementing the plugin.
Download the plugin and extract the file to
C:\Program Files\Construct 2\exporters\html5\plugins
Select the new plugin within Construct 2 by right-clicking on Object Types and insert your gameId in the properties tab.
You can find these values within your Gamedistribution control panel after creating a new game.
Loads the Gamedistribution.com HTML5 SDK. Add this as soon as possible, as it is mandatory for calling any advertisements. Only do this once!
Correct ad-placement is key for a higher revenue potential of your game. Before you submit, make sure that your game includes a pre-roll and mid-rolls:
Pre-roll: an ad shown before the user starts playing the game.
What you basically want to do is display the pre-roll as fast as possible to the user, so they don’t have the time to change their minds and close the game.
Best practice: placing the pre-roll on buttons in the loading/splash screen (Start, Play, Continue).
Mid-roll: an ad shown in between game sessions.
Ideally placed on all non-gameplay buttons, to spread the chance that users will see ads.
Best practice: placing the mid-rolls on each button in the Game Over/Win screen (Replay, Next, Menu).
To get the most out of your game revenue and to maintain a user friendly experience, we ask you to keep these requirements in mind when deciding on the placement of the ads:
- Ads only display upon user input, e.g. when clicking a button
- Ads display outside of the gameplay only, to not disrupt the game experience
- Game audio is muted when the ad is displayed
- The game pauses when the ad is displayed
Don’t worry about spamming users with ads by placing ad-calls on too many buttons: we regulate the ad-interval through the SDK, so users will only see an ad when the set time-frame has passed.
Show Rewarded Ad
Calls a rewarded advertisement so that your user can watch the ad and gain some rewards in advance.
Sends how many times 'PlayGame' is called. If you invoke 'PlayGame' many times, it increases 'PlayGame' counter and sends this counter value.
Custom Log (Deprecated)
Sends how many times 'CustomLog' that is called related to given by _key name. If you invoke 'CustomLog' many times, it increases 'CustomLog' counter and sends this counter value.
Conditions & events
|On SDK loaded||Called when the SDK is ready.|
|On Error occurs||Called when an error has occured.|
|On Rewarded Ad preloaded||Called when a rewarded ad is preloaded.|
|On Resume game||Called when an advertisement is closed or not received.|
|On Pause game||Called when an advertisement is received and ready to show.|
|Is Showing Banner Ad||True if currently showing an advertisement.|
How to use & example
Object types in the 'Projects' tab, select
Insert New Object and select
GamedistributionAds in the 'Monetization' category.
Click GamedistributionAds and insert your GameId in the 'Properties' tab (left, under GD Account).
Double click the GRAY area to create an event to be tied with an advertisement request. You can also tie the following steps to an existing event in your game flow.
Choose 'Init SDK' as an action to tie to an event in your game flow.
Step 5 - Show an advertisement
You can now call the 'Show Ad' action - whenever and as often as you want. We will make sure to reject any premature calls.
Add events for pause and resume game. You have to stop your game and mute all sound & music when you see an advertisement.
Rewarded ads :boom: :new:
Users can watch an in-game video and receive rewards (like in-game currency, premium content, extra lives and credits, etc) in return. For detailed explanations: Rewarded Ads are here!
Recommended way of using rewarded ads is preloading the ad first and show it when your user wants to get a reward. Our SDK provides an event (
On rewarded ad preloaded) for this purpose.
To preload a rewarded ad is also very easy! Just use our
Preload a rewarded ad action.
To show the rewarded ad, simply use the
Show rewarded ad.
IMPORTANT: DO NOT FORGET TO CHECK REWARDED ADS FLAG on https://developer.gamedistribution.com for your game. Otherwise, your game is unable to request rewarded ads.
Best Practice for Rewarded Ads
You can use multiple ad slots for rewarded ads and give your players multiple way of gathering rewards. Samples below is very nice way of implementing this feature.
Also, check Superhero.io game to see how rewarded ads are implemented.
Let them watch an ad to increase their attacks!
No coin no pain? Oh, it is not. Let them gain some free coins.
Who doesn't want a second chance?
Your players can take their chances to gain some buffs!
You can give away some daily gifts to your players.