The developer docs are written in English and Spanish. You are reading the English version.
Other engines
Any engine that exports to the web works. The pattern is always the same:
Make the exported
index.htmlload the SDK before the engine's scripts:<script src="https://gamealia.app/sdk/v1.js"></script>- Call
window.Gamealiafrom the engine's JavaScript bridge: at leastinit()at startup andgame.loadingStop()when the game is playable, then gameplay and ad calls (see the SDK reference). - Upload the export folder, with
index.htmlat its root.
gamealia analyze recognises HTML5 projects (plain, Phaser, PixiJS, three.js), Unity, Godot, GameMaker and Construct exports; any other web export is handled as plain HTML5. gamealia init --write adds the script tag to the html it finds.
Phaser, PixiJS, three.js and plain JavaScript
Call the SDK directly. With a bundler (Vite, webpack), keep the script tag in index.html and use the global:
await Gamealia.init();
const game = new Phaser.Game(config);
// in your preload scene's "complete" handler:
Gamealia.game.loadingStop();
gamealia new <dir> --template phaser (or pixi) creates a working starter. A project with a build script in package.json is built with your package manager, and its output folder (dist, build...) is what gets uploaded.
Construct 3
Export with Web (HTML5). Add the script tag to the exported index.html, or load it from your project's main script. Call the SDK from Construct's JavaScript scripting, for example in an "On start of layout" script:
await globalThis.Gamealia.init();
globalThis.Gamealia.game.loadingStop();
GameMaker (HTML5 / GX)
Use an HTML5 export with a custom index.html that includes the script tag (or edit the exported one). Call the SDK through a JavaScript extension whose functions call window.Gamealia, for example function gml_loading_stop() { window.Gamealia.game.loadingStop(); }. Upload the whole export, including html5game/.
Defold
Add the script tag to your HTML5 template (game.project → html5 → htmlfile) and call the SDK with html5.run:
html5.run("Gamealia.init().then(() => Gamealia.game.loadingStop())")
For results (ads, saves) use a small JavaScript helper in the template plus jstodef-style callbacks, or keep the logic in JavaScript.
Cocos Creator
Add the script tag to the web build template (build-templates/web-mobile/index.html) and call the global from TypeScript:
const G = (window as any).Gamealia;
await G.init();
G.game.loadingStop();
Already on CrazyGames or Poki?
You do not need to rewrite those calls: load the shim instead of their SDK. See Migrate from CrazyGames and Migrate from Poki.