Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Make your game

Your agent starts a game in one of two ways: from an idea, with the game-builder skill, or from the example template with /spawnite:new-game. In Codex, which has no slash commands, you ask for either in words. The slash commands come with the plugin from Connect your agent, and with it your agent is ready when it answers list_templates with the example template. Without the plugin, your agent takes the same steps with the spawnite command, as the agent checklist says.

If you followed Install, my-game already holds the example: start your agent there and run /spawnite:game-builder with your idea, and the skill builds on that project. Otherwise, make the game in an empty folder of its own, in one of these ways:

  • To build a game from an idea, run /spawnite:game-builder with the idea, such as /spawnite:game-builder a cat collects fish before the tide comes in. In a folder that holds no game, the skill creates the project from the example template, then asks you one question at a time.
  • To start from the example, run /spawnite:new-game example my-game. It creates my-game, installs it, tells you what the example already does and which scaffold tools add to it, and asks what the game should do first.

In Codex, which has no slash commands, ask for the same thing in words, such as “Build me a game: a cat collects fish before the tide comes in”. Once the game exists, its .agents/skills/ holds the same skills, which Codex runs as $game-builder, $wiki and $model-builder.

The skill builds your game in six steps, in order: what game it is, the thing the player does most, where each model comes from, the player’s character, the camera, and the controls on a keyboard and on a phone. Each step asks you one question with two to four options, its recommendation first. Say “you decide” at any time, and it chooses every answer after that itself and lists what it chose under Assumptions.

Before the first question, it looks up two or three games like your idea and takes ideas from them, never their art, names or text. Each step ends with a commit and with proof in the form that fits it: a test for a rule, and a screenshot from a playtest for a look. The skill keeps the design in wiki/design.md in your game, so a later session continues from the first step that is not done. When the six steps are done, it shows you a round, what it proved and what it did not, and how to play the game yourself.

To play with friends, the game needs a room, which runs the world for every player. Once it is published unlisted, everyone with its link plays in one room until it is full, as Multiplayer says. When the skill creates the project, it asks whether the game is played alone or with friends, unless your idea already says, and creates it with a room for friends. A game that already exists, such as the my-game that Install writes, was made to play alone, and the skill does not ask. To give it a room, add the spawnite.room key that Run a room while you build shows to its package.json, and install @spawnite/room as a dev dependency, as spawnite create --room does.

A game installs @spawnite/engine and the other packages from npm, with no token and no .npmrc. Install lists what the engine needs beside it.

Your agent keeps the game’s items in src/items.ts: each item the game holds is registered there once by name, with what it does written as data, and the example’s file holds one potion. When you describe an item, such as a key that opens the vault, your agent writes it there. Inventory lists what an item can say.

While a game loads, its loading screen shows “Made with Spawnite” at its foot, with a link to spawnite.com. The line goes when the loading screen lifts, and it stays when a game draws its own loading screen, as the game page says.

Two public repositories are written again from every stable release. spawnite/examples holds the platform’s own games to read or copy, under MIT-0 apart from each game’s public/assets, which keep their own licenses. spawnite/templates holds the files spawnite add writes, under MIT-0.

To write the code yourself instead, read the tour of the example game, file by file.