
With a single detailed request, Codex, the OpenAI AI that comes with a ChatGPT subscription, made an EarthBound-style RPG prototype. It has the whole map drawn as a single image, cuts it into layers so the hero can walk behind the trees, then draws an invisible map of obstacles. The first playable prototype was ready in under half an hour.
Une IA a codé ce jeu en moins de 2 h
Watch the ShortThe Gekkode YouTube channel publishes more videos about AI and code.
Subscribe to support the channelEarthBound is a role-playing game released in 1994 on the Super Nintendo, developed by Ape and HAL Laboratory. On 13 September 2026, I asked Codex, the OpenAI AI that writes code and comes with a ChatGPT subscription, for an RPG prototype in the same style.
In the previous project, Make a video game with AI: a Dune 2000 prototype, I had moved forward in small requests over several days. This time, the first request already explained how to build the scenery, and a first playable prototype was ready in under half an hour.
The game is called Clairbois. You can play it below, with a mouse, a keyboard or a gamepad.

The project runs in an isolated sandbox (iframe sandbox and CSP): no access to the site, cookies or your session. Nothing loads before you click.
A single, very detailed request
Create a game in the spirit of EarthBound, in HTML, CSS and JavaScript, with the same art direction and the same interface style as the original game, playable with a mouse and a gamepad. Generate the characters, their sprites and animations, the scenery and the sound effects yourself.
For the map, generate all the scenery in one go, as a single image. Analyse it, then cut it into stacked layers, so that a character walking behind a tree or a fence is properly hidden by it. Then map out the obstacles from the resulting image, so that the character never walks through the scenery. Start with a quick prototype.
How layers work
Super Nintendo games built their maps from tiles, small squares of scenery put together like a mosaic. Here, Codex has the whole village drawn in one piece, like a painting. The scenery gains freedom, but in a painting the hero cannot walk behind a tree, since the tree is part of the background.
Layers solve this problem. Picture them as sheets of tracing paper laid over the painting. Codex cuts out everything in the image that should be able to hide the hero, such as the tree foliage, the tops of the fences and the roofs, and copies it onto these sheets. The game then decides, at every step, whether a sheet goes in front of the hero or behind him. Under the branches, the foliage covers him. In front of the trunk, he stays visible.
The hero still has to be stopped from walking through walls. Codex analyses the image and draws an invisible map of obstacles over it, with the tree trunks, the house walls, the fences and the edge of the pond. The player never sees this map, but the hero bumps into it. Only the trunk of a tree blocks the way. Its foliage lets him through.
A first prototype in under half an hour
After 26 minutes, the village of Clairbois was playable. Codex had chosen Phaser, a free toolkit for making games that run in the browser. The hero, Nino, can talk to Lila, Marcel, Iris and Rémi, and fight a mushroom called Myco in turn-based combat. Codex had also generated the sound effects with ElevenLabs and checked that the game responded to a gamepad.
The image generator had slipped a trap into the foreground layer. Instead of empty, transparent space, it had drawn the grey and white chequerboard that drawing software shows to represent transparency. Codex spotted it on its own and fixed it before showing me the result.
Houses drawn from a floor plan
Next, I asked for the interiors of the three houses, with several rooms and beds where the hero slips under the covers. Along the way, I added a rule. Each room would have its own image, and the floor plans had to make sense: a staircase taken on the left arrives on the left upstairs, and a door sits in the same spot on both sides of the wall.
Codex first wrote out the floor plan of the three houses, like an architect, with two rooms on the ground floor and two upstairs. It then had the twelve rooms drawn one by one. The image generator sometimes moved a door, so Codex lined each image back up with the plan, layers and obstacles included.
At my request, Codex then reviewed the houses. It found them too similar and too empty, then redesigned them as a family home, a grocery shop with its storeroom and a flat upstairs, and a clockmaker’s house organised around her workshop, with a spiral staircase. One problem of scale remained, because indoors the hero kept his outdoor size and looked tiny next to the furniture. He is now twice as big in there, like the people who live in the village.
From the village to the rescaled houses, all of this took Codex less than two hours of work.
Two flaws spotted while playing
In the woods, the hero appeared with his legs cut off even though he was walking on open grass. A tree’s layer had been cut out too wide and took a piece of lawn with it, which passed in front of the character. Codex cut out all the trees in the woods and the orchard again, as close as possible to their foliage.
Elsewhere, the hero could climb onto a sign stuck in the grass. The sign, clearly visible in the image, was missing from the obstacle map. Codex went back over the rocks, bushes, roots and forest edges to find anything else that had been missed.
Music for every location
Codex composed twelve pieces of music with the ElevenLabs music tool, describing each one in writing: the village, the houses, the woods, the orchard, battles, resting in bed, dreaming, victory and defeat. The music fades from one track to the next when the hero changes location, and gets quieter during dialogue.
Pixel art portraits came next, drawn from the game’s small characters, with the same hairstyles, clothes and colours. They appear next to each line of dialogue.
Two projects, two ways of guiding the AI
For Dune 2000, I guided Codex through dozens of short messages over several days. For Clairbois, about ten messages were enough in one evening, because the first request already explained the method. The two games differ in genre and in size, so this gap does not prove that one method is better than the other. Our head-to-head between Codex and Claude Code pits the two assistants against each other on a shorter exercise. Since Codex works directly on the computer, it is also worth knowing what its sandbox blocks before trusting it with a project.
Key takeaways
- A first playable RPG prototype was ready in under half an hour, and the village with its three houses to explore took less than two hours of work by Codex.
- Drawing the map in one piece works, as long as you cut it into layers and draw an invisible map of obstacles over it.
- For interiors, decide on the floor plan of the houses before the first image.
- The image generator moves doors and draws chequerboards instead of empty space, so check every image before it goes into the game.
- Clairbois is still a prototype, a short neighbourhood adventure.



