Bring your game to ZokoGames
This section is for studios whose game already ships as a web build on other web game portals. Your gameplay code stays as it is. What changes is the thin platform layer around it: the script that loads the portal SDK, the calls for ads, saves, leaderboards and purchases, and a few export settings. Each engine has its own page with the exact settings and calls; this page is the route through them. Unfamiliar terms are in the glossary.
What carries over and what changes#
| Part of your game | On ZokoGames |
|---|---|
| Gameplay, art, audio, levels | Unchanged. |
| The web export itself | Kept, with the settings on your engine's page: no threads, relative paths, index.html at the archive root. |
| The other portal's SDK script and calls | Replaced by the ZokoGames SDK (https://sdk.zokogames.com/zokogames-sdk-v1.js) or your engine's wrapper. |
| Ad breaks and rewarded ads | Same places in your game; the call and its callbacks change name. An interstitial or commercial break is a midgame ad, an opt-in reward video is rewarded; there are no other types and no prerolls. |
| Cloud saves | Same idea, new call. Old progress moves only if you migrate it (data). |
| Leaderboards | Created again in the developer console, with a new encryption key (leaderboards). |
| In-game purchases | Products are defined again in the console. Purchases run as test purchases for now (purchases). |
| The other portal's logos, links, store badges and sitelock | Removed, and the sitelock set to allow zokogames.com (sitelock). |
The five steps#
- Export for the web with the right settings. No threads (the game frame is not cross-origin isolated), relative paths, plain file names except Unity's
.bror.gzbuild files. Your engine's page lists every setting. - Swap the platform layer. Install your engine's wrapper, initialise it once, then replace each call your game makes for loading finished, gameplay start and stop, ads, saves, the player, leaderboards and purchases. Delete the other portal's script, branding and sitelock.
- Check size and mobile. Limits: 1,500 files, 250 MB unpacked, about 50 MB initial download (20 MB for mobile), estimated from uncompressed sizes. See first frame fast and mobile.
- Test. Run the game on
localhost, where the SDK starts in local mode with fake ads, fake players and local saves. Then upload the zip and open the game's Preview and QA tab in the developer console, which runs the exact build in the portal frame with ads on. - Upload and submit. Follow the submission walkthrough.
Pick your engine#
| Engine | Porting page | Full engine reference | Plugin folder (packages/sdk-engines/) |
|---|---|---|---|
| Unity (WebGL) | Bring a Unity game | Unity | unity/ |
| Godot 4 (Godot 3 has its own addon) | Bring a Godot game | Godot | godot/, godot3/ |
| Construct 3 | Bring a Construct 3 game | Construct 3 | construct3/ |
| GameMaker | Bring a GameMaker game | GameMaker | gamemaker/ |
| Phaser and plain HTML5 | Bring a Phaser or HTML5 game | Phaser, plain HTML5 | phaser/ (plain HTML5 needs none) |
| Defold | Bring a Defold game | Defold | defold/ |
| Cocos Creator 3 | Bring a Cocos game | Cocos | cocos/ |
Each wrapper downloads from its engine page, and /sdk-engines/engines.json lists every package with its version and checksum. The wrappers are thin: behaviour, limits and error codes are those of the JavaScript SDK. As each wrapper's README states, they are written against the engines' documented APIs and have not yet been run in every engine's editor, so expect small fixes on first import and send them to support with your engine version.
Two routes for JavaScript call sites#
Games whose platform calls are written in JavaScript (Phaser, plain HTML5 and libraries, or JavaScript glue inside another engine's web template) can port in two ways:
- Rename (recommended). Point the calls at
window.ZokoGames.SDK. Most web game portals use the same shapes (init, ads with started, finished and error callbacks, gameplay events, user, cloud save), so this is mostly renaming. - Compatibility shim (quick port). Load
zokogames-compat-v1.jsafter the SDK, withdata-globalset to the global name your game already reads. The shim forwards those calls to the ZokoGames SDK and translates the common differences.
Both routes, the mapping table and the shim's exact behaviour are in migrating from another portal's SDK. The shim covers JavaScript only: engine wrappers such as the Unity .jslib or the Godot shell replace a C#, GDScript, GML or Lua integration, which the per-engine pages describe.
What every port must get right#
- The SDK script is referenced in your files (the upload validator looks for the URL, even where a wrapper can inject it).
- Init runs once, first, and the game still plays when the SDK is
disabled. - Loading finished:
loadingStoponce the first screen can be played (the Unity and Godot templates send it when the engine has started; every other engine you send yourself). - Gameplay start at first player control, gameplay stop at pause, game over and level end. A midgame ad is refused with
adCooldownuntilgameplayStarthas been called once. - Every ad pauses the game and its audio, and resumes on finish and on error (unfilled ads, the three-minute midgame cooldown and ad blockers all end in an error).
- Rewards are granted only after the rewarded ad finished.
- Saves go through the data module; scores through a leaderboard created in the console.
- No other portal's script, logo, link or sitelock is left in the build.
- No threaded export, relative paths only,
index.htmlat the archive root. - Tested on
localhostand in the console's Preview and QA tab.
The full lists are the testing checklist and the launch checklist.
Next#
- Pick your engine in the table above.
- Rules your build is checked against: build validation.
- Revenue terms before you upload: revenue share.