← Back to the app BodhiCloud · Developers

Third-party games and apps

Make a party game for BodhiCloud in an afternoon — by hand, or with an AI agent.

A game is one JSON package: its rules, its state, its board and its GUI. The platform runs the rules on the server (nobody can cheat), draws the GUI in the shared night look on phones, tablets and PCs, and gives every game the same rooms, voice and video, gifts, coins and friends. No uploaded code, no servers to run, nothing to pay. You validate, test in a sandbox, submit; a reviewer approves; it goes live in Community games and the App Center.

Contract: checking…

Six rules every game and app follows

E · Rules engine

The server decides every move

Your rules are declarative JSON run by the bounded interpreter. A client never settles an outcome; a command either passes your assertions or is refused with a reason.

S · Security

Roles come from the platform

Players, reviewers, room owners and wallets are the platform's. A game command grants none of those rights; private hands and secrets are projected per player.

V · Validation

Three layers, every time

Schema, capabilities and compilation on upload; fixed smoke games before review; the sandbox for you. Errors come with JSON paths.

G · JSON GUI

The shared night GUI

Screens, regions, stacks, tiles, hands, actions: a recursive tree the player renders with the platform's tokens. Every button is a declared command.

L · Layout

Phone, tablet, PC

One layout, responsive; touch targets of 44 px; strings in English, Chinese and Spanish (the on-device translator covers the rest).

T · Tests

Smoke games and a sandbox round

Upload runs bounded smoke games; you play a full round in the sandbox before you submit; reviewers play it again.

The complete rules (PLATFORM_RULES.md §0) are served at /game/api/v1/creator/rules; the authoring guide at /game/api/v1/creator/guide. Both are what the MCP server hands an agent first.

Quickstart

  1. Read the contract. GET /game/api/v1/creator/contract links everything: schemas, capabilities, the command registry, starter kits, the pipeline and what is not allowed.
  2. Fork a starter kit. GET /game/api/v1/creator/starter-kits/template.counting-race is a complete, valid package. Set manifest.id to pkg.<your username>.<slug>, the slug on every document id, name, description, license and languages.
  3. Write the rules and the GUI. The ruleset (state, constants, commands with input schemas and assertions, rules, events, invariants), the state machine, the board or topology, and the experience tree. Keep the shared GUI format.
  4. Validate. POST /game/api/v1/creator/packages/validate with the package JSON — no account needed — until it returns no errors.
  5. Upload and test in the sandbox. Sign in (a permanent account), POST …/creator/packages, POST …/creator/packages/:id/sandbox, make test players, start a match and play a whole round over /game/api/sandbox/v1/matches/:id/*.
  6. Submit. POST …/creator/packages/:id/submit. A platform reviewer plays it and approves it; the frozen version goes live in Community games and the App Center. A new version repeats the loop.

Signing in from a script or an agent

Write endpoints accept your browser's community cookie or a community.… Bearer token. A signed-in browser gets one from POST /game/api/v1/community/game-session {}; a script with a password account can call POST /game/api/v1/community/auth/login and then the same endpoint. Keep tokens out of package JSON, URLs, logs and git. Guests cannot author.

curl -s https://www.bodhicloud.ai/game/api/v1/creator/starter-kits/template.counting-race > kit.json
# edit kit.json (manifest.id, slug, rules, GUI) …
curl -s -X POST -H 'content-type: application/json' --data @kit.json https://www.bodhicloud.ai/game/api/v1/creator/packages/validate
curl -s -X POST -H "authorization: Bearer $BODHICLOUD_TOKEN" -H 'content-type: application/json' --data @kit.json https://www.bodhicloud.ai/game/api/v1/creator/packages

The same loop as tools, step by step, is the MCP server below (one file you download); the platform's own standalone example, a Tetris that validates, uploads, sandbox-tests and submits, does it over plain HTTP like the lines above.

The package

One JSON document (schema creator-package): a manifest and these documents.

DocumentDefinesNotes
gameTypeThe listed, joinable game; points at one compiled bundlestatus: draft until published
gameDefinitionRuntime kind (turn-based, real-time session), players, the state machine (phases, allowed commands, timeouts, terminal), projectionsWhich commands are legal in which phase
rulesetState schema and initial state, constants, random requests (dice, shuffles), commands (input schema + assertions), rules (conditions + effects), events, invariantsThe game itself; the interpreter is bounded (no loops without limits, no I/O)
stateSchemaThe match state contractplayers.<id>.private is that player's; secret is server-only
topology / boardRegions, spaces, connections, coordinates; a board carries tiles, prices, positions and visualsReuse the Monopoly toolkit's board or draw your own
experienceTheme, settings, the GUI tree, windows, placements, movement profiles, event presentationsRendered by the shared player; see gui-layout
presentationGUI layout per device, asset bindings, characters, arsenal, effects, audio, strings (en, zh-CN, es), piece labels, keyboard controlsClient-side only; never changes legal state

Ids are <kind>.<slug>…; published versions are immutable (bump manifest.version); a match pins the exact compiled bundle, so old matches replay against the version they started on.

API reference

On the website prefix every path with /game. Reads are public; writes need a permanent account (cookie or Bearer token); the sandbox needs an account too but never touches production data. Every response is JSON with an X-Request-ID; validation errors carry JSON paths.

Contracts (public)

CallPurpose
GET /api/v1/creator/contractLinks to everything below, the GUI theme, what is allowed, the pipeline
GET /api/v1/creator/guide · /rulesThe authoring guide and the platform rules (Markdown)
GET /api/v1/creator/mcp/bodhicloud-mcp.mjsThe MCP server (one file, Node 18+, no dependencies)
GET /api/v1/creator/capabilitiesRuntime kinds, capabilities, projections, random requests, expression operators, limits
GET /api/v1/creator/schemas · /schemas/:namePublished JSON Schemas (creator-package, creator-gui, command-envelope, entities, gameplay)
GET /api/v1/creator/gui-layoutThe recursive GUI vocabulary, limits and the starter experience
GET /api/v1/creator/servicesShared services a game may open (voice/video rooms, recording, P2P files, gifts), permissions and limits
GET /api/v1/schemas/commandsThe live command registry: every command, its parameters, engine mapping and where it runs
GET /api/v1/creator/starter-kits · /starter-kits/:idPackages to fork and the platform assets they reference
GET /api/v1/creator/data/:resourceRead-only projections: game-types, catalog, me, player — nothing else is reachable
GET /api/v1/apps/catalogThe App Center catalog with the live community games

Packages and review

CallPurposeWho
POST /api/v1/creator/packages/validateValidate and compile without storing; errors with JSON paths, or the bundle hashanyone
POST /api/v1/creator/packagesUpload a draft (owner = you); runs bounded smoke gamesaccount
GET /api/v1/creator/packages?mine=1 · /packages/:id · /packages/:id/changes · /packages/:id/commandsYour packages (without mine=1: every published package too), one package with its state and review history (the reviewer's notes), what changed since the last version, the draft's command registryowner
POST /api/v1/creator/packages/:id/submitAsk for review (refused while the package has errors)owner
POST /api/v1/creator/packages/:id/approve · /request-changes · /reject · /unpublishThe review; approval compiles, freezes the version and registers it livereviewer (unpublish: owner too)

Sandbox

CallPurpose
POST /api/v1/creator/packages/:id/sandboxDeploy your draft into your isolated sandbox
GET /api/v1/creator/sandboxWhat is deployed and your test players
POST /api/v1/creator/sandbox/test-players · DELETE …/test-players/:idSynthetic players that exist only in the sandbox (their tokens play on the sandbox API)
POST /api/v1/creator/sandbox/matchesA sandbox match: gameTypeId, bots, test players, start, seed
GET /api/v1/creator/sandbox/matches/:id/play-kit · /debugAn invited player's GUI, strings and commands; the raw state (owner and reviewers)
GET/POST /api/sandbox/v1/matches/:id/*The same gameplay API as production, on sandbox matches: snapshot, join, start, connections, commands ({commandId, expectedRevision, commandType, payload}), heartbeats, reconnect. A move needs a connection: POST …/matches/:id/connections once, then send its x-match-connection-id and x-match-reconnect-token headers with every command (the MCP server does this for you)

Playing (production, unchanged for creator games)

CallPurpose
GET /api/v1/game-typesPublished games, yours next to the platform's
POST /api/v1/matches {gameTypeId} · join · start · /matches/:id/commands · snapshot · replay · watchThe match protocol; the shared player uses it in production and in the sandbox
POST /api/v1/creator/services/games/:gameTypeId/rooms · GET …/services/rooms/:roomIdA private talk/video room for a game's table, with the player's own identity

Browser automation and AI testing

The hosted player exposes its command bus: await window.__commands.ready(), window.__commands.list() to find a move by engine.gameTypeId and engine.commandType, window.__commands.dispatch({type, params, origin: "script"}), window.__commands.log(). The server still decides every move.

The sandbox

Your draft runs in an isolated copy of the game server: its own registry, in-memory matches (idle ones deleted after 24 hours), the same accounts looked up read-only, plus synthetic test players. Nothing is copied into production; approval publishes the reviewed package version, never sandbox data. Service rooms are disabled for drafts; everything else — the GUI, commands, private hands, the debug view — is what players will get.

Packages are declarative JSON, so there is no third-party code to contain: the sandbox isolates data, not processes.

Installing third-party apps and games

For players

Where your game appears

Approved games are listed in the App Center under Community games (name, author, description, players, tags) with Play and Add to my apps, in the Games tab, and in GET /api/v1/game-types. Anyone can play free as a guest; a member's My apps follows their account across devices.

For players

Getting the BodhiCloud app

The App Center's Get the app row: Android APK, Windows installer, Steam, iPhone and iPad (Safari → Share → Add to Home Screen); the web app installs from the address bar. Every third-party game runs inside it — no separate download.

For developers

Games

A game is a package (above). It needs no binary, no store listing and no server of yours: review puts it in the App Center. New versions go through the same loop; old matches keep their version.

For developers

Apps and mini apps

Party apps and mini apps that are pages of the platform are listed in the App Center catalog; a third-party app today is a game package or a web page opened in the shared player. Native binaries belong to the platform's own builds (signed and published under /downloads/), not to packages.

The MCP server — let an AI agent build it

An MCP (Model Context Protocol) server exposes everything on this page as tools: Claude Desktop, Claude Code, Cursor, Codex or any MCP client can read the rules, fork a starter kit, validate, upload, play a round in the sandbox and submit — with you deciding the slug, the rules and the look. It is one file with no dependencies (Node 18+): download it from /game/api/v1/creator/mcp/bodhicloud-mcp.mjs and point your client at it.

curl -o bodhicloud-mcp.mjs https://www.bodhicloud.ai/game/api/v1/creator/mcp/bodhicloud-mcp.mjs
node bodhicloud-mcp.mjs --describe   # the tool list, to check it runs
{
  "mcpServers": {
    "bodhicloud": {
      "command": "node",
      "args": ["/full/path/to/bodhicloud-mcp.mjs"],
      "env": { "BODHICLOUD_API": "https://www.bodhicloud.ai/game/api/v1", "BODHICLOUD_TOKEN": "community.…" }
    }
  }
}

Reading the contracts needs no account. Authoring tools need BODHICLOUD_TOKEN (a game-session token) or the login tool with a password account. Then ask the agent for the make_party_game prompt with your idea. The agent cannot approve its own package: a platform reviewer does.

Tools

Loading the tool list…

BodhiCloud inside your Unity or Unreal game

The other way round: your game stays yours, and BodhiCloud lives inside it as a thin panel — the same screens as the app (the Channel feed, chats, the profile, the gift tiles), laid out by our server for your window, drawn by a small package in your engine. Players tap in your game; our server runs the app's own commands for them. No rules, no words and no colours live in your engine: when the app changes, your game changes with it on the next request.

Unity

com.bodhicloud.shell

A UPM package (C#, UGUI, no dependencies). Add it from apps/unity/com.bodhicloud.shell, drop BodhiCloudShell on a GameObject, set the key, press Play.

Unreal

BodhiCloudShell plugin

A C++ plugin (UMG, Blueprint-callable). Copy apps/unreal/BodhiCloudShell into your project's Plugins/, set the key on the subsystem, call Open.

Anything else

The HTTP API

Godot, a web game, a console: GET /game/api/v1/engine/screen gives the screen as rectangles, POST /command runs a tap. Two headers: your key and the player's id.

How it works

  1. A key for your game. Make one below (signed in). It names your game to our server; keep it in your game's secrets, never in a client build you cannot update — a leaked key is revoked here in one click.
  2. A player id. Whatever your game knows a player by (your account id, a Steam id, a device id). The first visit makes a BodhiCloud guest for it; a code shown inside the panel, typed in the app under ⋮ → Linked accounts → A game, makes it the player's own account.
  3. Screens as rectangles. GET /screen?w=&h= answers the whole screen laid out for that size: every box, text, picture, icon and input with its rect, colour, font and what a tap sends. Pictures are PNG / JPEG addresses from /manifest; icons come from one sprite sheet.
  4. Taps and typed text. POST /command with the node's tap and the inputs' text; the answer carries the next screen. Poll /screen with the last rev at the rate the screen asks for (a chat every 4 s).
RouteHeadersAnswer
GET /game/api/v1/engine/manifestx-bodhi-app-key your key
x-bodhi-player the player's id
x-bodhi-player-name optional
x-bodhi-engine unity / unreal / other
pictures by key → address, the icon sheet and its index, fonts, polling rates
GET /game/api/v1/engine/methe player's BodhiCloud account (guest or linked)
GET /game/api/v1/engine/screen?tab&list&route&id&menu&lang&w&h&revthe laid-out screen (bodhi-ui@1), or { same: true } when rev still holds
POST /game/api/v1/engine/commandbody { type, params, inputs, nav, lang, w, h, requestId } → the next navigation and screen, a toast
POST /game/api/v1/engine/link/starta code the player types in the app (10 minutes)
GET /game/api/v1/engine/linkwho the player is linked as

Your keys

Sign in to make a key for your game.

Rules inside a game: words and pictures from the app, text chat and the feed; no wallet, no coins and no purchases inside the panel (a store's own rules for in-app purchases apply to your build, and ours stay in the app); every player text is the app's own, cleaned the same way. Full design: docs/design/ENGINE_SDK.md.