Bundle format and manifest
Deliverable
A single ZIP archive containing your static game files.
Required
| Path | Description |
|---|---|
index.html | Entry HTML (relative asset links) |
manifest.json | Declares metadata and which outcomes the game reports |
Recommended
| Path | Description |
|---|---|
cover.png / cover.jpg / cover.webp | Catalog cover at the archive root (Caught reads this from the ZIP on upload) |
assets/ | Bundled default game media (images, audio, fonts the game ships). Naming convention — put embedded defaults here, not at the ZIP root next to index.html |
screenshots/* | Optional extra catalog images |
assets/ vs author uploads: optional image / imageTranslateable inputs use placeholder mocks in the manifest (Caught emits SVG data URLs). Do not put author mock PNGs in the ZIP. When the author leaves an image input empty and the game still needs art, ship those fallbacks under assets/ and reference them with relative URLs (see Memory in Examples). Keep cover.* at the root — it is catalog chrome, not gameplay media.
Allowed file types (phase 1)
html, css, js, json, png, jpg, jpeg, webp, svg, woff2, mp3
Limits
| Limit | Value |
|---|---|
| ZIP size | 5 MB |
| Unpacked size | 20 MB total, 5 MB per file |
| File count | 50 |
| Nested ZIPs / archives | Not allowed |
Path traversal (..) | Not allowed |
sdk/ folder | Reserved for the injected SDK; not allowed in the ZIP |
<meta http-equiv> / <base> in HTML | Not allowed (Caught injects the CSP) |
| Scripted SVG | <script>, <foreignObject>, on*= attributes and javascript: links in .svg are rejected |
| Binary files | Must match their extension (png/jpg/webp/gif/svg/woff2/mp3 are sniffed) |
The Caught publish pipeline injects the SDK script into index.html and a Content-Security-Policy <meta> tag into every .html file. You may omit shipping caught-game-sdk.js yourself.
The policy allows the bundle's own files (inline scripts and styles included), data:/blob: images, images from the Caught content CDN, and nothing else: no fetch/XHR/WebSocket, no remote scripts, fonts or iframes, no forms. Test your game with the policy in place; network calls fail silently under it.
Example layout
my-minigame/
index.html
manifest.json
styles.css
game.js
cover.png # catalog cover (root)
assets/ # embedded default media (convention)
logo.png
pair-01.webp
back.webp
See Examples for shipped reference games (Pong, Memory, Connect, and others). Memory requires author cardImages (preview via mock).
manifest.json
{
"name": "Pong",
"version": "1.0.2",
"sdkVersion": "1",
"entry": "index.html",
"mode": "solo",
"outcomes": {
"result": ["win", "lose"]
}
}
Fields
| Field | Required | Description |
|---|---|---|
name | yes | Human-readable title; also the catalog identity. Read from the ZIP on upload (no form field). Only one published version is live per name. |
version | yes | Catalog version — see Versioning below. Digits-only MAJOR.MINOR.PATCH (e.g. 1.0.2). Read from the ZIP. Separate from internal build number. |
sdkVersion | yes | Use "1" for phase 1 |
entry | yes | Usually index.html |
mode | no | Hint only: solo | ranked | solo_or_ranked (does not replace outcomes; rank outcomes deferred) |
outcomes | yes | Which fixed SDK outcomes this game reports (see below). Hard gates reject uploads without it. |
inputs | no | Author-configurable fields for the playminigame action (see below). Max 25 fields. |
minPlaySeconds | no | Minimum elapsed seconds before a successful complete is accepted (0–3600). Default applies when omitted. |
usesActionId | no | true if the game seeds procedural layouts/levels from context.actionId. Root review then shows a regeneratable Layout ID in preview settings (not shown on the playminigame action form). Live play always passes the real action _id. |
Versioning
Caught treats manifest.version as an immutable catalog release id per minigame name.
| Rule | Detail |
|---|---|
| Format | Digits only: MAJOR.MINOR.PATCH (parts after the first may be omitted → treated as .0). Examples: 1.0.0, 1.2, 2. No prerelease/build suffixes (1.0.0-beta rejected). |
| Identity | Same name = same minigame. Authors pick by name; runtime always plays the live (latest published) build. |
| Monotonic | Each new ZIP for that name must have a version strictly greater than any prior published / revoked / in_review version for that name. Equal or lower → upload/publish rejected. |
| Compare | Numeric tuple order: 1.10.0 > 1.2.0 > 1.0.9. |
| Immutability | Never edit a published version in place. Bugfix / feature = bump version and re-upload under the same name. |
| Build number | Caught also assigns an internal auto-incrementing build number per name (not a substitute for manifest.version). |
| Config gate | Separately, declared inputs/outcomes must stay backward-compatible vs the previous live row (see below). |
Bump guidance (convention, not enforced beyond “must increase”):
- PATCH — bugfix / asset tweak, same declared inputs/outcomes
- MINOR — additive compatible config (new optional/required-with-mock fields, wider limits, new outcomes)
- MAJOR — intentional break → usually a new
nameinstead of shipping under the old catalog id
outcomes (required)
Declare the subset of predefined SDK outcomes your game actually calls in CaughtGame.complete. Do not invent custom keys. Rank/place is not supported yet.
| Subfield | Type | Description |
|---|---|---|
result | string[] | Non-empty subset of win | lose | draw |
Examples:
{ "result": ["win", "lose"] }
{ "result": ["win", "lose", "draw"] }
Effects:
- Review UI shows the declared outcomes for the game.
- Session init — Host passes
outcomesAllowedderived from this field. - Runtime —
completepayloads outside the declared set are rejected.
Keep outcomes in sync with what your code calls. Reviewers check that match.
inputs (optional)
Declare fields that Caught authors must (or may) fill when configuring playminigame. Values are validated on save and again at session start, then delivered on init as context.inputs (keyed by id).
| Field | Required | Description |
|---|---|---|
id | yes | Stable key for the game ([a-zA-Z][a-zA-Z0-9_]{0,31}). Unique within the manifest. |
type | yes | string | boolean | image | color | stringTranslateable | imageTranslateable | stringList | stringListTranslateable | stringImageList | stringImageListTranslateable |
required | no | true = mandatory in the action editor (author must fill). false/omit = optional; mock is shown as the default in the action editor. Required image / string-list fields need minCount ≥ 1. Per-field only — for column length / OR across fields see inputConstraints. |
label | yes | Admin label for en, nl, de (each ≤ 40 chars) |
help | yes | Admin explanation for en, nl, de (each ≤ 150 chars). Restate cross-field rules here even when inputConstraints enforces them. |
mock | yes | Developer defaults: used for root review, and as the action-editor default when required is false. Hard gates reject uploads without it. |
Type-specific:
| Type | Constraints | Author value shape | mock shape |
|---|---|---|---|
string | minLength / maxLength — integers, 0 ≤ minLength ≤ maxLength ≤ 2000; optional format: line (default) | paragraph | select; optional options (1–24) for a dropdown — each entry a string value or { "value", "label": { en, nl, de } }. Author value must be one of the option values (empty allowed if optional). | string | string (must match an option when options set) |
boolean | no extra constraints | boolean | boolean |
color | no extra constraints | #rrggbb hex (also accepts #rgb; stored normalized) | #RGB / #RRGGBB string |
image | minCount / maxCount (max 50; minCount may be 0 if optional); minWidth/maxWidth/minHeight/maxHeight (1–2560). Mins are hard floors (Caught rejects smaller; no upscale). Maxes auto-downscale on upload (same as icons/360). Prefer minWidth/minHeight = 1 unless the game truly needs a minimum. | string[] URLs | placeholder objects (or SVG data URLs) |
stringTranslateable | same as string (incl. format), applied per language | { en?: string, nl?: string, de?: string, … } | { en, nl, de } strings |
imageTranslateable | same image constraints as image, applied per language | { en?: string[], nl?: string[], … } | { en, nl, de } placeholder arrays |
stringList | minCount / maxCount (max 50); per-item minLength / maxLength (same caps as string). Empty strings inside the list are rejected. Admin UI: pills (Enter/blur commit; Backspace on empty input removes last; X removes one). | string[] | string[] |
stringListTranslateable | same counts/lengths as stringList, applied per language; every active GameType language must be filled when the field is non-empty | { en?: string[], nl?: string[], … } | { en, nl, de } string arrays |
stringImageList | itemMode either (tag and/or image per row) or both (tag and image); minCount/maxCount; text minLength/maxLength; image minWidth…maxHeight. Admin: one sortable list. | { text: string, image: string }[] | array of { text, image: placeholder|svg } |
stringImageListTranslateable | same as stringImageList, per language (images stay in sync across langs in the admin UI) | { en?: {text,image}[], … } | { en, nl, de } item arrays |
format (single-string types only): line → single-line text input in Caught admin; paragraph → textarea; select → dropdown (requires options; only on plain string). Omit or line for short titles; use paragraph for longer copy. Declaring options implies select UI even if format is omitted. Not used for stringList*.
Translateable fields follow Caught multilang maps. Authors must fill every active GameType language; the action editor uses the same LanguagePicker as other translated fields (one language at a time). Same type may appear multiple times (different ids). Max 25 fields total; max 50 uploads / list items per field (per language for translateable list/image types).
mock (required on every input)
- Root review — so the game can run without a configured GameType action (image placeholders → SVG data URLs).
- Optional fields in the action editor — when
requiredis false, Caught prefills the field frommockso authors see the game default; they can override. On save, the (possibly default) value is stored on the action. - All fields (including required) —
mockis the default when an author value is missing (review init, soft-adapt, live session). Required means “author should configure,” not “omit mock.” Always-latest updates must not break existing actions: new required fields need a usablemock.
Live play always uses stored author values (including saved optional defaults). Mocks are not a silent runtime fallback when a required field is missing.
inputConstraints (optional)
Top-level manifest array for cross-field rules Caught enforces on save, preview, and session start (same path as validateMinigameInputValues). Unknown constraint types are rejected at upload.
Supported today:
matchColumns
Equal row counts for left/right columns built from optional text lists and/or image lists (Connect pattern).
"inputConstraints": [
{
"type": "matchColumns",
"leftTexts": "leftTexts",
"leftImages": "leftImages",
"rightTexts": "rightTexts",
"rightItems": "rightItems",
"minRows": 2,
"maxRows": 10
}
]
Preferred (combined columns): leftItems / rightItems → stringImageList or stringImageListTranslateable.
Legacy (split fields): leftTexts / leftImages / rightTexts / rightImages → stringList* + image*.
| Rule | Detail |
|---|---|
| Items variant | Each side’s item list length ≥ minRows; left length = right length. |
| Split variant | Each side needs texts and/or images; if both, lengths match; left rows = right rows. |
| Translateable | Every active language’s array length must agree. |
| Bounds | minRows ≤ N ≤ maxRows. |
Columns may be required: true with minCount matching minRows when the author must always set content (Connect). Keep a usable mock for review/preview. Reference: Connect in Examples (leftItems/rightItems).
Cross-field conditionals (OR / depends-on)
Caught still validates most inputs fields independently. There is no general schema for:
requiredIf/dependsOn- Arbitrary “require A or B” / mutual exclusion / one-of groups
Do not invent those keys — hard gates reject unknown shapes.
When column length / text-or-image OR is the rule: declare inputConstraints.matchColumns so invalid combos cannot be stored. Still document the rule in each field’s help, keep related fields optional, and keep a valid mock combo for review.
When you need a conditional Caught does not enforce yet:
| Layer | What to do |
|---|---|
| Manifest | Keep related fields required: false. Document the rule in help. |
| Game runtime | After CaughtGame.onInit, validate the combination. If invalid, show a setup/error overlay and do not start play. |
| Combined content | If more than one branch is filled, prefer showing both when that helps players. |
| Empty optional branches | Do not silently refill an intentionally empty branch from assets/ or hard-coded demo content. Review/demo content belongs in mock. |
Optional fields — empty vs default
| Situation | Platform behaviour |
|---|---|
Optional string stored as "" | Treated as an explicit value — not replaced by mock on soft-adapt |
| Optional field missing on an existing action (new id after publish) | Filled from mock (applyOptionalInputDefaults) so always-latest does not break play |
Optional image stored as [] | Treated as missing for soft-adapt — refilled from mock if the mock array is non-empty |
Optional stringList / stringListTranslateable stored as [] / all-langs [] | Treated as an explicit empty value — not soft-refilled from a non-empty mock |
Game bundle assets/ | Prefer not — required content belongs in author inputs; preview/demo content belongs in mock. Avoid silent assets/ refill for required fields (e.g. Memory cardImages) |
Author-facing rule: optional means the author may leave it empty; the game must not pretend they filled it.
Images without ZIP assets: do not ship mock PNGs. Describe placeholders; Caught resolves them to data:image/svg+xml,… URLs at review init (CSP allows img-src data:):
{ "placeholder": true, "label": "A", "bg": "#4A90D9" }
labeloptional, ≤ 12 chars;bgoptional#RGB/#RRGGBB- Count must satisfy
minCount/maxCount - SVG size uses field
minWidth/minHeight(capped at 512px for mocks) - No
https://…or relative bundle paths inmock(optional escape hatch: already-data:image/svg+xmlstrings only)
Example:
"inputs": [
{
"id": "cardImages",
"type": "image",
"required": true,
"label": { "en": "Memory cards", "nl": "Memorykaarten", "de": "Memory-Karten" },
"help": {
"en": "Pair images for the board.",
"nl": "Afbeeldingen voor de paren.",
"de": "Bilder für die Paare."
},
"minCount": 2,
"maxCount": 12,
"minWidth": 256,
"maxWidth": 1024,
"minHeight": 256,
"maxHeight": 1024,
"mock": [
{ "placeholder": true, "label": "1", "bg": "#336699" },
{ "placeholder": true, "label": "2", "bg": "#993366" }
]
},
{
"id": "boardTitle",
"type": "string",
"required": false,
"label": { "en": "Board title", "nl": "Bordtitel", "de": "Bretttitel" },
"help": {
"en": "Shown above the grid.",
"nl": "Boven het raster.",
"de": "Über dem Raster."
},
"minLength": 0,
"maxLength": 40,
"mock": "Demo board"
}
]
Effects:
- Authoring UI —
playminigameopens a modal of cards (one per field) with client-side validation. - Server — manage save and web
createSessionre-validate against the live published definition. - Init (live) —
context.inputsfrom author config. - Init (review) —
context.inputsfrom resolvedmock(image placeholders → SVG data URLs).
Example complete payload
{
"status": "success",
"outcomes": { "result": "win" }
}
Equivalent SDK call:
CaughtGame.complete({ status: 'success', result: CaughtGame.RESULTS.WIN });
Protocol statuses: success | fail | abort.
What Caught authors configure
In the GameType action playminigame they select your minigame by name. Only one published version is live per name (publishing a newer version revokes the previous). Runtime always uses the latest published version. Authors configure:
- Property changes only for outcomes the game declares
- Declared
inputs(if any) in a card-based modal
Those mappings and values are not part of your ZIP — they live on the action and arrive via init.
Evolving inputs / outcomes under the same name
Caught stays on the latest published build. Publish rejects breaking declared-config changes vs the previous live version:
- removed/renamed field
id, type flip, existing field optional→required - tighter numeric bounds only: raise
minLength/minCount/minWidth/minHeight, or lowermaxLength/maxCount/maxWidth/maxHeight - removed outcome results
Widening those same min*/max* keys is fine. Prefer additive optional fields and new ids over renames. New required fields are allowed at publish when they have a usable mock (filled automatically so existing actions keep working). label / help / format / mock wording are not part of this gate.