Skip to contentGo to cookie choices
Skip to docs navigation

Starter kits

https://docs.zokogames.com/getting-started/starter-kits

The fastest way to a game that passes review is to start from one that already follows the rules. Four of the kits are the same tiny game, "Target Tap" (tap the targets before they vanish), so you can compare how the SDK is wired in; the GDevelop kit is a project that exercises the extension instead. Each is small and dependency-light, runs when the SDK is missing or disabled (html5-minimal even when index.html is opened straight from disk; the Vite, Phaser and PlayCanvas kits need npm run dev or a web server, because a bundled page is not served from file://), keeps every asset path relative and loads the SDK from https://sdk.zokogames.com/zokogames-sdk-v1.js.

Kit Use it when Needs Download
html5-minimal You write plain JavaScript or want to read every SDK call in one file. A static web server. No build step. html5-minimal.zip
html5-vite-ts You want TypeScript, a bundler and typed SDK access. Node 20.19 or later (or 22.12 or later), npm install. html5-vite-ts.zip
phaser You build with Phaser. The kit's package.json depends on Phaser ^4.2.1 and is type-checked and built against it. Node 20.19 or later (or 22.12 or later), npm install. phaser.zip
playcanvas You build an engine-only PlayCanvas game (no Editor). The kit's package.json depends on PlayCanvas 2.24.2 and is type-checked and built against it. Node 20.19 or later (or 22.12 or later), npm install. playcanvas.zip
gdevelop You build with GDevelop 5. A project with the ZokoGames extension already embedded. GDevelop. No build step. gdevelop.zip

What each kit demonstrates#

SDK area Where to look
init() and the disabled fallback A small wrapper (zoko() in html5-minimal, src/zoko.ts in the Vite kit, safe() in the Phaser and PlayCanvas kits) so one failing call never breaks the game.
Loading signals and portal settings loadingStart / loadingStop at boot; muteAudio applied at start and on change.
Gameplay events gameplayStart when a round begins, gameplayStop when it ends, the tab is hidden or an ad starts.
Ads A midgame ad every second round at a natural break; a rewarded button that grants the reward only after adFinished.
Banners A container on the menu screen only, cleared before play (html5-minimal, Phaser, PlayCanvas).
Cloud save The best score through SDK.data.
Users and leaderboard html5-minimal shows getUser, an auth listener, a sign-in button and submitScore with the AES-GCM helper.
Invites html5-minimal shows inviteLink, getInviteParam and a join listener.

Test, package, upload#

All kits follow the same loop. The kit READMEs list the details.

  1. Run on localhost. The SDK switches to its in-page mock: ads are a three-second overlay, banners are dashed boxes, users and friends are fake. Add ?sdk_debug=true to log every call. See testing.
  2. Open the Preview tool. Enter your local address and play: the requirements checklist ticks as your game makes the calls.
  3. Package. html5-minimal is already uploadable: the downloaded zip has index.html at its root, so you can upload it as it is, or zip your edited folder's contents again. In the Vite, Phaser and PlayCanvas kits, npm run package typechecks, builds and writes a zip named after the package, refusing to zip a build with absolute paths. All three set Vite's base to ./. In the GDevelop kit, open game.json in GDevelop, export as HTML5 and zip the exported folder with index.html at its root.
  4. Upload the zip in the developer console and read the validation report.

The whole path with what you should see at each step is in Your first game live in 30 minutes. Kit file names, scripts and commands in this page match the kit package.json files: npm run dev, npm run build, npm run typecheck and npm run package.

Note

The Phaser kit uses the ZokoGames Phaser plugin, copied into src/zoko/. See the Phaser page for what the plugin adds on top of the raw SDK. The plugin source in packages/sdk-engines/phaser is written for Phaser 3 and has not been compiled against every Phaser release; the kit uses Phaser 4.2, the release it was checked with.

Note

The PlayCanvas kit uses the ZokoGames PlayCanvas integration, copied into src/zoko/ without its Editor scripts, and the real playcanvas package. See the PlayCanvas page. The GDevelop kit is the example project from the GDevelop extension; it was exported with GDevelop's exporter and played headlessly, but nobody has yet clicked through opening it in the editor window. There is no Wonderland kit yet: the Wonderland page has the plugin on its own.

Next steps#

Something unclear, wrong or missing on this page? Tell us through support · Test your game in the preview tool