How to make games in Codex: the Codex CLI, the ChatGPT app, or your ChatGPT plan inside Flockbay
By Eduardo Orellana · Updated
Flockbay is free, and so is its AI: every account gets free AI each day on the hosted model, called Demo. When the free usage for the day runs out, it comes back the next day. You can also build on your Claude plan (Pro or Max) or your ChatGPT account (any plan, Free included) in the app, your own agent over MCP, or your own API key, and you pay the company that runs your model, never Flockbay. The download, the editor, Play and export are free. Pictures and sound run on the free AI. A 3D model uses your own Tripo key. Flockbay has no paid plans. Codex makes games when it can run them: connect it to Flockbay with one codex mcp add line, and Codex puts together a Godot 4 game in the editor Flockbay hosts, runs it, reads its errors and playtests it. If you would rather not run Codex yourself, sign in with ChatGPT inside Flockbay instead, on any ChatGPT plan, Free included. Neither costs anything beyond the ChatGPT plan you already have.
TL;DR. As of 29 Sep 2026, on Windows. Codex: install the CLI, sign in with ChatGPT, then in Flockbay open Connectors, Connect your agent (MCP), Set up, Turn on, Codex, Copy, and paste the line into PowerShell; /mcp in Codex lists flockbay-stage. No Codex: Connectors, ChatGPT, Sign in with ChatGPT, on any plan, Free included.
AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.
Intel or AMD Chromebook, with Linux turned on.
How to make games in Codex, and why it stalls without a game engine
Codex is careful by design. It plans, works inside a sandbox, and asks before it does anything it is unsure of. Ask it for a coin that spins and disappears when the player touches it, and you get a clean script and a tidy explanation. What you do not get is the moment where Codex watches the player walk into the coin. It never ran the game, because nothing it had could.
Flockbay is the missing half. It is a free AI game maker built on Godot: a desktop app with the official Godot 4.7.2 inside, not a fork, where your game is a real Godot 4 project you can open, read and change, and the builder lives inside the Godot editor. Over MCP it hands Codex the running game: Codex playtests it, reads the errors, captures the viewport and fixes what broke before it reports back.
There are two ways to put OpenAI's models to work on a game in Flockbay, and they are different products. You can run Codex yourself and connect it, or you can sign in with ChatGPT inside Flockbay and let the app's own AI build on your subscription. This page covers both, with the troubleshooting specific to Codex. For Claude, the same walk is how to make games in Claude Code.
What you need for Codex and Flockbay
Windows 11 on a 64-bit Intel or AMD PC, which is where Flockbay runs for now; a Mac release follows. A connection to the internet for as long as you are building, and a Flockbay account, which is free.
Codex, in one of the three places OpenAI ships it: the Codex CLI, the IDE extension, or the ChatGPT desktop app, where you choose Codex. The CLI runs natively on Windows; install it from PowerShell with the line below, or with npm install -g @openai/codex. The first time you run codex, choose Sign in with ChatGPT.
A ChatGPT account. As of 5 Oct 2026, the Codex pricing page at OpenAI lists Codex on every ChatGPT plan: Free for quick coding tasks, Go for lightweight ones, and more usage from Plus at $20 a month. An OpenAI API key works too, billed at API rates: codex login --with-api-key reads it from standard input. We have not run the standalone CLI on a Free account ourselves; the Codex engine inside Flockbay does build on one.
More on this: Flockbay vs Summer Engine: official Godot, or an engine built on it
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"Step 1: connect Codex to Flockbay with codex mcp add
Install Flockbay from flockbay.com, open it, describe your game in a sentence, sign in when it asks and press Continue. Your game opens in the Godot editor that the Flockbay app hosts. Leave it there: Codex can only reach the game the app has open.
In the Flockbay menu choose Connectors, then Set up beside Connect your agent (MCP). Switch it on with Turn on, choose Codex from the list, and Copy. Run the copied line in PowerShell or Command Prompt. It registers a single server, flockbay-stage, in Codex's global config, so Codex sees it from any folder.
Press Install skills in the same place. It copies Flockbay's instructions for your agent into Codex's skills, so Codex knows how the tools fit together before it starts. Codex gets skills only; the hooks the app installs are for Claude Code and Cursor.
The Flockbay app writes this for you with the real paths filled in: open the account menu, choose MCP connection, press Turn on, pick Codex and press Copy. The three paths are specific to your machine and stay the same from one sitting to the next, so you paste it once. Below is the shape, with the paths as placeholders.
More on this: Prompt templates for your own agent in Flockbay
codex mcp add flockbay-stage --env "FLOCKBAY_LOCAL_STAGE_CAPABILITY_AUTHORITY_DESCRIPTOR=<descriptor>" -- "<node>" "<coordinator>" --external-stage-mcpCodex keeps the Flockbay server in config.toml
Codex keeps its servers in config.toml, in its home folder: %USERPROFILE%\.codex\config.toml on Windows. The CLI, the IDE extension and the ChatGPT desktop app share that configuration, so according to OpenAI's docs a server added once reaches all three.
The entry is worth knowing for when something goes wrong. Below it is written by hand, with the paths as placeholders and one optional line added. In TOML, put Windows paths in single quotes, or double every backslash. Two optional settings matter here. startup_timeout_sec is how long Codex waits for the server to start, 10 seconds by default. default_tools_approval_mode decides whether Codex asks before this server's tools run: auto, prompt, writes or approve.
More on this: Making games with Kilo Code and Flockbay
[mcp_servers.flockbay-stage]
command = '<node>'
args = ['<coordinator>', '--external-stage-mcp']
startup_timeout_sec = 20
[mcp_servers.flockbay-stage.env]
FLOCKBAY_LOCAL_STAGE_CAPABILITY_AUTHORITY_DESCRIPTOR = '<descriptor>'Step 2: start Codex in the game's folder and check /mcp
Open a terminal in your game's folder, usually Documents\Flockbay and the game's name, and type codex. Inside Codex, /mcp lists the servers it started; flockbay-stage should be there. /mcp verbose adds each server's diagnostics.
Codex reads AGENTS.md before it does any work. Flockbay's instructions reach it through the tools and the skills, so AGENTS.md is for your own preferences: the feel you are after, what not to change, how you like changes reported.
Codex suggests its permissions from the folder. For a folder under git it recommends Auto, which edits inside the folder and asks before touching anything outside it or the network; for a folder without git it recommends read-only. Run git init in the game's folder before your first session. It gives Codex the right default and gives you a history to undo a bad afternoon with.
Step 3: prompts that give Codex something to check
Codex is at its best with a task that has a finish line. "Make the game fun" has none. "Add a coin that spins, and disappears with a sound when the player touches it. Then play the game, walk the player into the coin, and tell me whether it left the scene" has one, and Codex can reach it on its own.
Open with a reading task so it learns the project first: ask what is in the main scene, how the player moves and what the controls are. Then one mechanic per prompt, each with a number or an event to check. Codex tends to show its plan before it acts; read it, because that is the cheapest place to catch a misunderstanding.
What Codex does with Flockbay's tools
It changes the game through the open Godot editor. Nodes, properties, scripts, resources and signals are changed there, each change a single step in Godot's undo history, and the scene is saved after it. A bad step is one Ctrl+Z in the editor.
It proves the change. It gets Godot's own parse error, with the line, for a script it writes, and can do a headless run to see it start. Then it plays the game in the app's Game screen and reads stdout, every error with its file, line and call stack.
It tries the game the way a player would. Codex can hold a key for half a second, click, move the mouse or fire an input action, then read a value off the running scene, such as whether the coin node still exists, and capture the game viewport or the editor's 3D or 2D viewport. None of that moves your own mouse, and if you touch a key while it is playing, it stops and hands the game back.
The world is not hand-written geometry. Ground, water, sky, weather, the player and every placed object come from systems Codex asks for by name and settings: six of them in a 3D game, four in a 2D one, which has no water or weather. For props it can search Flockbay's library of models, textures and sounds, or generate new ones if you have added a Tripo or ElevenLabs key.
Codex may ask before it calls a tool that changes the game, depending on your permissions and the server's approval setting. Approving is cheap here, because every editor change is one Ctrl+Z. Its steps also show in the Flockbay app, in a chat named Your agent.
The other way in: sign in with ChatGPT inside Flockbay
You do not need to run Codex at all to build on your ChatGPT plan. In Flockbay, open Connectors and press Sign in with ChatGPT on the ChatGPT row. Your browser opens OpenAI's sign-in, then brings you back. From then on you chat with Flockbay's own AI, in the chat beside the Godot editor, and it runs on your ChatGPT subscription. In the model menu, the ChatGPT row uses the model your ChatGPT account picks.
It works on any ChatGPT plan, Free included. OpenAI sets how much each plan can use; its Codex pricing page describes Free as for quick coding tasks. If OpenAI refuses an account, Flockbay says so on a card and names the refusal when a message fails.
The difference from connecting Codex is who is driving. Here Flockbay's AI works the way the app intends: it asks one round of questions at a time, writes a short brief of what it will build first, and builds only when you approve it, using the same tools Codex would. You stay in one window, with no terminal. With Codex connected, you drive Codex, with your own habits and settings, and Flockbay supplies the tools. Generated art on a ChatGPT sign-in comes from your own Tripo or ElevenLabs keys; without them it builds from the library or with Godot's shapes.
Troubleshooting Codex with Flockbay
Codex says the flockbay-stage server failed to start or timed out. Codex gives a server 10 seconds to start by default. Add startup_timeout_sec = 20 under [mcp_servers.flockbay-stage] in config.toml. If it still fails, check the three paths in that entry against the line in the Flockbay dialog, which says in red when the app itself could not start it, and paste the current line again.
The server is not in /mcp. Run codex mcp list in a terminal. If it is not listed, paste the line again; it is global, so the folder does not matter.
Codex sees flockbay-stage but just one tool, a status check. The app is closed, has no game open, or has Another agent switched off in Connectors. Fix whichever it is and the rest of the tools join the session on their own. Still missing? Quit Codex and start it again.
Codex will not edit anything. The folder started read-only. Use /permissions to switch to Auto, or run git init in the game's folder so Codex picks Auto next time.
Codex reports the editor is closed, or that it has to wait. Scene and script changes go through the Godot editor the Flockbay app hosts, so open the game in the app first. A refused Play is on purpose: when you have used the builder since Codex last ran the game, the app hands Play to you instead. And while Flockbay's own AI has a turn running in that game, Codex is asked to hold off until it ends.
ChatGPT sign-in fails to build. Any ChatGPT plan builds here, Free included. When OpenAI refuses an account, a card titled "Your ChatGPT account can't build here" says so, and the failed message names the refusal.
More on this: A guide to Godot MCP servers: install, connect, and use one well
What making games in Codex costs
Connecting Codex to Flockbay is free, and so is building on a ChatGPT sign-in. You pay OpenAI for your plan, and a ChatGPT Free account costs nothing. As of 29 Sep 2026: Plus is $20 a month and includes Codex in the CLI, the IDE extension and on the web; Pro starts at $100 a month with five or twenty times Plus's Codex usage; Business is $25 a user a month, or $20 billed yearly. An API key is billed at API rates.
Every account also gets free AI each day on the hosted model, called Demo, and it comes back the next day. Flockbay has no paid plans. What Flockbay costs has the detail.
What Codex cannot do here
It cannot decide whether the game is good. It can report that the coin left the scene and the sound played; you play the game, press Play or F5 in the editor, and judge whether it feels right.
The connection serves the game Flockbay has open. That can be a Godot project you already have: Flockbay asks once before it adds anything to it, and Codex works with the Godot tools there until you let a world tool in. To keep the project in your own editor instead, add a Godot MCP server that works there. Claude for Godot compares those servers, and Codex uses them the same way.
The app runs on Windows and Linux, and building is online; a finished game plays without a connection. The code Codex writes here is GDScript, or C# when the game already uses it. The app is closed source, while Godot underneath is the official engine and every file of the game belongs to you.
Questions
- Can Codex make a game?
- It can write one on its own. Connected to Flockbay, it can also run the game, read its errors, inject input events and capture the viewport, so it fixes what breaks before it hands the game back. Whether the game is fun is still yours to judge.
- Do I need ChatGPT Plus to make games in Codex with Flockbay?
- No. The ChatGPT sign-in inside Flockbay builds on any ChatGPT plan, Free included. For the standalone Codex CLI, the Codex pricing page at OpenAI lists Codex on every ChatGPT plan as of 5 Oct 2026, with more usage on Plus and higher; an OpenAI API key works too.
- What is the difference between connecting Codex and signing in with ChatGPT?
- Connecting Codex means you run Codex and it uses Flockbay's tools. Signing in with ChatGPT means Flockbay's own AI builds inside the app on your ChatGPT subscription, asking questions and writing a brief before it builds. Both use the same tools on the same game.
- Does the ChatGPT desktop app work with Flockbay?
- OpenAI's docs say the ChatGPT desktop app, the Codex CLI and the IDE extension share their MCP configuration, so the line you paste should reach all three. We have not tried the desktop app ourselves.
- Can I use an OpenAI API key instead of a ChatGPT plan?
- Yes. Codex signs in with a key through codex login --with-api-key. Inside Flockbay, add the key in Connectors under Your own API key; OpenAI bills you for what you use.
- Is there an official Codex integration?
- No. Codex supports MCP, the open protocol for giving an agent tools, and Flockbay serves its tools over it. Nothing goes into Codex beyond that one server entry and, if you want them, the skills.
- Does it work on a Mac?
- Codex does, but Flockbay does not yet: the app ships for Windows first, and the Mac version follows later.
Related
- Claude or ChatGPT with Godot
- How to make games in Claude Code
- Claude for Godot
- Connect your own agent
- Cursor for Godot
- Godot AI agent
- Making games from OpenCode
- Godot MCP: connect Claude Code, Codex or Cursor to your Godot game
- Flockbay vs Summer Engine: official Godot, or an engine built on it
- Build with your ChatGPT plan
- Making games from Gemini CLI
- A guide to Godot MCP servers: install, connect, and use one well
A free AI game maker built on Godot, for Windows. Connecting Codex is free, and so is building on a ChatGPT sign-in.
Download Flockbay free