# Your first game live in 30 minutes

This is the one path to follow. You finish with a build uploaded, validated and submitted for review. Every step says what you should see when it worked. New words are explained in the [glossary](https://docs.zokogames.com/getting-started/glossary). Which engine you use only changes step 2; the rest is the same.

| Step | Time | You end with |
| --- | --- | --- |
| 0. Get access | 3 min | A studio and an empty developer console |
| 1. Pick a starting point | 1 min | A folder with a game in it |
| 2. Add the SDK and three calls | 5 min | A game that talks to the portal |
| 3. Run it locally | 3 min | Console output proving it works |
| 4. Try it in the Preview tool | 3 min | A ticked requirements checklist |
| 5. Zip it | 2 min | One `.zip` with `index.html` at its root |
| 6. Upload and read the report | 5 min | A passing validation report |
| 7. Fill in the listing and submit | 8 min | A game in review |

## 0. Get access (3 minutes)

1. Sign in or create a player account at [zokogames.com](https://www.zokogames.com/). A developer studio hangs off a normal account. A new account must confirm its email address first: open the link in the mail within 60 minutes (look in spam; **Resend** sends a new one, and a mistyped address means signing up again with the right one). Forgotten password: **Forgot your password?** on the sign-in page mails a link that works once for 60 minutes, and resetting signs you out on every other device. Signing in on the developer host and on zokogames.com are separate sessions of the same account.
2. Open [`/developer/onboarding`](https://developer.zokogames.com/onboarding) and create your studio. The form asks for a **Studio name** (it must differ from every other studio's name, also in case, accents and spacing; you are told as you type), an optional **Your name** (the username teammates and reviewers see; a name is generated if you leave it empty), a **Studio address** (the short name in your studio's page URL, lowercase letters, numbers and hyphens; it is checked as you type and cannot be changed later) and your acceptance of the [developer terms](https://docs.zokogames.com/business/developer-terms). It does not ask for payout details: those can wait until your first statement.
3. Studio sign-up is open to every account unless the portal team has switched it to invitation only. **If the page shows "Studio sign-up is by invitation at the moment" instead of the form,** open the link in your invitation email, or press **Apply to publish** (it opens [`/developers#apply`](https://www.zokogames.com/developers#apply)) and the team replies by email. A link that has expired or was used up shows "Your invitation is no longer valid" instead: apply, or ask the team for a new link. You cannot create a studio before that.

When the studio is created, the form shrinks to a summary and the same page offers the next step, **Create your first game**: a **Game name**, a **Game address** (the game's page will be `/game/<address>`; it is filled in from the name and, like the **URL slug** in step 6, it is locked once a build is uploaded or the game is submitted) and a required **Category** (the closest fit; you can change it later). Press **Create game** and you land in the game's **Edit and submit** wizard with an empty private draft, ready for step 6. If you choose **Go to the console** instead, you see the **developer console** with the **Getting started** checklist, whose first open step is **Create your first game** (**Submit a game** does the same). Once a game exists and has no build yet, the next step is shown as a card, "Next: upload your first build", with a place to drop your zip (it goes to that game), the size limits and links to **Quick start** (this page), **Starter kits** and the **Preview tool**; it goes away once the first build is uploaded. Under the game steps the checklist lists the studio's own: **Complete the studio profile** (a contact person; owners and admins), **Set up payouts** (owners only; it does not hold up submitting or going live, only your first payout) and the optional **Invite your team**; a teammate with the member role sees only the game steps. A five-stop tour of the console opens by itself on your first visit: **Skip tour** closes it and **Take the tour**, at the bottom of the checklist, opens it again. You can do steps 1 to 5 without a studio, so if sign-up is by invitation, apply early and keep going.

## 1. Pick a starting point (1 minute)

| You have | Do this |
| --- | --- |
| A finished plain JavaScript game | Keep it. Go to step 2 and add the tag and the calls to your own `index.html`. |
| A finished Phaser game | Keep it. Add the tag and calls from step 2, or copy the plugin from the [Phaser page](https://docs.zokogames.com/engines/phaser). |
| Nothing yet | Download a [starter kit](https://docs.zokogames.com/getting-started/starter-kits): `html5-minimal` (one file, no build step), `html5-vite-ts` (TypeScript), `phaser`, `playcanvas` or `gdevelop`. Each is a working game already wired to the SDK, so you can skip to step 3. |
| A Unity, Godot, Construct 3, GameMaker, Cocos or Defold game | Do the engine's install on its [engine page](https://docs.zokogames.com/engines/overview), then continue at step 3. The engine pages contain the same three calls in the engine's own language. |

You should see a folder whose top level has an `index.html` (or, for a bundler, a `dist` folder after the build).

## 2. Add the SDK and three calls (5 minutes)

Put the script tag in the `<head>` of `index.html`, before your own code:

```html
<script src="https://sdk.zokogames.com/zokogames-sdk-v1.js"></script>
```

Using a bundler (Vite, webpack)? Keep this script tag in `index.html` and read `window.ZokoGames?.SDK` in your code. For types, download `https://sdk.zokogames.com/1.7.0/index.d.ts`, or start from the `html5-vite-ts` starter kit, which already has them.

Then make the **minimum three calls**. `init` first, `gameplayStart` when the player's input becomes live, `gameplayStop` when a round ends, the game pauses or a menu opens:

```js
const SDK = window.ZokoGames && window.ZokoGames.SDK; // undefined if the script was blocked

// Wrap every SDK call: if the SDK is missing or disabled, the game must still run.
async function zoko(call) {
  try { return await call(); }
  catch (e) { console.warn("SDK:", e.code || e.message); }
}

async function boot() {
  await zoko(() => SDK.init());                      // 1. always first, never rejects
  await zoko(() => SDK.game.loadingStop());          //    recommended: the first screen is ready
  // ... show your menu ...
}

function startRound() { zoko(() => SDK.game.gameplayStart()); } // 2. input is live now
function endRound()   { zoko(() => SDK.game.gameplayStop()); }  // 3. round over, menu showing

boot();
```

`startRound` and `endRound` are placeholders: call them from your own code at the moment a round begins and ends (the sample never calls them itself, so pasted as it is, the checklist in step 4 shows only `init` and `loadingStop`).

Why these three: `init` is required before any other call; `gameplayStart` is the signal that measures real playtime and is the one call [basic launch](https://docs.zokogames.com/getting-started/launch-stages) needs; `gameplayStop` closes the round, and full launch needs the pair. Add `loadingStart()` at the beginning of loading and `loadingStop()` when the first screen is playable (the portal separates load time from play time with them). Between the two you can report progress with `SDK.game.loadingProgress(0..100)`; it is coalesced to one message per 100 ms. Everything else (ads, saves, leaderboards) can wait until the game is live; the [complete example](#a-complete-example) at the end of this page shows them. A complete game in one file, with a rewarded ad and a save, is [Copy-paste example: one index.html](https://docs.zokogames.com/getting-started/one-file-example).

You should see no change on screen. The effect shows in step 3.

## 3. Run it locally (3 minutes)

The SDK runs an in-page mock on `localhost`, so no portal is needed. Serve the folder over HTTP (`file://` does not count as local):

```bash
# plain JavaScript or html5-minimal kit
cd your-game && npx http-server . -p 8080 -c-1
# open http://localhost:8080/?sdk_debug=true

# html5-vite-ts or phaser kit (needs Node 20.19 or later, or 22.12 or later)
npm install && npm run dev
# open http://localhost:5173/?sdk_debug=true
```

`-c-1` switches off the server's cache, so a reload always shows your latest edit. No Node.js? `python3 -m http.server 8080` inside the game folder serves it the same way. Not on `localhost` (for example a LAN address or a tunnel)? Add `?useLocalSdk=true` to the URL instead. The rules are in [environments](https://docs.zokogames.com/getting-started/environments).

You should see in the browser console, first, one line `[ZokoGames SDK] Local mode: the portal is simulated in this page and nothing is sent over the network.` (it appears even without `?sdk_debug=true`), then lines such as `[ZokoGames SDK] call game.loadingStop {}` followed by `result ...`, then `call game.gameplayStart` and `call game.gameplayStop` as you play. `init` itself prints no `call` line, but the calls the SDK makes on its own while it starts are logged: every game shows `call room.snapshot {}` and its `result` (the SDK checks whether the page already holds a multiplayer room). Typing `ZokoGames.SDK.environment` in the console prints `"local"`. If it prints `"disabled"`, the script did not load or the page is neither on `localhost` nor carrying `?useLocalSdk=true` (the console then has one line starting `[ZokoGames SDK] Disabled:` that names the reason); see [troubleshooting](https://docs.zokogames.com/guides/troubleshooting#sdk-and-environment).

## 4. Try it in the Preview tool (3 minutes)

Open [`/preview`](https://www.zokogames.com/preview), type your local address (for example `http://localhost:8080/`) and press **Load game**. No account and no upload: the tool frames your game inside the real portal frame. Play a round.

You should see the requirements checklist tick **SDK initialised (init called)**, **loadingStop called** (if you called it), **gameplayStart called** and **gameplayStop called**, and the event log list every call. Items for ads, banners, data and `happytime` stay grey until you add those calls; they are not needed for a first submission. Fix anything in the log that shows an error before you move on. More in [testing](https://docs.zokogames.com/getting-started/local-testing).

## 5. Zip it (2 minutes)

Zip the **contents** of the folder so `index.html` is at the root of the archive (one top-level folder is also accepted). Keep every path relative.

| Project | Command | Output |
| --- | --- | --- |
| Plain files or `html5-minimal` | `cd your-game && zip -r ../my-game.zip .` | `../my-game.zip` |
| `html5-vite-ts` kit | `npm run package` | `zokogames-html5-vite-ts.zip` in the kit folder |
| `phaser` kit | `npm run package` | `zokogames-phaser-starter.zip` in the kit folder |
| Windows 10 or 11 | In the folder: `tar -a -c -f ..\my-game.zip *` (or select the files inside the folder in File Explorer and choose **Compress to ZIP file**) | `..\my-game.zip` |
| macOS Finder | Select the files inside the folder, then choose **Compress** (compressing the folder itself also works) | `Archive.zip`; one top-level folder is accepted and `__MACOSX` entries are ignored |
| Engine export | Zip the export folder; see the engine page | |

The kit script typechecks, builds, refuses a build with absolute paths and prints `Wrote ...zip: N files, X MB unpacked`. Check the result with `unzip -l my-game.zip | head`: `index.html` must appear without a folder in front of it (or behind exactly one folder).

You should see a zip well under the limits: at most 1,500 files and 250 MB unpacked, an initial download of at most 50 MB (aim for 20 MB or less for mobile).

## 6. Upload and read the report (5 minutes)

1. If you created your first game on the onboarding page, its wizard is already open (or open the game from the [developer console](https://developer.zokogames.com/)). Otherwise choose **Submit a game**, enter the **Game name**, check the **URL slug** (it becomes the game's address and is locked once a build is uploaded or the game is submitted), pick a **Category** and press **Create draft and continue**. The wizard opens with five steps in this order: **Basics**, **Technical**, **Build**, **Artwork** and **Review and submit**. It autosaves. Open **Build** in the list of steps.
2. Drop the zip on "Drop your game zip here" or press **Choose a file**. Large files upload in resumable parts.
3. Read the **validation report** (**Report** on the build). Each finding has a code and, for errors, the offending path; the [build validation reference](https://docs.zokogames.com/requirements/build-validation) explains every code.

A large build (hundreds of files or tens of megabytes) can take a minute or two to check and publish after the upload reaches 100%. The page shows "Checking the build..." with the elapsed time and keeps going, so leave it open; if the connection drops it keeps watching the server, and the build appears in the version list with its report when it is ready. You never need to upload it again.

You should see "Build v1 passed validation and was published" and the build marked **Active** (before launch every new valid build becomes active by itself), with your engine detected and the SDK script found. A warning (for example, a download above 20 MB) does not block you. An error does: fix it and upload the zip again. Press **Preview** on the build to play this exact build in the portal frame with ads switched on, on the **Preview and QA** tab.

## 7. Fill in the listing and submit (8 minutes)

Have the three cover images ready before you start this step (make them while the zip uploads): making artwork is the one task here that can take longer than the time shown. Complete the remaining steps. **Basics**: short description, description, controls, tags and the two required confirmations (suitable for players aged 12 and over, all text available in English). **Technical**: engine, orientation, devices, hosting and the **Audience and distribution** card, where you pick the **Age rating** (12+ or lower) and the **Languages in the game** (English included). **Artwork**: three covers at exact sizes; see [covers](https://docs.zokogames.com/requirements/covers). The **Review and submit** step lists what is still missing; when nothing is left, press **Submit for review** and confirm with **Submit**. The [submission walkthrough](https://docs.zokogames.com/getting-started/submission-walkthrough) explains each field. Before you press **Submit for review**, tick through the [testing checklist](https://docs.zokogames.com/getting-started/testing-checklist) and the [launch checklist](https://docs.zokogames.com/guides/launch-checklist): a game sent back for something on them costs you a review round.

You should see the game's status change to **Submitted**, then to **In review** once a reviewer starts, and later an email and a console notification with the decision. An approved game starts [basic launch](https://docs.zokogames.com/getting-started/launch-stages): live for players, ads off, numbers being measured.

## If something goes wrong

- Nothing appears in the console log or `environment` is `"disabled"`: [troubleshooting](https://docs.zokogames.com/guides/troubleshooting).
- The validator rejects the zip: [build validation](https://docs.zokogames.com/requirements/build-validation).
- The game is sent back by a reviewer: [requirements checklist](https://docs.zokogames.com/requirements/checklist) and the reasons listed in the console.
- Words you do not know: [glossary](https://docs.zokogames.com/getting-started/glossary) and the [FAQ](https://docs.zokogames.com/business/faq).

## A complete example

Want to see ads, saves and `happytime` too? [Build a minimal game in 15 minutes](https://docs.zokogames.com/getting-started/first-game) is a complete, runnable game in two files. It adds a midgame ad, a rewarded ad, a cloud save, `happytime` and the portal's mute setting to the three calls above, passes upload validation with no warnings, and turns every required item of the Preview checklist green.

## Next steps

- [Launch stages and KPIs](https://docs.zokogames.com/getting-started/launch-stages): what happens after you submit, and what to prepare while you wait. Ads, saves and leaderboards come later; start with the [advertisement rules](https://docs.zokogames.com/requirements/advertisements) when you add them.
