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.
1. Create a game
Section titled “1. Create a game”spark new my-game # a game repository from the template, pinned to the current engine tagcd my-game && git init -b main && cargo fetchThe template brings a 3D scene, input map, scenarios, golden images and the
“Made with Sparklight” splash turned on in assets/splash.json.
2. Run it
Section titled “2. Run it”cargo run -- play # a window: the splash, then the gamecargo run -- play --gw-mute --no-splash # an agent's run: muted, straight into the game3. Test it without looking
Section titled “3. Test it without looking”cargo run -- scenario scenarios/boot.scenario3d.json --gw-mute # steps the scene, checks goldens and assertionscargo run -- headless --frames 600 # deterministic state hashScenarios and goldens are described in Testing; deterministic physics in Physics.
4. Let an agent drive the engine
Section titled “4. Let an agent drive the engine”spark mcp # MCP server over stdiospark commands --brief # every command, one line eachspark 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.
5. Ship through Gameway
Section titled “5. Ship through Gameway”Games reach players through the Gameway platform: friends, presence, invites, chat, achievements, stats and leaderboards are engine commands (Gameway platform).