9 Home
yuris edited this page 2026-08-22 17:21:29 +07:00

SpacetimeDB Defold SDK

Documentation for the SpacetimeDB 2.x client SDK for Defold. The README introduces the SDK and what it can do, and these pages carry the detail behind it.

Start at Quickstart, which goes from an unpublished module to a connected game. Installation is the two dependency URLs it assumes.

There are two tracks below, one for shipping a game with the SDK and one for changing the SDK itself.

Using the SDK in a game

Roughly in order of when you need them.

Page What it covers
Quickstart The tutorial. Publish a module, generate its schema, then connect, subscribe, call a reducer and read rows, in callback and coroutine form
Installation Adding the SDK to a project: the two dependencies, the Defold version it needs, tag pinning, private-repo tokens, and the one HTML5 difference
Example Project dev/example-chat/: a small, complete, openable Defold project, and how to run it without the repo's symlink
Usage Guide Day-to-day work past the first connection: per-table callbacks, query sets, handles, reconnect, identity, provider auth, event tables, views and row value types
API Reference Looking up an exact signature, option, event or unit: every module and method, with the special types and what they decode to

Working on the SDK

Page What it covers
Development Repo layout, the dev server, both conformance tiers, the frame-cost benchmarks, and regenerating fixtures
Protocol Notes The wire archive: captures, encodings, byte and latency tables, and the upstream code behind a behaviour
Roadmap Where the SDK is going, what is deliberately not planned, and why the wire format decides most of it

New here? Quickstart.