Dicey Table

Scripting

Script a tabletop game in TypeScript

DiceyTable lets you script a tabletop game in TypeScript. Table scripts enforce your rules, track turns and scores, add actions to pieces and can declare the winner. You write them in a code editor built into the browser, with nothing to set up.

In the editor, choose New, then Script, and it opens with completions and type checks for the DiceyTable API. Call world.setTurn and the active seat's nameplate glows. Call world.setScore and scores appear by each name. The match API records moves and the result, and bots.register lets a bot take a seat's turn.

Press Preview to play a few turns and watch the script respond. Every API symbol has an entry in the Developer Docs, and every example there is compiled against the real API.

Illustration of a chess table script that uses the real bots, match and world APIs.

What is DiceyTable?

DiceyTable is a free 3D virtual tabletop with a game editor built in. For developers it adds a TypeScript scripting layer on top of the physics table, running in a sandbox, so a game can enforce its own rules.

Scripts have no network or storage access. Outside data comes only through a declared function on an installed plugin, and on-table UI and sound need a mod script rather than a table script.

Write your first table script

Open the editor, add a script and preview it on the table. The editor is free and runs in your browser.

Related