Skip to main content

Bundle format and manifest

Deliverable​

A single ZIP archive containing your static game files.

Required​

PathDescription
index.htmlEntry HTML (relative asset links)
manifest.jsonDeclares metadata and which outcomes the game reports
PathDescription
cover.png / cover.jpg / cover.webpCatalog 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​

LimitValue
ZIP size5 MB
Unpacked size20 MB total, 5 MB per file
File count50
Nested ZIPs / archivesNot allowed
Path traversal (..)Not allowed
sdk/ folderReserved for the injected SDK; not allowed in the ZIP
<meta http-equiv> / <base> in HTMLNot allowed (Caught injects the CSP)
Scripted SVG<script>, <foreignObject>, on*= attributes and javascript: links in .svg are rejected
Binary filesMust 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​

FieldRequiredDescription
nameyesHuman-readable title; also the catalog identity. Read from the ZIP on upload (no form field). Only one published version is live per name.
versionyesCatalog version — see Versioning below. Digits-only MAJOR.MINOR.PATCH (e.g. 1.0.2). Read from the ZIP. Separate from internal build number.
sdkVersionyesUse "1" for phase 1
entryyesUsually index.html
modenoHint only: solo | ranked | solo_or_ranked (does not replace outcomes; rank outcomes deferred)
outcomesyesWhich fixed SDK outcomes this game reports (see below). Hard gates reject uploads without it.
inputsnoAuthor-configurable fields for the playminigame action (see below). Max 25 fields.
minPlaySecondsnoMinimum elapsed seconds before a successful complete is accepted (0–3600). Default applies when omitted.
usesActionIdnotrue 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.

RuleDetail
FormatDigits 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).
IdentitySame name = same minigame. Authors pick by name; runtime always plays the live (latest published) build.
MonotonicEach 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.
CompareNumeric tuple order: 1.10.0 > 1.2.0 > 1.0.9.
ImmutabilityNever edit a published version in place. Bugfix / feature = bump version and re-upload under the same name.
Build numberCaught also assigns an internal auto-incrementing build number per name (not a substitute for manifest.version).
Config gateSeparately, 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 name instead 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.

SubfieldTypeDescription
resultstring[]Non-empty subset of win | lose | draw

Examples:

{ "result": ["win", "lose"] }
{ "result": ["win", "lose", "draw"] }

Effects:

  1. Review UI shows the declared outcomes for the game.
  2. Session init — Host passes outcomesAllowed derived from this field.
  3. Runtime — complete payloads 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).

FieldRequiredDescription
idyesStable key for the game ([a-zA-Z][a-zA-Z0-9_]{0,31}). Unique within the manifest.
typeyesstring | boolean | image | color | stringTranslateable | imageTranslateable | stringList | stringListTranslateable | stringImageList | stringImageListTranslateable
requirednotrue = 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.
labelyesAdmin label for en, nl, de (each ≤ 40 chars)
helpyesAdmin explanation for en, nl, de (each ≤ 150 chars). Restate cross-field rules here even when inputConstraints enforces them.
mockyesDeveloper defaults: used for root review, and as the action-editor default when required is false. Hard gates reject uploads without it.

Type-specific:

TypeConstraintsAuthor value shapemock shape
stringminLength / 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).stringstring (must match an option when options set)
booleanno extra constraintsbooleanboolean
colorno extra constraints#rrggbb hex (also accepts #rgb; stored normalized)#RGB / #RRGGBB string
imageminCount / 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[] URLsplaceholder objects (or SVG data URLs)
stringTranslateablesame as string (incl. format), applied per language{ en?: string, nl?: string, de?: string, … }{ en, nl, de } strings
imageTranslateablesame image constraints as image, applied per language{ en?: string[], nl?: string[], … }{ en, nl, de } placeholder arrays
stringListminCount / 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[]
stringListTranslateablesame 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
stringImageListitemMode 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 }
stringImageListTranslateablesame 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 required is false, Caught prefills the field from mock so authors see the game default; they can override. On save, the (possibly default) value is stored on the action.
  • All fields (including required) — mock is 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 usable mock.

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*.

RuleDetail
Items variantEach side’s item list length ≥ minRows; left length = right length.
Split variantEach side needs texts and/or images; if both, lengths match; left rows = right rows.
TranslateableEvery active language’s array length must agree.
BoundsminRows ≤ 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:

LayerWhat to do
ManifestKeep related fields required: false. Document the rule in help.
Game runtimeAfter CaughtGame.onInit, validate the combination. If invalid, show a setup/error overlay and do not start play.
Combined contentIf more than one branch is filled, prefer showing both when that helps players.
Empty optional branchesDo 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​

SituationPlatform 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" }
  • label optional, ≤ 12 chars; bg optional #RGB / #RRGGBB
  • Count must satisfy minCount/maxCount
  • SVG size uses field minWidth/minHeight (capped at 512px for mocks)
  • No https://… or relative bundle paths in mock (optional escape hatch: already-data:image/svg+xml strings 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:

  1. Authoring UI — playminigame opens a modal of cards (one per field) with client-side validation.
  2. Server — manage save and web createSession re-validate against the live published definition.
  3. Init (live) — context.inputs from author config.
  4. Init (review) — context.inputs from resolved mock (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 lower maxLength / 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.