Construct 2

Connect your game with our SDKs

Welcome to the Gamedistribution.com HTML5 SDK for Construct 2 wiki!

Important

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.

Support

Feel free to request for help by sending an email to our customer support at [email protected], when you're having trouble implementing the plugin.

Download

Download the plugin and extract the file to C:\Program Files\Construct 2\exporters\html5\plugins

Settings

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.

Actions

Init SDK

Loads the Gamedistribution.com HTML5 SDK. Add this as soon as possible, as it is mandatory for calling any advertisements. Only do this once!

Show Banner

Calls an advertisement, you can call this whenever and as often as you want. Calling this will also invoke the pause game method.

Play (Deprecated)

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 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

Step 1

Right-click Object types in the 'Projects' tab, select Insert New Object and select VooxeGoogleAds in the 'Monetization' category.

Step 2

Click VooxeGoogleAds and insert your GameId in the 'Properties' tab (left, under GD Account).

Step 3

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.

Step 4

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 Banner' action - whenever and as often as you want. We will make sure to reject any premature calls.

Final Result

Pause/Resume

Add events for pause and resume game. You have to stop your game and mute all sound & music when you see an advertisement.