@jamunlabs/gameu-sdk
v0.3.4
Published
TypeScript-first SDK for building gameu games — Reducer/Renderer/GameRunner primitives, bridge codec, sound module, manifest + catalog schemas.
Readme
@jamunlabs/gameu-sdk
TypeScript-first SDK for building games on the gameu platform. Game devs get the shared runtime library, bridge codec, manifest schema, and catalog types without cloning the gameu host repo.
Status: v0.1.1 — runtime + tooling published. The full game-runtime
surface (Reducer, Renderer, GameRunner, createTvScene, sound, …)
re-exports from the bare @jamunlabs/gameu-sdk main entry. The companion
CLI (@jamunlabs/gameu-cli) ships gameu create, gameu dev,
gameu build, and gameu publish.
Install
npm install @jamunlabs/gameu-sdkExports
All exports are ESM-only; the package requires Node 18+.
| Export | Purpose |
|---|---|
| @jamunlabs/gameu-sdk (main) | Runtime primitives (Reducer, Renderer, GameRunner, createTvScene, installTvSceneDefaults, installDevMode, sound, simulate, EFFECT_KINDS, …) plus validateManifest + validateCatalogEntry |
| @jamunlabs/gameu-sdk/manifest | GameManifest, GameId, RuntimeKind, validateManifest |
| @jamunlabs/gameu-sdk/catalog | CatalogSource, CatalogEntry, Catalog, validateCatalogEntry |
| @jamunlabs/gameu-sdk/runtime | Direct ES-module facade over gameu-v1.js + gameu-sound-v1.js (the same exports the bare main re-exports) |
| @jamunlabs/gameu-sdk/gameu-v1.js | Shared runtime library (raw JS, also served via <script type="module">) |
| @jamunlabs/gameu-sdk/gameu-sound-v1.js | Sound helper (raw JS) |
| @jamunlabs/gameu-sdk/bridge_schema.js | Bridge message codec (raw JS) |
| @jamunlabs/gameu-sdk/client_schema.js | Client message codec (raw JS) |
Build a game (typical pattern)
import {
Reducer, Renderer, GameRunner,
createTvScene, installTvSceneDefaults, installDevMode,
EFFECT_KINDS, msg, sound,
} from "@jamunlabs/gameu-sdk";
const scene = createTvScene({ name: "my-game-tv" });
installTvSceneDefaults(scene);
scene.seal("production");
const runner = new GameRunner({ seams: scene.seams, reducer, renderer });
await runner.start();See the scaffolded CLAUDE.md produced by gameu create for the full
recipe.
Validate a bundle manifest
import { validateManifest } from "@jamunlabs/gameu-sdk/manifest";
const err = validateManifest(JSON.parse(manifestText));
if (err !== null) {
throw new Error(`Invalid manifest: ${err}`);
}Validate a catalog entry
import { validateCatalogEntry } from "@jamunlabs/gameu-sdk/catalog";
const err = validateCatalogEntry(rawEntry);
if (err !== null) {
console.error("Bad catalog entry:", err);
}Companion CLI
npm install -g @jamunlabs/gameu-cli
gameu create my-game
cd my-game && npm install && npm run build
gameu devgameu dev resolves a platform-specific host binary via npm
optionalDependencies (@jamunlabs/gameu-host-{linux,darwin,win32}-{x64,arm64}).
Until the binary publish pipeline runs, contributors can fall back to a
local cargo build via GAMEU_DEV_FROM_REPO=/path/to/gameu.
Repo
Source lives in the gameu monorepo: packages/sdk/. The four starter games
(TTT, S&L, Ludo, UNO) live in their own external repos and consume this
package via @jamunlabs/gameu-{tictactoe,snakesandladders,ludo,uno} on npm.
