Skip to content

Getting started

Sparklight is a Rust engine whose first user is an agent: every editor action is a typed command, every result can be checked without a screen. Games live in their own repositories and pin the engine by tag.

Terminal window
spark new my-game # a game repository from the template, pinned to the current engine tag
cd my-game && git init -b main && cargo fetch

The template brings a 3D scene, input map, scenarios, golden images and the “Made with Sparklight” splash turned on in assets/splash.json.

Terminal window
cargo run -- play # a window: the splash, then the game
cargo run -- play --gw-mute --no-splash # an agent's run: muted, straight into the game
Terminal window
cargo run -- scenario scenarios/boot.scenario3d.json --gw-mute # steps the scene, checks goldens and assertions
cargo run -- headless --frames 600 # deterministic state hash

Scenarios and goldens are described in Testing; deterministic physics in Physics.

Terminal window
spark mcp # MCP server over stdio
spark commands --brief # every command, one line each
spark call space3d.load '{"path": "assets/scenes/main.space3d.json"}'

The command surface, its schemas and error codes are in Commands. The full index of agent references is here.

Games reach players through the Gameway platform: friends, presence, invites, chat, achievements, stats and leaderboards are engine commands (Gameway platform).