Betacade
v1.0.1Deploy web game builds and read playtests: who played, errors, feedback, bugs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_games List games
The games this connection can reach (its own studio's and any it's a member of), each with your role on it, its id and its play link. latestBuildNumber is the newest public build, the one the play link plays; game_settings lists private ones too.
create_game Create a game
Make a new game in your own studio, or with studio in one you joined as a developer (it's the studio's game); returns its id, slug and play link. A new version of an existing game (list_games) is a new build of it, not a new game. Game state must live in browser storage: Betacade reads a game's progress and metrics from its localStorage, as JSON under readable keys (e.g. "save" -> {"level": 3, "deaths": 12}), so a game that saves often gets better analytics, with no platform code in the game. IndexedDB isn't read, and Unity and Godot web builds save there by default, so their state has to be m…
| Parameter | Type | Description |
|---|---|---|
name * | string | The game's name, as players see it. |
studio | string | A joined studio's id, from list_games' joinedStudios. Omit for your own studio. |
studioName | string | The studio's name, shown on the play page as "<game> by <studio>". |
move_game Move a game to a studio
Hand one of your own games to a studio you joined as a developer: its play link, builds, testers and playtests go with it, the studio owns it (its limits apply, and only its owner can delete it), and you stay a developer on it. Only the studio's owner can move it on afterwards, so confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
studio * | string | The studio's id, from list_games' joinedStudios. |
start_build Start a build
Start a new build of a game. List the files of the exported build folder (paths relative to it, with sizes; add sha256 to skip files already uploaded), or for more than about 20 files make an archive first (tar -czf build.tar.gz -C <build-folder> .) and pass its size. Returns pre-signed upload URLs and the curl commands that upload from the build folder; finish_build then puts the build live. A build may unpack to 100 MB (500 MB for a Pro studio) and an archive may be up to 150 MB, so a bigger Pro build (an Unreal Engine Web build, say) uses files mode. Builds are public: anyone with the play…
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
archiveSizeBytes | integer | Archive mode instead: the size of build.tar.gz (or a .zip) in bytes. |
branch | string | The git branch it was built from, shown with commit. |
commit | string | The git commit it was built from (7 to 40 hex characters). |
files | array | Files mode: every file of the build folder. |
idempotencyKey | string | Send the same key to retry this start safely. |
notes | string | What changed in this build, shown to the studio. |
replayable | boolean | replayable records sessions for smooth replay, which needs the game to register wt.onSnapshot and wt.onReplay and draw a frame from the state it's handed. Both need saves and replays on for the studio… |
resumable | boolean | resumable lets testers resume their saves, which is correct only when the game keeps all its state in localStorage and loads it from there at startup. Both need saves and replays on for the studio, wh… |
visibleTo | Private build (Pro): group ids from game_settings who may play it. Omit for everybody. |
finish_build Finish a build
Finish a build once its uploads are done: it goes live, and this returns its play link, or what's wrong.
| Parameter | Type | Description |
|---|---|---|
buildNumber * | integer | From start_build. |
gameId * | string | The game's id, from list_games. |
deploy_files Deploy files
Deploy a small new build in one call, with the files' contents in it: for a chat with no shell (no curl). Up to 20 files and 2 MB in all, with an index.html; text as utf8, anything else base64. Returns the play link, as finish_build does. edit_files changes a deployed game by sending only the changes. Bigger builds go through start_build (from a machine with a shell), or deploy on push from a GitHub repository. Builds are public: anyone with the play link can download every file, so a build must never contain secrets (API keys, tokens, credentials). A build is the folder the engine exported (t…
| Parameter | Type | Description |
|---|---|---|
files * | array | Every file of the build, with its contents (up to 20, including index.html). |
gameId * | string | The game's id, from list_games. |
notes | string | What changed in this build, shown to the studio. |
replayable | boolean | replayable records sessions for smooth replay, which needs the game to register wt.onSnapshot and wt.onReplay and draw a frame from the state it's handed. Both need saves and replays on for the studio… |
resumable | boolean | resumable lets testers resume their saves, which is correct only when the game keeps all its state in localStorage and loads it from there at startup. Both need saves and replays on for the studio, wh… |
visibleTo | Private build (Pro): group ids from game_settings who may play it, or [] for your studio only. |
edit_files Edit files
Make a new build from an existing one (the newest ready build unless you name one in from) by sending only the changes: find-and-replace edits (oldText must appear exactly once in its file), whole files (content), or deletions, across files. Every other file carries over unchanged, so a build of any size costs only what changed. The edits apply in order, all or nothing: one that doesn't match makes no build and says which edit and why; get_files (path, or search) shows the file as it is. The build keeps from's resumable, replayable and visibleTo unless they're sent. Builds are public: anyone w…
| Parameter | Type | Description |
|---|---|---|
edits * | array | The changes, applied in order, all or nothing: each one is oldText with newText, content, or delete: true. Up to 100. |
gameId * | string | The game's id, from list_games. |
from | integer | The build you read (get_files' buildNumber); refused if a newer build has appeared since. Default the newest ready one. |
notes | string | What changed in this build, shown to the studio. |
olderOk | boolean | true: start from an older build on purpose (a rollback). |
replayable | boolean | replayable records sessions for smooth replay, which needs the game to register wt.onSnapshot and wt.onReplay and draw a frame from the state it's handed. Both need saves and replays on for the studio… |
resumable | boolean | resumable lets testers resume their saves, which is correct only when the game keeps all its state in localStorage and loads it from there at startup. Both need saves and replays on for the studio, wh… |
visibleTo | Private build (Pro): group ids from game_settings who may play it, or [] for your studio only. |
get_files Get files
Read a build (the newest ready one unless you name it): its files with their contents when the build is small, otherwise the list with sizes. path reads one file, and fromLine/toLine just those lines, numbered; search finds a text across the build's text files, with line numbers; edit_files then changes them. Text comes back as utf8, anything else base64; contents up to 256 KB a call.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
build | integer | A build number; default the newest ready one. |
context | integer | With search: lines of context around each match; default 2. |
fromLine | integer | With path: the first line to return (1-based). |
path | string | One file, relative to the build's root. |
search | string | Text to find (exact, case-sensitive) in every text file, or in path's. |
toLine | integer | With path: the last line to return. |
who_played Who played
A game's testers, most recently seen first: alias, sessions, play time, builds played, errors, and how far they got on the game's pinned metrics. aiSessions counts sessions an AI agent played (betacadeAgent); session_evidence marks each with agent. Use a testerId with session_evidence.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
limit | integer | Default 50. |
session_evidence Session evidence
One tester's sessions, newest first: the build each was on, play time, errors with stacks and console lines, and (with saves and replays) save points, their feedback, bugs and replay links to the studio's viewer.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
testerId * | string | A testerId from who_played. |
limit | integer | Sessions; default 10. |
list_bugs List bugs
The game's issue board: each bug's lane (stage: new, looking, testing, fixed, wont_fix), who reported it, the session and moment it came from, and how players answered a fix. Open lanes by default. reportedBy is the tester whose session it was filed from; reporterCount is how many players wrote in about it, so how many would be asked once it's fixed.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
limit | integer | Default 50. |
stage | string | A lane, or open (default), closed or all. |
update_bug Update a bug
Move a bug on the board. stage "testing" needs fixedInBuild (the build with the fix); notify: true then sends the players who reported it a message asking them to try that build, with an optional note. "fixed" is for a fix that's confirmed.
| Parameter | Type | Description |
|---|---|---|
bugId * | string | From list_bugs. |
gameId * | string | The game's id, from list_games. |
fixedInBuild | integer | The ready build with the fix; goes with stage testing or fixed. |
note | string | With notify: a message to the players being asked. |
notify | boolean | true (with stage testing): message the players who reported it, asking them to try fixedInBuild. |
stage | string | The lane to move it to: new, looking (in progress), testing (ready to test, needs fixedInBuild), fixed (confirmed) or wont_fix. |
custom_events Custom events
What the game recorded with window.wt?.track(name, fields) while players shared data. With no name: the event names and their fields. With name (and a numeric field): per build, how many and in how many sessions, and the field's median, p90, mean, min and max, e.g. name "reaction", field "area" for the median area of reaction per build. With sessionId: that session's events in order, each with how far into the session it happened (atMs).
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
field | string | A numeric field of that event. |
name | string | An event name, from a call without one. |
sessionId | string | A session id (who_played, session_evidence). |
game_settings Game settings
A game's play link, its recent builds (who may play each, resumable, replayable), the studio's groups for private builds, its plan, and whether saves and replays are on for the studio. update_build changes a build.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
discord_activity Put a game in Discord
A game in Discord, as an Activity: listed (true) or not in Betacade's Discord app, its launch link, the link that adds Betacade's app to a server, and the studio's own Discord app if linked, with the Developer Portal steps for one (for "Playing <your game>"; linking it takes its secret, so the human does that in the studio's Game page or with PUT /v1/games/{gameId}/discord/app). Leave listed out to just read. Only public builds launch.
| Parameter | Type | Description |
|---|---|---|
gameId * | string | The game's id, from list_games. |
listed | boolean | List it in Betacade's Discord app (true) or take it out (false). |
update_build Update a build
Change one build's settings: resumable, replayable, and who may play it (visibleTo). Returns the game's settings, as game_settings does. resumable lets testers resume their saves, which is correct only when the game keeps all its state in localStorage and loads it from there at startup. replayable records sessions for smooth replay, which needs the game to register wt.onSnapshot and wt.onReplay and draw a frame from the state it's handed. Both need saves and replays on for the studio, which a new studio doesn't have yet (on request). visibleTo: group ids (Pro) or [] (the studio only) makes a b…
| Parameter | Type | Description |
|---|---|---|
build * | integer | The build to change. |
gameId * | string | The game's id, from list_games. |
replayable | boolean | true records this build's sessions for smooth replay; false stops it. |
resumable | boolean | true lets testers resume their saves on this build; false stops it. |
visibleTo | Group ids who may play it (Pro), or null for everybody. |