Do you like my tutorials?

Then consider supporting me on Ko-fi

Talking about Game development, HTML5, Javascript, Monetize and Phaser.

Did you hear CrazyGames? It’s a browser games platform with more than 10 million monthly active users, located in Belgium and supported by Start it @KBC incubator.

The portals supports any kind of HTML5 games, and you can be elegible for revenue share if:

* The game doesn’t contain advertisements.
* The game doesn’t contain branding from another games portal.
* The game has not been published on other portals before.

You can place links to your Google Play / Apple App Store versions, if you developed them. You can find all information in the developer area, where you can also have the opportunity to win $2,000 if you upload your game between the 1st of October and the 30th of November.

Even if you don’t win the prize, you can still monetize your game thanks to revenue share, if you include their SDK. You can do it in a matter of minutes once you download it from the developer area.

Let me show you how I included it in my Stack the Crates game.

First, in index.html I include the sdk:

<!DOCTYPE html>
<html>
    <head>
		<title>Stack the Crates</title>
        <meta name = "viewport" content = "width = device-width, initial-scale = 1.0, maximum-scale = 1.0, minimum-scale = 1.0, user-scalable = 0, minimal-ui" />
        <link rel = "shortcut icon" sizes = "256x256" href = "icon-256.png" />
        <style type = "text/css">
            * {
                padding: 0;
                margin: 0;
            }
            body{
                background-color: #000000;
            }
            /* rest of the CSS */
        </style>
        <script src = "phaser.min.js"></script>
        <script src = "box2d-plugin-full.js"></script>
        <script type = "module" src = "crazysdk.js"></script>
        <script type = "module" src = "game.js"></script>
    </head>
    <body>
        <div id = "wrongorientation"></div>
    </body>
</html>

The SDK is included at line 19 but pay attention to define type = "module" when including both the SDK and your game file, to enable ES6 import and export statements.

We’ll cover them in another post, at the moment just declare the scripts as modules.

In your game file, import the module with

import CrazySDK, {
    CrazyEventType
} from "./crazysdk.js";

The 3rd line may vary according to the path you copied the SDK in.

Then, it’s just a matter to request an ad:

this.crazysdk = CrazySDK.getInstance();
this.crazysdk.init();
this.crazysdk.requestAd();

There are more things you can do, such as setting up a rewarded ad system, but we’ll cover it later, at the moment I submitted Stack the Crates to CrazyGames and I am waiting for it to be published. I will keep you updated.

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.