Step by step guide to integrate Gamedistribution API in your HTML5 game
Talking about Game development, HTML5, Javascript, Monetize and Phaser.
Do you like my tutorials?
Then consider supporting me on Ko-fi.
You will need to give your game an unique name, do not care about “Game Platform” section and click “Next”
Now it’s time to add a thumbnail of your game and choose a game category. With the experience I made when porting the game on Android TV, I like to include the name of the game in the thumbnail.
You will be given a couple of IDs you should copy somewhere safe.
At this time you need to make some changes to your game to integrate it with Gamedistribution API.
First, initializa the API:
var gameDistributionSettings = {
gameId: "your game id",
userId: "your userid"
};
(function(i,s,o,g,r,a,m){
i['GameDistribution']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)};i[r].l=1*new Date();a=s.createElement(o);m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a, m);
})(window, document, 'script', '//html5.api.gamedistribution.com/libs/gd/api.js', 'gdApi');
gdApi(gameDistributionSettings);
gdApi.showBanner();
showBanner method each time I show the game title.
Now zip the game, rename it from yourgame.zip to yourgame.html5 and you are ready to upload it, so click on the “edit” icon in the dashboard and upload the game:
Once the game is loaded, just fill in the remaining fields of the form, just remember to select “Pre-Game ads”
And you’re done. Now your game needs to be approve, just like mine. As soon as it gets approved, I will publish the link for you to see it. Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.