# SDK playground

**Purpose:** try every kind of SDK call without writing a game, and see exactly what comes back.

The playground runs the real ZokoGames SDK on this page in **local mode**. It answers from the in-page mock, so ads are a three-second overlay, banners are dashed boxes, users and friends are fake and cloud save lives in your browser. Press a button to run a call, read its code, and see the result or error object in the log.

Use it to learn the shapes of the calls and errors. It does not show the portal's real behaviour (real ad failures, per-game ad and banner settings, guests on the live portal); for that load your own game in the [Preview tool](https://www.zokogames.com/preview).

> [!NOTE]
> The page adds `useLocalSdk=true` to its address so the SDK allows local mode on this host. The scenario selectors below reload the page with the matching [query switch](https://docs.zokogames.com/getting-started/environments).

What it can and cannot show:

| Situation | In the playground |
| --- | --- |
| Local mode | Always. The environment is `"local"`. |
| Guest | Set the scenario switch `user_response` to `logged_out`, then press the sign-in call. |
| Token and sign-in outcomes | Scenario switches `token_response` and `show_auth_prompt_response` (see [local testing](https://docs.zokogames.com/getting-started/local-testing)). |
| Ad blocked | There is no switch here. Add `ad_response=adblock` to the page address by hand; `hasAdblock()` then returns `true`. |
| Calls covered | Ads, banners, game, user, data, analytics and a group of calls that fail on purpose. The store, achievements, rooms (`game.room`), offline state and leaderboards are not in the list; use your own game in the [Preview tool](https://www.zokogames.com/preview) or local mode. |
| Offline, ad-free, real checkout | Not simulated here; use the [Preview tool](https://www.zokogames.com/preview). |

## Try it

## Next steps

- [Introduction, init and errors](https://docs.zokogames.com/sdk/introduction)
- [Testing with local mode and the Preview tool](https://docs.zokogames.com/getting-started/local-testing)
