Package your game

How to structure your build, write oneprompt.yaml, prepare Unity and Godot exports, and what the validator rejects and why.

In short

  • A package (.opkg) is a ZIP of your finished web build plus a small manifest file, oneprompt.yaml.
  • It may contain only three things: oneprompt.yaml, your content folder (usually game/) and an optional meta/ folder. Anything else is rejected.
  • We treat every package as potentially hostile. Unsafe paths, executables, server-side scripts, malware and ZIP tricks are refused with an exact error code and a hint.
  • Limits: 1 GB compressed, 2 GB unpacked, 20,000 files, 1 GB per file, 240 bytes per path.

The folder layout

oneprompt.yaml          the manifest
game/                   content.root: everything the browser loads
  index.html            runtime.entrypoint
  ...
meta/                   optional: store images and notes, never served
  icon.png
  screenshots/01.webp
  changelog.md

The name game is only a convention; content.root can name any folder. Everything under it is served from your game's address exactly as it is laid out. The meta/ folder is packaged but not served to players.

The manifest, oneprompt.yaml

A minimal manifest for a plain HTML5 game:

format_version: 1
id: com.example.star-hopper
name: Star Hopper
version: 1.0.0
runtime:
  kind: web
  entrypoint: game/index.html
content:
  root: game

A fuller example with every optional field:

format_version: 1
id: com.example.star-hopper
name: Star Hopper
version: 0.3.0
runtime:
  kind: web
  entrypoint: game/index.html
  cross_origin_isolation: false
content:
  root: game
  precompressed: true
metadata:
  icon: meta/icon.png
  screenshots:
    - meta/screenshots/01.webp
build:
  source_revision: 8f77c8a
  tool: Unity 6 Web
playserv:
  sdk: optional
  capabilities:
    - analytics
    - remote_config

What each field means:

  • format_version: always 1.
  • id: a stable identifier in reverse-DNS style, 3 to 128 characters, lowercase letters and digits in at least two parts separated by dots or dashes (for example com.example.star-hopper). It is descriptive only and grants no access to anything.
  • name: the build's name, 1 to 100 characters. The name players see is the title on your game page, not this field.
  • version: a SemVer version such as 1.0.0 or 1.1.0-beta.2. You may reuse a version; every deployment still gets its own id.
  • runtime.kind: always web. Native kinds are no longer supported and fail with RUNTIME_UNSUPPORTED.
  • runtime.entrypoint: the HTML page that starts the game, written from the top of the package (so game/index.html, not index.html). It must be inside content.root, end in .html or .htm, and match the file name exactly, including upper and lower case.
  • runtime.cross_origin_isolation: set to true only if your engine needs SharedArrayBuffer (multithreaded WebAssembly). See below.
  • content.root: the folder that is served.
  • content.precompressed: set to true if your build ships .br or .gz files that the browser should receive as compressed versions of the real file (typical for Unity). See below.
  • metadata.icon and metadata.screenshots (up to 10): optional package metadata under meta/. These are not your game page images; those are uploaded separately (see Your game page). If you name a file here, it must exist.
  • build.source_revision and build.tool: optional notes, up to 200 characters each, shown with the deployment.
  • playserv.sdk (none, optional or required) and playserv.capabilities (any of analytics, remote_config, player_data, micro_backend, multiplayer): what your game would like to use from PlayServ. See The bridge SDK, analytics and PlayServ.

The manifest must be plain YAML, UTF-8 and at most 64 KB. Unknown fields are rejected. YAML anchors, aliases (&, *) and custom tags (!) are not allowed, which protects against "billion laughs" style attacks.

Plain HTML5 and JavaScript games

Nothing special is needed: put the files in game/, point the entrypoint at your HTML page and deploy. Use relative URLs for your assets (assets/hero.png or ./assets/hero.png), because the game is served from the root of its own address.

Unity Web builds

  1. Build the Web target. Brotli or Gzip compression both work; "Decompression Fallback" is not needed.
  2. Put the build output under game/: the folder containing index.html, Build/ and TemplateData/.
  3. Add these lines to the manifest:
runtime:
  kind: web
  entrypoint: game/index.html
  cross_origin_isolation: false
content:
  root: game
  precompressed: true

With precompressed: true, we serve Build/*.wasm.br as application/wasm with the right Content-Encoding, and decode it on the fly for the rare browser that does not accept Brotli. Every .br and .gz file is decode-checked during validation, and if you also ship the uncompressed original it must match. Set cross_origin_isolation: true only for multithreaded builds.

Godot Web exports

  1. Export with the Web preset (Godot 4). Keep the .html, .js, .wasm, .pck and .png files together in game/.
  2. Point the entrypoint at the exported HTML file:
runtime:
  kind: web
  entrypoint: game/index.html
  cross_origin_isolation: true
content:
  root: game

Godot 4 threaded exports need SharedArrayBuffer, hence cross_origin_isolation: true. If you export single-threaded, set it to false.

Cross-origin isolation, explained

When cross_origin_isolation is true, your game is sent with the headers Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. Browsers then allow SharedArrayBuffer, which threaded WebAssembly needs. Two consequences:

  • Every asset must come from your own package. The validator warns (COI_THIRD_PARTY) if your entrypoint references outside URLs.
  • Isolated games cannot run inside our play page's frame, so the play page opens them in the full browser window instead. They also do not receive the bridge SDK's session events. See The bridge SDK.

Precompressed files, explained

With precompressed: true, a file such as game/Build/app.wasm.br is treated as the Brotli-compressed form of game/Build/app.wasm, and .gz files as Gzip. Only names with an extension before .br or .gz count (data.json.gz does; archive.gz stays a normal download). If the flag is on but no such files exist, you get the warning PRECOMPRESSED_UNUSED. If a compressed file is corrupt or does not match its original, you get PRECOMPRESSED_INVALID.

What the validator rejects, and why

Your package travels to our servers and is then served to players on a domain we are responsible for. So we assume it could be malicious and check it strictly. All the problems we can safely detect are reported at once, each with a code, a path and a hint.

Archive and paths

  • ARCHIVE_TOO_LARGE: over 1 GB compressed.
  • UNPACKED_TOO_LARGE: over 2 GB unpacked, a single file over 1 GB, or a suspicious compression ratio over 100:1 (a "ZIP bomb" guard).
  • TOO_MANY_FILES: more than 20,000 files.
  • UNSAFE_PATH: absolute paths, .. or . segments, backslashes, control characters, paths over 240 bytes, names with leading or trailing spaces or a trailing dot, symbolic links, hard links and device files.
  • PATH_COLLISION: two names that differ only by upper or lower case or by Unicode normalization (they would clash on some systems), or a path that is both a file and a folder.
  • ARCHIVE_INVALID: a corrupt or encrypted ZIP.

Manifest and content

  • MANIFEST_MISSING: no oneprompt.yaml at the top of the archive.
  • MANIFEST_SYNTAX: invalid YAML, too large, or anchors, aliases or custom tags.
  • MANIFEST_SCHEMA: a missing or unknown field, a value of the wrong form, an entrypoint outside the content root or not an HTML file, or a metadata image that does not exist.
  • RUNTIME_UNSUPPORTED: a native runtime kind.
  • ENTRYPOINT_MISSING: the entrypoint file is not in the package. Remember that names are case-sensitive; the hint suggests the closest match.
  • CONTENT_UNEXPECTED: a file outside content.root, meta/ and oneprompt.yaml, or a file under the reserved folder __oneprompt/ inside your content root (that path belongs to the platform).
  • MIME_UNSAFE: executables and server-side scripts are never served from game origins. This covers, among others, .exe, .dll, .msi, .bat, .cmd, .ps1, .vbs, .sh, .app, .dmg, .pkg, .deb, .rpm, .apk, .ipa, .jar, .php, .asp, .aspx, .jsp, .cgi, .pl, .py, .rb, .htaccess, .htpasswd and web.config, also when compressed as .br or .gz.
  • PRECOMPRESSED_INVALID: see above.

Checks on our side only

  • MALWARE_DETECTED: the malware scanner flagged a file. Passing the scan does not mean a package is trusted; reports and reviews still apply.
  • SCAN_LIMIT_EXCEEDED: the scanner hit a time or size limit. We fail closed, so the deployment is refused.
  • HASH_MISMATCH: the uploaded bytes do not match the size or SHA-256 announced at upload. Upload again.
  • QUOTA_EXCEEDED: the upload would exceed your storage quota. See The Creator plan and your limits.

Tips that save time

  • Run oneprompt validate before every deploy; it catches almost everything in seconds.
  • Keep source files, design files and editor folders out of content.root. They cost storage and may trip MIME_UNSAFE.
  • The validator never runs your game, so "validation passed" does not mean "the game works". Always open the release from the dashboard after deploying.
  • For more on the rules your game's code must follow once it runs, read What your game can and cannot do in the browser.