Game SDK

↓ Download SDK 0.3.0

Internal VORIVOX development. Preview package: remaining gates are listed under compatibility.

HTML5 Game SDK

Start here. In an HTML5 game, VORIVOX integration belongs in one place: js/bootstrap.js. It receives launch context, connects the SDK and translates VORIVOX events into ordinary game calls. Gameplay, rendering, audio and UI stay separate.

Main rule: the game never talks to the controller or RS-485 directly. It receives target.hit from the SDK and starts gameplay only on session.start.

Recommended project layout

game/
├── index.html
├── js/
│   ├── bootstrap.js           # ← VORIVOX SDK integration lives here
│   ├── session.js
│   ├── gameplay.js
│   └── render.js
├── i18n/                      # ← all 12 VORIVOX languages are required
│   ├── ru.json  en.json  zh-Hans.json  es.json
│   ├── ar.json  hi.json  pt.json  fr.json
│   └── de.json  ja.json  kk.json  uz.json
├── assets/
└── vendor/vorivox.js

Where SDK code goes

The snippet below is a minimal js/bootstrap.js. In production, a trusted Runtime Host supplies launchManifest. For local development use the separate mock adapter. Never put a session token in a URL or source code.

Game developer checklist

Load local assets; connect; report ready; start mechanics only on session.start; ignore scoring while paused; complete exactly once; support all 12 VORIVOX languages; and for two players choose either alternating turns or a left/right split target.

Read next

For a first game follow Quickstart → First game → Hits → One and two players → Localization → Testing.

Code example

Integration excerpt: game-specific variables belong to the application. Playground contains the runnable reference.

import {VorivoxClient} from '../vendor/vorivox.js';

// launchManifest is injected by the trusted VORIVOX Runtime Host.
const sdk = new VorivoxClient(launchManifest);

sdk.on('session.start', ({player_count}) => game.start(player_count));
sdk.on('session.pause', () => game.pause());
sdk.on('session.resume', () => game.resume());
sdk.on('session.stop', () => game.stop());
sdk.on('target.hit', hit => {
  if (sdk.sessionState === 'running') game.onHit(hit);
});

await sdk.connect();
await game.loadAssets();
await sdk.ready('Main');