Pubcenter 2.0 Plugin with Windows Banner Interstitial Ads!

2

Stats

2,462 visits, 3,345 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 5 Aug, 2017. Last updated 19 Feb, 2019

NOTE 1:

#Ashley just emailed to me that this feature will now be implemented officially into C2 and C3 Pubcenter plugin!!!! It will be available in the next update :)

You dont need to use my Plugin anymore, so I am removing the link to the file! Wait for the next update (I will modify this post when its available)#

NOTE 2:

In this plugin I have added additional Actions and Functionalities to call for newly introduced "Windows Banner Interstitial Ads". I have just enhanced the official Pubcenter plugin. I have tested it thoroughly, but still I advise you to use it at your own risk. I do not take any responsibility if there was an issue.

I am hoping Scirra will accept my contribution and make it officially available to all. :)

SoLets get started!

1. Download new Pubcenter Plugin

Close C2 Application

Download the attached pubcenter.zip. And extract it into your C2 folder that looks like this by default:

C:\Program Files\Construct 2\exporters\html5\plugins\</p>

When prompted just overwrite the files (dont worry your existing PubCenter code will not get impacted)

2. Create Banner Interstitial Ad unit on Microsoft Dev Center Dashboard

Login to your MS Dev Center Dashboard.

Goto to your game, and click Monetization->Monitize with Ads

Under "Create ad units", give a name.

For "Ad unit type" , select "Banner Interstitial"

Click "Create Ad Unit"

When a new ad unit is created, note down the "Ad unit ID"

Note: "Banner Interstitial" works only for Windows 10 app. Its not supported by earlier Windows OS like 8 or 8.1

3. Calling the Ad unit within C2

Restart C2 if you havent yet after step 1.

Create a new project, add Pubcenter plugin.

In properties, enter your Application ID.

Note: Your existing project using Pubcenter will work too.

When you goto the Event sheet and try to add an Action for Pubcenter, you will notice, two new Actions "Prepare Banner Interstitial" and "Show Banner Interstitial"

Before showing an Interstitial ad, you need to preload them. So as first step, call the "Prepare Banner Interstitial" action. Enter the "Ad unit ID" that you got in Step 2.

Now when you are ready to show the Ads, for example, before moving to next level, just call the "Show Banner Interstitial" action.

(In my screenshot I have created two functions, so that I can call Prepare and Show anywhere)

4. Export using Windows Store

Export using Windows Store. Select "Windows 10 Universal (VS2015)

5. Download latest MS Ad SDK

Get latest MS Ad SDK from here and install it on your PC

Microsoft Ad SDK

6. Testing Ad in Visual Studio/Windows 10 App

Open the exported project in Visual Studio. I am assuming you are familiar with VS so will not going to elaborate a lot on VS.

Before testing the Ads, we need to add reference to the latest MS Ad SDK.

Rightclick on the "Reference" folder in Solution Explorer ->Add Reference

Select "Microsoft Adverstising SDK for Javascript | 10.0"

Click OK

7. Run the game

Run your game and trigger the event, showing the ad. You should see a Test Ad from Microsoft.

And there you go! The new Ad unit works for you too! :)

8. Try and rate my game with all the Microsoft Ad features

If you found this article helpful.. Then all I ask from you is to download and rate my game "Last of the Survivor".

You will find the above steps implemented. "Banner Interstitial" ad is triggered every 60 seconds after you die or press replay.

You can watch Video Ads by clicking "Free Ammo" or "Free Coins" button

h1[https://www.microsoft.com/en-in/store/p/last-of-the-survivors/9wzdncrfjl0g?rtc=1]Get "Last of the Survivors" on Windows Store

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!