How to integrate Gamedistribution API in your HTML5 game and start distributing/monetizing it

Did you hear about Gamedistribution.com?

According to the official website, it’s the biggest broker of high quality, cross-platform games and connects the best game developers to the biggest publishers.

I have to say I did not test it yet (but I will), but there is a nice HTML5 catalog in the site, including the games developed by OrangeGames which is quite a big studio.

Gamedistribution gives developers an easy integration API to make your game benefit of Gamedistribution services, so I tried to integrate their HTML5 API on my Just Jump game whose commented source code is available to be downloaded for free at LearnLazer site.

So once you register as a developer and have your game in the dashboard like I did:

You can change index.html this way:

Use your own Game and User IDs, and that’s what you’ll get in your dashboard:

Did you see? After a while, an advertising pops into your game. I showed you this simple example to introduce Gamedistribution service, but I will try with a more polished game to test how it performs.

  • ALC

    Hello Emanuele,

    How can I stop the game sounds when the advertising pops? I try this in the resumeGame function: “game.sound.mute = false;” but it’s not working.

    Thanks

  • Hi emanuele,

    I integrate script above to my index.html (html5 games) but there nothing show ads & Has Api not checkmark & I try add this before too :

    var GD_OPTIONS = {
    gameId: ‘xxxxxxxx’,
    userId: ‘xxxxxxxxx’,
    onEvent: function(event) {
    switch (event.name) {
    case ‘API_GAME_START’:
    if (typeof gdApi !== ‘undefined’) {
    gdApi.play();
    }
    break;
    case ‘API_GAME_PAUSE’:
    // …
    break;
    case ‘API_READY’:
    if (typeof gdApi !== ‘undefined’) {
    gdApi.showBanner();
    }
    break;
    case ‘API_ERROR’:
    // …
    break;
    }
    },
    };
    (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.src = ‘//html5.api.gamedistribution.com/main.min.js’;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘gamedistribution-jssdk’));

    but not work too, Has Api not checkmark

    do you have any solution how integrate this api

    Thanks