# 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](https://www.zokogames.com/starter-kits/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](https://www.zokogames.com/starter-kits/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](https://www.zokogames.com/starter-kits/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](https://www.zokogames.com/starter-kits/playcanvas.zip) |
| `gdevelop` | You build with GDevelop 5. A project with the ZokoGames extension already embedded. | GDevelop. No build step. | [gdevelop.zip](https://www.zokogames.com/starter-kits/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](https://docs.zokogames.com/getting-started/local-testing).
2. **Open the [Preview tool](https://www.zokogames.com/preview).** 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](https://docs.zokogames.com/getting-started/submission-walkthrough) 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](https://docs.zokogames.com/getting-started/quick-start). 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](https://docs.zokogames.com/engines/phaser) 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](https://docs.zokogames.com/engines/playcanvas). 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](https://docs.zokogames.com/engines/wonderland) has the plugin on its own.

## Next steps

- [Testing with local mode and the Preview tool](https://docs.zokogames.com/getting-started/local-testing)
- [Build a minimal game in 15 minutes](https://docs.zokogames.com/getting-started/first-game)
