Skip to content

Using the ModRetro plugin that OpenAI describes, you can ask Codex to build a Game Boy Color game, fix it in a preview, and install it on a cartridge to play on a Chromatic. This post walks through each step and the checks to make before writing to the device.

Published 1 view

The OpenAI Developers blog published a guide to having Codex build a Game Boy Color game with the ModRetro Chromatic plugin. The target is a Game Boy Color game, and the tools are Codex, the ModRetro Chromatic plugin, and GB Studio, a game editor. The guide first shows how to build and play a first game on your computer, and then moves on to installing it on a cartridge.

This post relies on a single source, that OpenAI Developers guide. The guide also contains a sales promotion for ModRetro hardware: a link to order the special edition Chromatic near the top and a closing line encouraging readers to buy one. Read it with that in mind.

Install the pluginModRetro Chromatic from Plugins in Codex
Describe the gameselect the plugin in a local folder
Preview and fixplay, then tell Codex what to change
Build the ROMrebuild after each fix
Install on the cartridgewrite it with Install on Chromatic
  • Install the plugin → Describe the game
  • Describe the game → Preview and fix
  • Preview and fix → Build the ROM
  • Build the ROM → Install on the cartridge
Source: the order of steps in the OpenAI Developers guide.

Installation starts in the ChatGPT desktop app. These are the steps the guide lists.

Source codetext
1. In the ChatGPT desktop app, select Codex from the ChatGPT dropdown
2. Open Plugins and search for ModRetro Chromatic
3. Select ModRetro Chromatic Plugin by ModRetro, then click Install
4. Open a local project folder and start a chat
5. Type @ and choose the plugin so Codex knows which tools to use
6. Ask Codex to set up the plugin and check for any missing build tools

After that, you can build and play your first game on your computer. To follow the guide's video, it suggests this example prompt.

Source codetext
Build a top-down adventure game called Lodge Podge where a pixel beaver must chew down small trees to gather sticks to build a lodge in the center of the level.

The game is called Lodge Podge, a top-down adventure in which a pixel beaver chews down small trees and gathers sticks to build a lodge in the center of the level. Next you ask Codex to build the game and open the preview. You can also ask it where the files are in your GB Studio project folder, and the guide points to three.

An illustration of the example prompt Lodge Podge as a pixel screen

Image: devs7udio illustration, drawn from the guide example prompt

  • The .gbsproj file: open it in GB Studio to edit scenes, actors, and events.
  • The assets/ folder: it holds the sprite sheets, backgrounds, and audio the project uses.
  • The compiled .gbc file: run it in an emulator or install it on a cartridge.

The guide suggests playing a few rounds and then telling Codex what would make the game more fun. The author writes that in Lodge Podge, they asked for a chonkier beaver and for mud and leaves, as well as sticks, to be required to build the lodge.

The ModRetro Chromatic plugin contains developer tools that the model can use on your behalf. The guide describes five of them.

What the plugin does

What the plugin does
Animate a characterAsk Codex for a sprite sheet and the frames side by side. To revise, name the pose or direction to change and ask for a rebuilt preview
Build a map to walk throughAsk for a scene's background and collision map side by side. The collision map marks which tiles block movement, and you tell Codex which tiles to block or open
Play the ROM in CodexCodex opens the game preview in its built-in browser. Arrow keys are the D-pad, Z is A, X is B, and Enter is Start. A toolbar above the emulator pauses and resumes
Point to what you want changedChoose Annotate game in the preview toolbar and click the display to freeze a frame. Select a sprite, tile, or area and describe the edit, then choose Resume game. Codex makes the change, rebuilds the ROM, and reopens the preview
Test with button pressesControl the emulator from chat. Ask Codex to run the ROM, send a sequence of button presses, and capture a frame after each step, shown side by side

Source: OpenAI Developers, Build a retro handheld game with Codex and ModRetro Chromatic.

GB Studio is a visual editor for building Game Boy games. Open the project's .gbsproj file and choose Game World. Selecting a scene in the navigator shows its properties in the sidebar, and you can drag an actor to a new tile or edit collisions directly on the scene. Save the project, return to the Codex chat, and ask it to rebuild and open the preview.

When the built-in events do not cover what you need, or you want to work at a lower level, the guide lists these options.

Other development options

Other development options
Extend GB Studio (GBVM)If the built-in events do not cover a mechanic, add a custom event in GBVM, GB Studio's virtual-machine language, or extend the engine in C
Write C with GBDK-2020The plugin can compile standalone C with GBDK's lcc compiler. GBDK's Game Boy APIs cover buttons, sprites, tiles, and palettes. The guide suggests starting with a game loop that reads the D-pad and moves a single sprite
Write your own engineHave Codex implement the game loop, scrolling, and collisions from scratch
Assembly with RGBDSFor an assembly project, build the ROM with a separately installed toolchain such as RGBDS. Give the resulting .gb or .gbc file to the plugin to inspect and playtest

Source: OpenAI Developers, Build a retro handheld game with Codex and ModRetro Chromatic.

Writing the new ROM erases the game on that cartridge and can erase its saves. The installer does not back up the cartridge. This is the most important warning in this post, and the guide also tells you to read the confirmation carefully. If a cartridge holds a game or save data you want to keep, it is safer to prepare a separate cartridge to write to.

An illustration of a Game Boy Color style handheld and a game cartridge

Image: devs7udio illustration, not the shape of the actual Chromatic

To install on a device you need three things: a Chromatic, a compatible rewritable homebrew cartridge, and a USB data cable. The guide lists the steps like this.

Source codetext
1. Follow ModRetro's quickstart to update the firmware and activate Developer Mode
   (use the computer you will connect to the handheld)
2. Insert the cartridge and connect the Chromatic to your computer
3. Open the game preview in your local Codex chat
4. Choose Install on Chromatic, select your connected device, and click Install
5. Read the confirmation carefully, then choose Confirm Install when you are ready
6. Leave the cable connected until the plugin reports success, then start the game on the Chromatic

If a first version of a game comes from one prompt and can be fixed in words in a preview, the speed at which a solo developer or designer can test an idea changes a great deal. Reviewing sprites and collision maps side by side also suits one person handling both the art and the rules. Still, this post rests on one guide that includes a sales promotion, so the guide alone cannot tell us the quality of the results or how long a game takes to make. Writing to a device can be an irreversible step, so I would play in the computer preview first and begin with a cartridge you are willing to wipe.