Games
A Game is an app in your project that the AI agent builds as a playable game. It’s an Expo app, so the same game runs on iOS, Android, and the web. The game itself runs inside the app as a web view: the agent uses Phaser for 2D games and Three.js for 3D games.
You build a game the same way you build other apps: describe what you want in the chat, play it in the preview, and ask for changes. Instead of the Visual Editor, a Game has a Game tab where you can tune its speeds, colors, and difficulty yourself.
Adding a Game
Section titled “Adding a Game”Games live inside a project. To add one:
- Open your project and click Add app.
- On What would you like to add?, choose Game. To add it as a blank Phaser game without a prompt, choose Add blank app instead.
- If the project doesn’t have a backend yet, you’re asked whether you want one. Then pick the AI the game uses on How do you want to use AI?
- On How do you want to begin?, choose A template. In Choose a template, click a game, such as Endless Runner, Solitaire, or Tower Defense, to see its screenshots, then click Use this template. Without a template, the game starts from a blank Phaser game.
- Describe the game you want and click Start building.
You need the Editor role or higher to add apps to a project.
There are 39 game templates, 24 in 2D and 15 in 3D. Each one is a working game with title, gameplay, and results screens, and the agent changes it to match your prompt. To start a new project with a game, choose Game on What would you like to build first? when you create a project.
A good first prompt names the kind of game, how the player controls it, and how a round is won or lost. For example: “A one-thumb endless runner. Tap to jump over obstacles, the speed goes up every 10 seconds, and the run ends on the first hit.”
Playing your game in the preview
Section titled “Playing your game in the preview”The preview runs your game in a device frame, like any mobile app. Frames open in the orientation set in your app configuration, so a landscape game opens sideways. If you rotate a frame, your choice is saved and wins over the app configuration.
Tuning your game in the Game tab
Section titled “Tuning your game in the Game tab”Open the Game tab next to Chat to change your game’s settings without asking the agent. The tab reads game.config.json, a settings file at the root of your app where the agent keeps the values a player or designer would tune: speeds, timings, counts, sizes, colors, and on/off switches. The game reads its settings from this file, so a change in the tab changes the game.
Each setting gets a control that fits its value:
| Value | Control |
|---|---|
| A number with a range | A slider |
| A number without a range | A number field |
true or false | An on/off switch |
A color such as "#ff4f6d" | A color picker |
| Other text | A text field |
Settings that sit in a group in the file, such as player or enemies, show together under that group’s name.
Your changes are written to game.config.json a moment after you make them. Like any other edit, they stay unsaved until you click Save. If the agent changes the file while you’re editing, your last change isn’t applied, and the tab shows the agent’s version instead.
If the tab is empty
Section titled “If the tab is empty”If your game doesn’t have a settings file yet, the tab shows This game has no settings yet. Click Ask the agent to add settings, and the agent moves the game’s tunable values into game.config.json and makes the game read them from there.
If the file has a mistake, such as a missing comma, the tab says it can’t read the settings and points to the line when it can. Fix it in the code editor, or ask the agent to fix it.
Labels and ranges
Section titled “Labels and ranges”By default, the tab builds each label from the setting’s key and shows numbers as plain number fields. To get a clearer label, a slider, or a unit, add the setting to the optional $fields block in game.config.json, keyed by its group and name:
{ "player": { "speed": 300, "color": "#ff4f6d" }, "$fields": { "player.speed": { "label": "Player speed", "min": 100, "max": 600, "step": 10, "unit": "px/s" } }}You can also ask the agent to add labels and ranges for you.
Online features
Section titled “Online features”For features that need a database, such as leaderboards, saved progress across devices, or player accounts, add an API Backend to the same project. The game calls the API Backend for that data, and the agent can build both sides.
Store any public values your game reads, like an API URL, as environment variables. Names that start with EXPO_PUBLIC_ are built into the game, so anyone who installs it can read them. Never put secrets in those.
Publishing your game
Section titled “Publishing your game”A Game publishes like a mobile app: to the Apple App Store, Google Play, or the web as a Progressive Web App, with over-the-air updates for changes that don’t need a store review. See the Publishing Overview for each option.
The agent bundles every sprite, model, sound, and font with the app and loads them locally, because Apple doesn’t allow an app to download code after review.
Limits
Section titled “Limits”- Games don’t have the Visual Editor. Use the Game tab, the chat, or the code editor to make changes.
- The Game tab only edits values stored in
game.config.json. Level layouts, art, and game logic are changed through the chat or the code editor.