Package the game yourself (for integrators)
Technical guide for anyone who wants to put a game made with VERB inside their own executable: an .exe signed with their certificate, an APK, an iOS app, their own launcher… It has nothing to do with the VERB Builder: it is another output of Publish → Export game, For integrators.
What you get
A non-encrypted zip with a folder that has the same routes the VERB player asks for in native mode:
| In the folder | What it is |
|---|---|
index.html | The game page: sets window.__VERB_NATIVE__ = true, the recommended CSP and loads the player. |
player/player.js | The VERB player (the engine). |
native/game.json | { manifest, game, assetFiles }: the project and the asset map. |
native/asset/<id>.<ext> | Each asset on its own, with its extension so the server sends its type. |
native/pack/<id> | The libraries of code minigames (Three.js, Phaser…). |
verb-integration.json | Contract version, languages, network, each asset with its MIME type, and the routes. |
THIRD-PARTY-NOTICES.txt | Third-party library notices: always distribute them. |
LICENCIA.md / LICENSE.md | What you may do with the player (below). |
LEEME.md / README.md | A summary of this page. |
The data is not encrypted: whoever packages it adds the protection. VERB's keys never leave our Runners.
Three levels
- Serve the folder as it is, over
http(s)or your own protocol (Electron'sprotocol.handle, Capacitor pointing to the folder, a static server). The game works fully; saves stay in the WebView storage. It does not work withfile://: the player reads withfetch. - Saves on disk: answer
native/saves(below) and callwindow.__verbDrain()before closing. Saves go wherever you want (your folder, your cloud…), encrypted or not. - Window and system:
native/windowfor fullscreen and to close; Android's back button (sendEscapeto the game) and background pause are up to you.
The contract (version 1)
All routes are relative to index.html. Each export says in verb-integration.json which version it uses (contract). Every new route will be optional and its failure will not break the game; removing or changing one bumps the version.
| Request | What it is | If it fails |
|---|---|---|
GET native/game.json | { manifest, game, assetFiles } | The game does not start |
GET native/asset/… | Each asset, with its Content-Type and range requests (Range) for audio and video | That asset does not load |
GET native/pack/<id> | A minigame library | That minigame does not start |
GET native/saves | { entries: [{ key, value }], damaged?: string[], dir?: string }: all saves | The WebView's are used |
PUT / DELETE native/saves?key=… | Save (the body is the value) or delete one; they arrive in order | The game says “The game could not be saved” |
POST native/window?fullscreen=1|0 | The window enters or leaves fullscreen with the game | Nothing |
POST native/window?close=1 | Close the window: Quit the game, if you announce it | The game goes back to the main menu |
window.__verbDrain() | Promise: waits until pending saves have been sent | — |
Details:
- If your server answers
index.htmlwith a 200 to what does not exist (many do), the game takes it as “no saves of its own” and uses the WebView's. damagedlists the saves you could not open, by file name (save-1,p2-save-3): they show in the menu as damaged and can be overwritten.- SVGs need
image/svg+xmlto show in the game; with the extension inassetFiles, any server sends it right.
Quit the game
The author can put a Quit the game button in the main menu or the pause menu, the block with the same name or UI PRO's Game.Exit command. It only shows if you announce that you can close the window:
- in
verb-integration.json, change"window": { "close": false }totrue, or - set
window.__VERB_CAN_QUIT__ = trueinindex.htmlbefore loading the player.
When pressed, the game calls window.__verbDrain() (pending saves) and then POST native/window?close=1: close your window when you get it. If you answer with an error, the game goes back to the main menu. In the VERB Runner it is always there.
Language
The game starts in the browser's language if it has it. To impose another one (the system's, the store's), set window.__VERB_LANG__ = 'en' before loading player/player.js, or open index.html?lang=en. It is the starting language: if the player picks another one in Options, theirs stays. A language the game does not have is ignored (the console says so).
To lock it (so it cannot be changed, e.g. if your launcher picks the language), add window.__VERB_LANG_LOCK__ = true: it overrides what the player chose and the language selector does not show (in UI PRO, Settings.LanguageLocked is true and Settings.Languages only has that language).
Network
index.html carries the same content policy (CSP) as the VERB Runner: the game only loads its own files, the trusted minigame libraries and UI PRO's fonts. The network opens only if the game needs it: multiplayer opens wss: and https:; plugins with network permission, their addresses. verb-integration.json lists it in network and carries the CSP in csp.
Outside the Runner, that CSP is a recommendation, not isolation: whoever packages the game can remove it. Plugins and code minigames are still isolated in their frames.
Recipes
Minimal examples, not tested automatically: check them with your version of each tool.
Electron
const { app, BrowserWindow, protocol, net } = require('electron');
const path = require('node:path');
const { pathToFileURL } = require('node:url');
protocol.registerSchemesAsPrivileged([{ scheme: 'game', privileges: { standard: true, secure: true, supportFetchAPI: true, stream: true } }]);
app.whenReady().then(() => {
const root = path.join(__dirname, 'game');
protocol.handle('game', (req) => net.fetch(pathToFileURL(path.join(root, new URL(req.url).pathname)).toString()));
new BrowserWindow({ width: 1280, height: 720 }).loadURL('game://app/index.html');
});For level 2, answer native/saves inside the same protocol.handle and save in app.getPath('userData').
Tauri 2
Register a protocol with register_uri_scheme_protocol that serves the folder and answers native/saves, as our Runner does.
Capacitor (Android, iOS)
Copy the folder into www/ and point webDir to it. Saves stay in the WebView (level 1). Still to be checked on a real device: range requests for audio and video.
Static server (Node)
Any server works if it sends the type by extension. This is the one we use in our tests:
import { createServer } from 'node:http';
import { readFile } from 'node:fs/promises';
import { extname, join } from 'node:path';
const TYPES = { '.html': 'text/html; charset=utf-8', '.js': 'text/javascript', '.json': 'application/json', '.png': 'image/png', '.webp': 'image/webp', '.svg': 'image/svg+xml', '.mp3': 'audio/mpeg', '.ogg': 'audio/ogg', '.wav': 'audio/wav', '.mp4': 'video/mp4' };
createServer(async (req, res) => {
const p = decodeURIComponent(new URL(req.url, 'http://x').pathname).replace(/\/$/, '/index.html');
try {
const body = await readFile(join('game', p));
res.writeHead(200, { 'Content-Type': TYPES[extname(p)] ?? 'application/octet-stream' }).end(body);
} catch {
res.writeHead(404).end();
}
}).listen(8080);Good to know
- Updating the engine means exporting again:
player/player.jscarries the engine inside. - Signing, icons and stores are up to you; see each platform's documentation.
- WebView requirements: WebGL2, Web Audio, iframes and workers (minigames and plugins),
fetchoverhttp(s)or your own protocol.
License
You may use the game commercially, package it in any executable and modify the player included in the package, without asking us and without paying. Third-party notices (THIRD-PARTY-NOTICES.txt) always go with the game. VERB Studio is free to use; its source code is not public.
A request, not a condition: if you can, mention “Made with VERB” in the credits, on a start screen or on the store page.