Developer guide

Make a game for Zuno

From an empty folder to a title in the store: what a Zuno game is, what the Hub does for you, how to lay out the files, how to run your build in the Hub's developer mode, and how to publish it.

The main concept

Zuno turns a Windows PC (Android is on the way) into a living-room console. The Hub is the console shell: a launcher driven by a controller, remote or keyboard, a store, player profiles and a pause menu. Every title in it is a web game: plain HTML, JavaScript and CSS, packed in a zip with a manifest.

A web page, nothing more

No engine, build step or framework is required. Canvas 2D, WebGL, Three.js or WASM all work, as long as every file ships inside the package.

Runs in the Hub

The Hub opens your index.html fullscreen in a WebView (WebView2 on Windows) and injects the Zuno SDK as window.Zuno before your scripts.

Offline and sandboxed

Each game gets its own origin (https://<id>.games.zuno.invalid/) with its own storage. Requests to any other host are blocked.

Also runs in a browser

Open index.html in Chrome or Edge and it must still play, with no SDK. That is how you develop fast, and it keeps the game robust.

The life of a title: you build it in a folder, play it straight from that folder in the Hub's developer mode, publish it to this marketplace, an admin reviews it, and once approved every Hub can install it from the Store and gets your updates automatically.

  1. Build in your developer folder
  2. Play it in the Hub (developer mode)
  3. Publish from the Hub or the portal
  4. Review by a marketplace admin
  5. Live in the Store on every Hub

What the platform gives you

You write the game. The Hub and the marketplace take care of the console parts:

FeatureWhat you getAPI
Unified inputXbox, PlayStation and generic pads in one standard button layout, plus keyboard, mouse and touch. Up to 8 players.zuno.input
Player join screenEach player presses A on their controller; the Hub hands you player numbers 1..n and handles reassigning controllers.requestPlayers()
Pause menuSelect or Esc opens the Hub's pause menu (resume, reassign controllers, quit). You only react to pause / resume.zuno.on()
Player profileThe gamer tag and name of whoever is playing. Never ask for initials again.zuno.profile
On-screen keyboardController-friendly text entry when there is no physical keyboard; falls back to prompt() in a browser.zuno.keyboard
HapticsController rumble per player.player(n).vibrate()
Isolated storagelocalStorage and IndexedDB on your own origin; the player can wipe it from the Hub with “Delete saved data”.web storage
SandboxA strict origin per game, blocked network, stuck-input protection when the Hub takes focus.automatic
DistributionStore listing with icon, cover and screenshots, signed-in downloads with SHA-256 checks, automatic update prompts, remote install from My devices, install counts.this marketplace
Dev toolsRun from your folder without installing, DevTools (F12), Reload game from the pause menu, publish from the Hub.developer mode
The current SDK is 1.2.0. Cloud saves (zuno.storage), camera/motion input and a network allow-list are planned, not available yet; do not depend on them.

Before you start

  1. 1

    Create an account

    Sign up on this site (the same account signs in to the Hub).

  2. 2

    Ask for the Developer role

    Open the developer portal and press Request developer access. A marketplace admin grants it; uploading and developer mode both need it.

  3. 3

    Install the Hub on Windows

    Download the Hub and sign in with that account. Developer mode is Windows-only for now.

  4. 4

    Your tools

    Any text editor, Chrome or Edge, and ideally a USB or Bluetooth controller to test with.

1 File structure

Pick one folder on your PC to be your developer folder. Inside it, each game lives in <id>/<version>/, exactly the layout the Hub uses for installed games:

D:\ZunoDev\                         ← your developer folder (any path)
└── dev.yourstudio.mygame\          ← folder name = manifest "id"
    └── 1.0.0\                      ← folder name = manifest "version"
        ├── manifest.json           REQUIRED  the title's description
        ├── index.html              REQUIRED  entry page (manifest "entry")
        ├── icon.png                REQUIRED  512×512 PNG
        ├── cover.jpg               REQUIRED  1920×1080 JPG
        ├── screenshots\            optional  up to 8 images for the store
        │   ├── 01.jpg
        │   └── 02.jpg
        └── assets\
            ├── style.css
            ├── game.js             one file or several (util.js, world.js, hud.js…)
            └── …                   images, audio, fonts, wasm, libraries
  • The game folder name must equal the manifest id, and the version folder name must equal the manifest version. Otherwise the Hub shows the tile with the reason it can't start.
  • Keep several version folders side by side if you like; the Hub runs the highest valid version.
  • All paths are relative. No .., no absolute paths, no symlinks, no native binaries or scripts (.exe, .dll, .bat, .ps1, .sh, …).
  • The version folder is the package: publishing zips its contents with manifest.json at the root.

Files the Hub serves with a proper MIME type: html js mjs css json map txt xml svg png jpg jpeg gif webp ico wasm mp3 ogg wav m4a mp4 webm woff woff2 ttf otf.

2 manifest.json

The manifest describes the title to the Hub and to the store. Copy this and change every value:

{
  "id": "dev.yourstudio.mygame",
  "name": "My Game",
  "version": "1.0.0",
  "sdkVersion": "^1.0.0",
  "entry": "index.html",
  "description": "One or two sentences for the store. Say how it is played (tap, A, Space).",
  "developer": { "name": "Your Studio", "website": "https://yourstudio.example" },
  "icon": "icon.png",
  "cover": "cover.jpg",
  "orientation": "landscape",
  "requirements": {
    "required": [],
    "optional": ["touch", "controller", "mouse", "keyboard"]
  },
  "inputs": {
    "required": [],
    "optional": ["touch", "gamepad", "mouse", "keyboard"]
  },
  "players": { "min": 1, "max": 2 },
  "camera": { "mode": "none" },
  "network": [],
  "ageRating": "everyone",
  "categories": ["arcade"],
  "languages": ["en"]
}
FieldRule
id requiredReverse-domain, lowercase letters, digits, dots and dashes, at least one dot (dev.yourstudio.mygame). It belongs to you after the first upload and never changes.
name requiredUp to 80 characters. Shown on the tile, the store and the pause menu.
version requiredSemVer (1.0.0). Every upload must be newer than anything approved or in review.
entry requiredThe first page, normally index.html.
icon, cover requiredPaths to a PNG icon and a JPG (or PNG) cover. See step 9.
requirements requiredDevices from touch, controller, mouse, keyboard, split into required and optional. At least one device overall, none in both lists. Shown as device badges in the store.
descriptionUp to 4000 characters. Say how it is played (“tap, A or Space”).
players1 ≤ min ≤ max ≤ 8. max caps requestPlayers().
orientationlandscape or portrait, or omit it.
categoriesAny of: action, adventure, arcade, board, card, casual, educational, family, fitness, music, party, pinball, platformer, puzzle, racing, rhythm, shooter, simulation, sports, strategy, trivia.
ageRatingeveryone, everyone10, teen, mature.
developername and website, shown on the tile and the product page.
inputs, camera, network, languagesValidated but not used by the Hub yet. Keep network empty and camera.mode at none.

Put a device in required only if the game is unplayable without it. A game that plays with anything lists everything as optional; a touch-first game that also works with a pad requires touch and lists the rest as optional.

3 index.html and CSS

Use this skeleton. The Content-Security-Policy is part of the standard: no inline scripts or styles, no remote resources.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self' data:">
  <title>My Game</title>
  <link rel="stylesheet" href="assets/style.css">
</head>
<body>
  <canvas id="game" aria-label="My Game"></canvas>
  <!-- The Hub injects the SDK (window.Zuno) before this script. Without it the game runs standalone. -->
  <script src="assets/game.js"></script>
</body>
</html>
  • All JavaScript lives in files under assets/; no <script>…</script> blocks or onclick="".
  • All CSS lives in assets/style.css. Setting element.style from JS and toggling classes is fine.
  • Ship your own fonts, images and libraries (for example assets/three.min.js); CDNs are blocked.
  • Audio files or workers? Extend the CSP (media-src 'self', worker-src 'self' blob:) rather than removing it.
  • Never ship your own copy of zuno-sdk.js; the Hub injects the right one.

The baseline stylesheet: a fullscreen canvas that never scrolls, zooms or selects text.

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b1d2a;          /* your backdrop colour; also shows while loading */
  touch-action: none;           /* no browser pan/zoom gestures */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game {
  display: block;
  width: 100vw;
  height: 100dvh;
  cursor: none;                 /* hide the pointer during play... */
}

#game.menu { cursor: default; } /* ...show it on clickable menus */

4 The game code

Keep every call into the SDK in one small platform object. It is the only place that touches window.Zuno, and it uses ?. everywhere so the game keeps running with no SDK (a browser), an older SDK, or a Hub that timed out.

const platform = {
  zuno: null,

  async init() {
    const sdk = window.Zuno;
    if (!sdk) return;                         // plain browser: stay standalone
    try {
      this.zuno = await sdk.init({
        inputs: ['touch', 'gamepad', 'mouse', 'keyboard'],
        players: { min: 1, max: 2 },           // match manifest.players
      });
      this.zuno.on?.('pause',  () => setPaused(true));
      this.zuno.on?.('resume', () => setPaused(false));
      this.zuno.input?.on?.('buttondown', e => padButton(e.player ?? 1, e.button, true));
      this.zuno.input?.on?.('buttonup',   e => padButton(e.player ?? 1, e.button, false));
      this.zuno.input?.on?.('axismove',   e => padAxis(e.player ?? 1, e.leftX, e.leftY));
    } catch (err) {
      console.warn('[MyGame] Zuno SDK init failed, running standalone.', err);
      this.zuno = null;
    }
  },

  // When the SDK delivers gamepad events, don't also poll navigator.getGamepads().
  get handlesGamepad() { return !!this.zuno?.input; },

  // Connected controllers inside the Hub; null = no limit (browser).
  controllers() {
    if (!this.zuno?.hosted || !this.zuno.input?.controllers) return null;
    try { return this.zuno.input.controllers().length; } catch { return null; }
  },

  // The Hub's join screen. Without controllers there is nobody to ask: just start.
  async requestPlayers(count) {
    if (!this.controllers() || !this.zuno.input.requestPlayers) return { ok: true };
    try { return await this.zuno.input.requestPlayers(count); }
    catch { return { ok: false, reason: 'cancelled' }; }
  },

  vibrate(player, duration, strength) {
    try { this.zuno?.input?.player?.(player)?.vibrate?.({ duration, strength }); } catch { }
  },

  ready() { this.zuno?.ready?.(); },

  load(key)        { try { return JSON.parse(localStorage.getItem('mygame.' + key)); } catch { return null; } },
  save(key, value) { try { localStorage.setItem('mygame.' + key, JSON.stringify(value)); } catch { } },
};

async function boot() {
  resize();
  reset();
  await platform.init();
  game.best = platform.load('best');
  platform.ready();                           // first frame can render
  requestAnimationFrame(frame);
}
boot();

Run the simulation on a fixed timestep so it behaves the same at 60 Hz, 144 Hz or on a slow TV box:

const STEP = 1 / 120;
let last = performance.now(), acc = 0;

function frame(now) {
  const elapsed = Math.min(0.25, (now - last) / 1000);   // clamp after tab switches
  last = now;
  pollGamepad();                                         // browser-only fallback
  if (!game.paused) {
    acc += elapsed;
    while (acc >= STEP) { update(STEP); acc -= STEP; }
  }
  render();
  requestAnimationFrame(frame);
}

function resize() {
  const dpr = Math.min(window.devicePixelRatio || 1, 2);
  canvas.width  = Math.round(window.innerWidth * dpr);
  canvas.height = Math.round(window.innerHeight * dpr);
  scale = canvas.height / H;                             // H = logical world height, e.g. 640
  W = Math.max(320, canvas.width / scale);
}
window.addEventListener('resize', resize);
  • Scale a logical world (e.g. 640 units high) to the canvas and cap devicePixelRatio at 2.
  • Design for the couch: big text (24+ units for hints, 48+ for titles), high contrast, nothing important in the outer 5% of the screen.
  • Call zuno.ready() once your first frame can render, and pause on visibilitychange too, for the browser.
  • Add a ?debug query-string hook that puts your state on window; it pays off in DevTools.

5 Input and players

Buttons use the standard layout: A B X Y LB RB LT RT Select Start LS RS DPadUp DPadDown DPadLeft DPadRight Home. Axes are leftX leftY rightX rightY from −1 to 1, with up and left negative.

// Events
zuno.input.on('buttondown', e => { /* e.button 'A', e.player 1..8, e.value 0..1 */ });
zuno.input.on('buttonup',   e => { });
zuno.input.on('axismove',   e => { /* e.player, e.leftX, e.leftY, e.rightX, e.rightY */ });
zuno.input.on('connected',  e => refreshMenu());
zuno.input.on('players',    e => renumberPlayers());

// Polling
const p1 = zuno.input.player(1);
p1.button('A');          // true while held
p1.value('RT');          // 0..1 trigger
p1.axis('leftX');        // -1..1
p1.vibrate({ duration: 120, strength: 0.6 });

zuno.input.keyboard.isDown('Space');
zuno.input.devices();    // { touch, controller, mouse, keyboard, list }

Reserved by the Hub: never bind these

InputWhat the Hub does
Home (Guide)Leaves the game.
SelectOpens or closes the pause menu; you receive pause / resume.
Select + Start held 1 sLeaves the game.
Esc keyOpens or closes the pause menu. In a plain browser it reaches you, so map it to your own pause only as the standalone fallback.

Use Start for “begin / confirm” and B for “back” in your own menus, like the Hub does. On pause, drop any held-key state you track yourself.

Gamepads: SDK or browser, never both

Inside the Hub the SDK delivers pad events. Poll navigator.getGamepads() only when platform.handlesGamepad is false, or every press fires twice. DOM keyboard and pointer events are safe to listen to everywhere.

Multiplayer: let the Hub assign players

  1. Offer a 2-player mode only when platform.controllers() is null (browser) or at least 2; refresh on connected / disconnected.
  2. When the mode is picked, await platform.requestPlayers(2). The Hub shows its join screen.
  3. { ok: true, players }: start. Joined pads are players 1..n; any other pad reports player 0, ignore it.
  4. { ok: false, reason } (cancelled, not-enough-controllers, invalid-count, busy): back to the menu.
  5. Listen to players: the pause menu's “Reassign controllers” renumbers players mid-game.

6 Saves, profile, keyboard, audio

// Who is playing: player 1 is the Hub's profile, others are guests.
const me = await zuno.profile.current();     // { id, userName, name, guest } or null in a browser
const p2 = zuno.profile.player(2);           // { name: 'Player 2', guest: true }
saveRecord(zuno.profile.player(1).name, score);

// Text entry with a controller (falls back to prompt() in a browser).
const level = await zuno.keyboard.open({ title: 'Name your level', maxLength: 24, mode: 'text' });
if (level !== null) saveLevel(level);

// Lifecycle
zuno.on('pause',  () => setPaused(true));      // pause menu opened, controller lost...
zuno.on('resume', () => setPaused(false));
zuno.exit();                                   // "Quit to launcher" from your own menu
  • Saves: localStorage or IndexedDB, keys prefixed with your game, every access in try/catch. Keep saves small and JSON-only.
  • Profile: player 1 is the Hub's profile, everyone else is a guest. Show the name; never send or display the account id.
  • Keyboard: never use <input> or prompt() directly and never ask who is playing. Modes: text, name, number; resolves null on cancel.
  • Audio: create the AudioContext on the first tap or press, suspend it on pause, resume on resume.

7 Test in a browser

Open index.html in Chrome or Edge (or serve the version folder with any static server, which avoids file:// quirks). window.Zuno is undefined here, so you are testing the standalone path: touch through DevTools device mode, keyboard, and a pad through the browser Gamepad API. The console must stay free of errors.

8 Developer mode in the Hub

Developer mode lets the Hub run the games in your developer folder in place: no zip, no install. Edit a file, reload, and see it on the TV with real controllers and the real SDK.

  1. 1

    Sign in with your developer account

    On Windows, with an account that holds the Developer role. Signing out or switching account hides developer mode again.

  2. 2

    Open Settings

    From the library's top bar, open Settings. A Developer section appears for developer accounts.

  3. 3

    Turn it on

    Press Developer mode: Off to switch it to On.

  4. 4

    Choose the developer folder

    Press Choose developer folder and pick the folder that holds your <id>/<version>/ games. The path is shown under the button and remembered.

  5. 5

    Play from the “In development” row

    Back in the library, a second row of tiles lists every game in the folder. Press A to play.

While you work

DevToolsF12 (or Inspect in the context menu) on a game in development: console, debugger, network.
Reload gameIn the pause menu (Select / Esc): reloads the page with the files as they are now.
Reload folderIn the tile's ••• menu (Y): reads the developer folder again, e.g. after adding a game or a version.
DetailsIn the ••• menu: manifest, folder, and why the game can't start.
Delete saved dataWipes the game's storage to test a first run.
Publish to marketplaceUploads the version folder; see step 10.

When a tile says it can't start

The Hub never hides a broken folder; it shows a tile with the reason. The usual ones:

  • No version folder with a manifest.json: the manifest must be in <id>/<version>/manifest.json, not directly in <id>/.
  • The folder is named … but the manifest id is …: rename the folder to the id (same for the version folder).
  • … is not valid JSON or needs an id, a name and a version: fix the manifest.
  • The entry file … was not found: entry points to a missing file.
  • Store version installed: when the same id is also installed from the Store, the Store copy wins. Use Uninstall Store version in the ••• menu so your build can start (saved data is kept).
Developer mode never changes your folder. Development builds are not reported to the marketplace: no “Now playing” and no play sessions on My devices.

9 Icon, cover, screenshots

FileSizeFormatWhere it shows
icon.png512×512PNG (checked)Library tile, store tile
cover.jpg1920×1080JPG, ~300 KB (PNG accepted)Library hero, product page
screenshots/*16:9PNG, JPG or WebP, up to 8, name orderProduct page gallery

Put the title on the cover, keep the icon readable at 96 px, and match style.css's background to the cover's main colour so loading looks seamless.

10 Publish

Two ways to send a version to the marketplace. Both run the same validation.

From the Hub

On a playable tile of the “In development” row, open ••• → Publish to marketplace. Choose to send it straight to review or keep it as a draft. Problems are listed in the Hub; on success it offers to open the title on the portal.

From the website

Zip the contents of the version folder (manifest.json at the zip root) and drop it on Upload a package, with optional release notes.

What happens next

  1. Draft uploaded, visible only to you
  2. In review after “Submit for review”
  3. Approved public and served to Hubs
  4. Rejected with a note: fix and upload a new version
  • A new id creates a title owned by you; an id you own adds a version. Someone else's id is refused.
  • Each upload needs a newer SemVer than any approved or in-review version. Bump version and rename the version folder to match.
  • Installed Hubs see “Update to vX” as soon as the new version is approved.
  • From your titles you can track reviews, add release notes and unlist a title.

Package limits

Zip size200 MB
Expanded size1024 MB
Files5000
Screenshots8
manifest.json64 KB, at the package root (a zip with everything in one top-level folder is accepted too)
ContentWeb files only: no symlinks, no .., no executables or scripts

Checklist before you publish

  • manifest.json, index.html, icon.png (512×512), cover.jpg (1920×1080) and assets/ are in the version folder.
  • id is reverse-domain, version is SemVer and bumped, folder names match both.
  • requirements is present, honest and has no device in both lists.
  • Standard viewport and CSP; no inline scripts or styles; no remote URLs.
  • Runs in a plain browser with no window.Zuno and no console errors.
  • Calls Zuno.init() once and zuno.ready() after the first frame.
  • On pause: stops the simulation, mutes audio, shows an overlay, drops held input.
  • Doesn't bind Home, Select, Esc (in the Hub) or Select+Start.
  • Gamepads come from the SDK or the browser API, never both.
  • Multiplayer goes through requestPlayers() and respects players.max.
  • Names come from zuno.profile; other text from zuno.keyboard.open().
  • Saves are wrapped in try/catch; audio starts after the first input.
  • Looks right at 16:9, 16:10, 4:3 and 21:9, readable from the couch, smooth at 60 fps.
  • Played end to end in the Hub's developer mode with a controller.

SDK 1.2.0 reference

Zuno.version                      '1.2.0'
Zuno.init({ inputs, players })    → Promise<zuno>   (idempotent)
Zuno.graphics.quality             'low' | 'medium' | 'high'   (Hub setting; readable before init)

zuno.platform                     'android' | 'windows' | 'browser'
zuno.hosted                       true inside the Hub
zuno.on / off('pause' | 'resume' | 'exit', fn)
zuno.ready()                      zuno.exit()

zuno.input.on / off('buttondown' | 'buttonup' | 'axismove' | 'keydown' | 'keyup'
                    | 'connected' | 'disconnected' | 'players', fn)
zuno.input.player(n)              → { number, connected, name, button(), value(), axis(), vibrate() }
zuno.input.players()              → [1, 2, ...]
zuno.input.controllers()          → [{ id, kind, name, player }]
zuno.input.requestPlayers(count)  → Promise<{ ok, players, reason? }>
zuno.input.keyboard.isDown(code) / .held()
zuno.input.devices()              → { touch, controller, mouse, keyboard, list }

zuno.keyboard.open({ title, text, placeholder, maxLength, mode }) → Promise<string | null>
zuno.keyboard.close()   .isOpen   .physical
zuno.keyboard.on / off('open' | 'input' | 'close', fn)

zuno.profile.current()            → Promise<{ id, userName, name, guest } | null>
zuno.profile.player(n)            → { id, userName, name, guest }
zuno.profile.available
Ready to ship?

Request the Developer role if you haven't yet, then publish from the Hub or upload your zip.

The page lost its connection or hit an error. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.