Engines overview
Pick your engine, find its plugin folder and page, see how mature each wrapper is, and learn what every web export must get right on ZokoGames.
Every engine page documents the same SDK. The wrappers are thin: they load the JavaScript SDK in the web export and translate calls, so behaviour, limits and error codes are identical to the JavaScript reference (SDK 1.7.0, script https://sdk.zokogames.com/zokogames-sdk-v1.js). Unfamiliar words are explained in the glossary.
Decision table#
| Engine | Page | Plugin folder (packages/sdk-engines/) |
Mechanism | Verified |
|---|---|---|---|---|
| Unity (WebGL) | Unity | unity/ |
UPM package com.zokogames.sdk, .jslib bridge, WebGL template |
Run in Unity 6 (6000.3) in a full WebGL game; Unity 2021.3 to 2023 only compiled with a real C# compiler against stubs of the Unity API |
| Phaser 3 and 4 | Phaser | phaser/ |
Global plugin ZokoPlugin, typed client, scene mixin |
Run in a real browser against Phaser 3.90.0 and 4.2.1 |
| Godot 4 | Godot | godot/ |
Addon zokogames with autoload ZokoGames, custom HTML shell |
Godot 4.3, 4.7.2 and 3.6.3 Web exports run in a browser (headless Chrome, local mode); not yet run against the live portal |
| Construct 3 | Construct 3 | construct3/ |
SDK v2 addon zokogames.c3addon (actions, conditions, expressions) |
Addon installed in the Construct 3 r506.4 editor and an exported build run |
| GameMaker | GameMaker | gamemaker/ |
Extension zokogames.js (HTML5) plus zokogames_sim.gml |
Extension JavaScript run in a real browser against the SDK; not built in the GameMaker IDE |
| Cocos Creator 3 | Cocos | cocos/ |
TypeScript module ZokoSDK in assets/zokogames/ |
Run in the real Cocos Creator 3.8.8 editor command-line build (web-desktop and web-mobile), in a browser; the editor Preview mode not used |
| Defold | Defold | defold/ |
Lua library zokogames with a small native extension |
Defold 1.14.1: native extension built by the build server and run in a browser |
| PlayCanvas 2.x | PlayCanvas | playcanvas/ |
App helper ZokoPlayCanvas, typed client, ESM and classic Editor scripts |
Run in a real browser against playcanvas 2.24.2; the Editor app itself not driven |
| Wonderland Engine 1.x | Wonderland | wonderland/ |
TypeScript package ZokoSDK and zoko-sdk component |
Type-checked against the official @wonderlandengine/api 1.6.1 declarations; not run in the editor |
| GDevelop 5 | GDevelop | gdevelop/ |
Events extension ZokoGames.json (actions, conditions, expressions; automatic pause/mute during ads) |
Export from GDevelop 5.6.287 run in a real browser; editor UI not driven |
| Plain HTML5, Three.js, PixiJS, Babylon.js | Plain HTML5 and libraries | none: the JavaScript SDK directly | The JavaScript SDK | Tested part: the JavaScript SDK itself |
Status: available now (see feature status). Every plugin is published (the version is on its page and in engines.json), and each was verified as far as free tools allow (details on each engine page): Unity ran in the Unity 6 editor (2026-11-21); on 2026-11-23 the Godot 4.3, 4.7.2 and Godot 3.6.3 Web exports, Defold 1.14.1 (native extension built by the build server), Cocos Creator 3.8.8 command-line web builds, Phaser 3.90.0 and 4.2.1, PlayCanvas 2.24.2 and a GDevelop 5.6.287 export all ran in a real browser, and the Construct 3 r506.4 addon was installed in the editor and an exported build ran. GameMaker's extension JavaScript was run in a browser against the SDK but not built in the IDE, and Wonderland was type-checked against @wonderlandengine/api 1.6.1 but not run in the editor. Also tested are the JavaScript SDK, the shared bridge core, the TypeScript client, the simulator and the packaging tools (unit tests in packages/sdk-engines/tests), and a coverage check that every one of the 97 JavaScript SDK members and exports exists in every wrapper. Expect small fixes on first import and send them to support with the engine version.
Getting the plugin#
Each plugin is the folder named above in the repository. The packager (pnpm --filter @zoko/sdk-engines package) writes one zip per engine, dist/zokogames-<engine>-<version>.zip (the Construct 3 zip contains the installable zokogames.c3addon), and a dist/manifest.json with sizes and checksums. The web app serves the same zips without the version in the name: /sdk-engines/<engine>.zip (unity, godot, godot3, construct3, gamemaker, cocos, defold, phaser), linked from each engine page. The starter kits are downloadable from starter kits.
Each engine page links the versioned file /sdk-engines/zokogames-<id>-<version>.zip (ids unity, godot, godot3, construct3, gamemaker, cocos, defold, phaser, playcanvas, wonderland, gdevelop; each page names the current version), and /sdk-engines/<id>.zip is always the latest version. /sdk-engines/SHA256SUMS lists the SHA-256 checksum of every file, and /sdk-engines/engines.json is a machine-readable index with each engine's id, version, file name, size and checksum.
Which path#
| You are | Your path |
|---|---|
| A solo developer with a finished Phaser or vanilla JavaScript game | Add the SDK script tag, wrap your existing ad, save and score calls, test on localhost, upload. Phaser: Phaser (plugin or plain SDK). Anything else in the browser: plain HTML5 and libraries. Start from the html5-minimal or phaser starter kit if it saves time. No engine install, no editor. |
| A Unity WebGL studio | Unity: install the package and WebGL template, call ZokoSDK.InitAsync(), set Brotli or Gzip compression (the game origin serves .br and .gz correctly), keep Decompression Fallback off, threads off, upload. Plan for the initial-download budget and iOS (off by default). |
| A Godot or Construct hobbyist | Godot (enable the addon, set the custom HTML shell, threads off) or Construct 3 (install the addon, add Initialize, use the event sheet). Both need no scripting beyond the examples. Test in the editor first, then on localhost. |
| GameMaker, Cocos or Defold | The matching page; the shape is the same: install, init once, wrap ads with pause and resume on finish and error. |
Whatever your engine, the minimum for a good launch is the same list, and every page gives the code for it: init, gameplay start and stop, a midgame and a rewarded ad that resume on finish and on error, save and load through the data module, a leaderboard score, and a game that also runs when the SDK is disabled.
Naming rules#
The JavaScript API is the source of truth. Other languages follow a mechanical mapping.
| JavaScript | C# (Unity) | GDScript (Godot) | GML (GameMaker) |
|---|---|---|---|
SDK.init() |
ZokoSDK.Init(cb) or InitAsync() |
ZokoGames.init_async() |
zoko_init() |
SDK.ad.requestAd(type, cb) |
ZokoSDK.Ad.RequestAd(type, ...) |
ZokoGames.request_ad_async(type) |
zoko_ad_request_ad(type) |
SDK.game.gameplayStart() |
ZokoSDK.Game.GameplayStart() |
ZokoGames.gameplay_start() |
zoko_game_gameplay_start() |
SDK.user.getUserToken() |
ZokoSDK.User.GetUserToken(cb) |
ZokoGames.get_user_token_async() |
zoko_user_get_user_token("") |
SDK.data.setItem(k, v) |
ZokoSDK.Data.SetItem(k, v) |
ZokoGames.data_set_item(k, v) |
zoko_data_set_item(k, v) |
- Modules become
Ad,Banner,Game,User,Data,Store,Analyticsin C# andad,banner,game,user,data,store,analyticsin Lua and TypeScript (CocosZokoSDK.game, Defoldzoko.game). GDScript and GML flatten the modules into the method name. Phaser's plugin calls the SDKgamemodulegameApi, becausethis.gameis Phaser's own object. - Promises become callbacks (Unity, Defold, GameMaker through the Async - Social event), signals (Godot) or awaitable calls (Godot
_async, Unity...Async, Cocos and Phaser promises). Construct uses tagged actions. - Error objects keep
codeandmessage; C# exposes them asCodeandMessage.
Properties of all wrappers#
- Simulators. In the editor and in non-web players a simulator answers instead of the browser (Unity, Godot, GameMaker, Cocos, Defold), so you can run the game without uploading it. It mimics ads, users, friends, cloud save and a test store, and has settings to force an ad failure or an adblocker. Phaser, Construct 3 and the plain HTML5 libraries run in a browser, so on
localhostthe SDK's own local mode does the same job. No simulator enforces the three-minute midgame cooldown (adCooldown) that the portal and the SDK's local mode enforce, so test ad handling in a web build as well. - Disabled is normal. If the SDK is
disabled(for example the game opened outside the portal and not onlocalhost), calls fail withsdkDisabledand your game must still run. CheckIsAvailableor the equivalent before calling. - Shared core. The browser side of the Unity, Godot, GameMaker, Construct 3 and Defold wrappers is generated from one bridge (
shared/zoko-core.js); the Cocos and Phaser wrappers share one TypeScript client. A fix applies everywhere, and the coverage check reports drift. - No leaderboard encryption helper.
submitScore(encryptedScore, score)is available in every engine, but no wrapper builds the encrypted payload. A board with an encryption key counts only that payload, so on a keyed board encrypt in your own code (leaderboards), compute scores on your server with the server API, or use a board without a key (emptyencryptedScore). Browser-side games (Phaser, plain HTML5, Cocos) can use the page's Web Crypto directly. The wrappers do not pass the SDK 1.6.4delayedcopy either, so an offline score from an engine build is not queued; a web build can callSDK.user.submitScoreitself to send it.
Web export checklist (all engines)#
- Export for the web (WebGL, HTML5), not as a desktop or mobile app. Zip the export folder contents so
index.htmlis at the archive root, with relative paths only. - The page that hosts the engine must load
https://sdk.zokogames.com/zokogames-sdk-v1.jsbefore the engine boots. Provided: the Unity WebGL template, the Godot custom shell and the Cocos snippet (you install them); the Construct 3 addon and the Defold library inject the script themselves; the Phaser plugin injects it when missing; GameMaker needs the tag added by hand. The upload validator looks for the URL in your files, so add the tag even where a wrapper can inject it. - Keep the initial download small, see first frame fast. Limits: 1,500 files, 250 MB unpacked, about 50 MB initial download (20 MB for mobile), estimated from uncompressed sizes.
- Test in the Preview tool and on
localhostfirst.
What the game origin serves#
Games are served from https://g-<slug>.zokogames.com/<buildId>/ by a Cloudflare Worker (workers/game-origin) in front of the storage bucket. Facts that decide your export settings:
| Behaviour | Detail |
|---|---|
| Pre-compressed files | A file whose name ends in .br or .gz is served with Content-Encoding: br or gzip, the stored bytes untouched, and a Content-Type taken from the inner extension (game.wasm.br is application/wasm). Only an engine that requests exactly those names can use this: Unity (Build files with Brotli or Gzip). Godot, Construct, GameMaker, Cocos, Defold and Phaser request plain names, so ship plain files. |
| Not supported | Legacy .unityweb files get no content encoding (unity_unityweb); mixing .br and .gz, or leaving some Build files uncompressed, warns (unity_mixed_compression, unity_compression_mismatch); a .gz file that is not gzip data is rejected (bad_precompressed). |
| Plain files | Served as stored. The portal documents no compression in transit for them, so keep them small. |
| Caching | Files under the build id are immutable (one year); HTML documents revalidate after 60 seconds. |
| Threads | The portal sends no Cross-Origin-Embedder-Policy, so the frame is not cross-origin isolated and SharedArrayBuffer is unavailable: turn off thread support in Unity, Godot and Defold exports. |
| Range requests | Passed through (206), so streaming media works. |
| Frame | The game runs in an iframe with allow for autoplay, fullscreen, gamepad, clipboard-write, motion sensors and others (camera and microphone only when staff grant them for one game), and a sandbox that allows scripts, same-origin, forms, pointer lock, orientation lock, modals, downloads and presentation. Popups only when enabled for the game. |
| Fullscreen | Use the fullscreen button in the portal's frame bar. A game's own fullscreen call is permitted but fullscreens only the game's canvas, so do not build a competing button. |
| Audio | Browsers suspend WebAudio until a first click, tap or key press, in every engine. Start music from a "tap to play" screen, not at boot. |
Next#
- Pick your engine in the table above and follow its install steps.
- Test with the local mode and the Preview tool.
- Upload and publish: submission walkthrough.
- Already shipping this game on other web game portals? Bring your game lists the export settings and calls to change.