Build requirements

What a folder must look like to be pushed, and what the store does with it. Everything on this page is enforced by code that you can trigger with velox verify (before the push) and by the store and its CDN (during it).

The folder #

You push a folder (velox push <dir>). Its contents are the game, exactly as they will be served.

  • index.html at the root of the folder is the entry page. It is required and must not be empty. The CLI always names index.html as the entry; there is no other entry file.
  • velox.json next to it is required: see the reference. It is part of what is uploaded.
  • Everything else is yours: scripts, wasm, data files, images, audio. Directories are fine.
  • .git, node_modules, .DS_Store and velox-manifest.json are skipped; symbolic links are skipped, not followed.

Use relative paths #

A game does not live at the root of a web server. Its pages are served from a path that contains the build and the player's lease (/d/main/<build>/~<lease>/index.html), and the lease reaches every file only because the browser resolves relative URLs against it. Write ./game.js, assets/a.png, new URL("data.bin", import.meta.url). An absolute path such as /game.js leaves the build and answers 404 (or a lease error).

Limits #

LimitValue
Files in one build20,000
Length of a file's path512 characters, 255 per folder or file name; no empty, . or .. parts, no backslashes or control characters
Size of the whole build4 GiB on this store
Pieces on the wirefiles are uploaded in chunks of at most 4 MiB; only chunks the CDN does not have already are sent
The build's manifest (made by the CLI)8 MiB
Upload permissiona grant for one build, valid for 15 minutes
Cloud save1 MiB per save, 64 saves per player and game

What the verifier checks #

velox verify (and the first step of velox push) runs these. Errors stop a push; warnings do not.

CheckSeverityWhat it means
manifest.schemaerrorvelox.json exists and its identity, pricing and version fields are valid.
manifest.i18nerrorThe store texts have English; other languages, if present, are filled in; achievements and leaderboards are well formed.
bundle.entry_htmlerrorindex.html exists at the root and is not empty.
security.no_forbidden_trackerserrorNone of these hosts appears in any .html, .js or .mjs file: google-analytics.com, googletagmanager.com, doubleclick.net, connect.facebook.net, facebook.net, analytics.tiktok.com, hotjar.com, mixpanel.com, segment.io, clarity.ms. Games on Velox carry no ad or tracking scripts.
security.cross_origin_isolationerrorindex.html has no <script src> or <iframe src> pointing at another origin, and no <img src> at another origin without a crossorigin attribute.
sdk.handshakewarning (error for a game jam entry)Some file mentions the SDK (@velox/sdk, velox:ready, __VELOX_INIT__...). Without it the game still runs, but nothing talks to the player.

The store runs its own check again when you register a build, from the bytes the CDN holds (not from what your CLI claims), for builds of up to 2000 files and 16 MiB in total. It scans the text assets (.html, .js, .mjs, .css, .json) of up to 2 MiB each and 8 MiB together; binary files are never read. A build that fails the tracker or entry-page checks there is refused with verification_failed. A bigger build keeps the result your CLI reported, marked as self-reported.

Cross-origin isolation #

Every game is served cross-origin isolated, and so is the player page that embeds it. The CDN sets, on every file of a build:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Resource-Policy: cross-origin
Permissions-Policy: autoplay=(self), fullscreen=(self), gamepad=(self)
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin

SharedArrayBuffer and wasm threads therefore work. COEP: credentialless means a cross-origin resource is loaded without credentials instead of needing a CORP header from its server, so most third-party images and fonts still load. velox dev serves your folder with the same headers so you meet these rules on your machine first.

The sandbox and what it does not do #

The player embeds the game in an iframe with sandbox="allow-scripts allow-same-origin allow-pointer-lock allow-popups allow-forms": scripts run, the game keeps its own origin (so localStorage, IndexedDB and the Cache API work), it can lock the pointer, open popups and submit forms, and it cannot navigate the store page or start downloads. The frame is allowed cross-origin-isolated, autoplay, fullscreen, gamepad and clipboard-write; the camera, microphone and geolocation are not delegated to it.

  • Own origin. Each game has its own browser origin: <slug>.<cdn domain>. On a deployment that serves all games from one host, games are told apart by the path (/g/<slug>/) and share one origin: prefix your localStorage keys with the game's slug.
  • No content security policy is set on the game's files by the store. The store does not block your game's own network calls. That is also why the verifier looks for ad and tracking hosts in your code: it cannot stop what a game does at run time, so the rule is checked before you ship.
  • External scripts. <script src="https://..."> in index.html fails the verifier (see above). Loading a library from a CDN at run time from your own script is not detected, and is not recommended: the game would depend on a third party being up and on isolation rules, and the player's privacy promise ("no ads, no trackers") is yours to keep. Bundle what you need.
  • Entry page and __VELOX_INIT__. The CDN inserts a small script that sets __VELOX_INIT__ in front of the first script of your index.html. A UTF-16 encoded page cannot be edited safely and is served as uploaded: the SDK then finds no host and runs its emulator.
  • Files are immutable. A build is content-addressed: the same bytes are the same build, and a build id can never be reused for different content.
  • Compression. The CDN serves Brotli or Zstandard when the browser accepts it. Upload uncompressed files.

Versions, branches and demos #

A game has builds (velox push) and branches that say which build players get. default is what owners and free-to-play players run; demo is the instant demo (needs hasInstantDemo); beta can be protected by an access code; playtest is for playtest waves. Promoting to default goes live at once, and velox rollback puts the previous build back.