Make a video game with AI: a Dune 2000 prototype in under 2 hours

I asked Codex, OpenAI's programming assistant, for a game prototype inspired by Dune 2000. Less than two hours later, you could harvest spice, build a base and fight off Harkonnen tanks, without my writing a single line of code.

Make a video game with AI: a Dune 2000 prototype in under 2 hours
Quick answer

Yes, an AI can make a video game prototype. Codex, OpenAI's programming assistant available with a ChatGPT subscription, produced a first playable match inspired by Dune 2000 in half an hour, then a prototype with animation and sound in under two hours. It writes the code, has the images drawn and tests the game itself, while the player spots the flaws and reports them.

Dune 2000 is a strategy game released in 1998 by Westwood Studios, in which you harvest spice to build a base and an army. On 6 September 2026, I asked an AI to make a playable prototype of it that runs in the browser, without writing a single line of code myself.

That AI is called Codex. It is OpenAI’s programming assistant, available with a ChatGPT subscription, used here with the GPT-6 Astra model. Unlike ChatGPT in a chat window, Codex works directly on the computer. It creates the game files, opens the game in a browser, looks at what appears on screen and fixes whatever is wrong.

You can launch the prototype below by clicking “Try it”. Left-click to select a unit, right-click to give it an order.

ACodex · GPT-6 AstraGPT-6 Astra

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.

Open standalone
Vendor
OpenAI
Model
GPT-6 Astra
Tool
Codex
Date
2026-09-09
Project size
51,6 Mo, 393 fichiers

The starting request

Take inspiration from Dune 2000 to create a playable prototype in HTML, CSS and JavaScript, with the same interface as the original game: the construction sidebar, the minimap, the credits and the power bar.

Stay true to its gameplay, from harvesting spice to building your base and fighting. Generate the sprites and their animations yourself. Use the ElevenLabs skill for the sound effects and the MusicLyria skill for the music. I want a one-on-one match, Atreides against Harkonnen.

A first playable match in half an hour

The first version arrived after half an hour. A harvester collected spice, you could put up buildings and produce tanks and soldiers, and the computer sent waves of Harkonnen attacks. The fog of war, which hides the map until a unit has explored it, and the minimap were already there.

The match worked, but it did not look like Dune 2000 yet. So I listed what was missing: animations, tank guns that aim, more varied ground, a Harkonnen army of their own and a construction animation. A second list asked for an illustrated interface, more natural terrain edges and the sound of gunfire and explosions.

Less than two hours after the first message, all of that was in place. The version you can try above was then polished with small touch-ups until 9 September, with the original game’s interface, voices in French and new buildings.

How Codex makes the game’s images

Not a single file from the 1998 Dune 2000 is used. Buildings, tanks, soldiers and scenery all come from Codex’s image generator, based on descriptions that Codex writes itself.

A 2D game animates its characters with sprites, series of small images shown one after another like the pages of a flipbook. Codex drew each soldier from several angles, for walking, shooting and falling, and each vehicle facing several directions.

So that a tank can drive one way and fire another, Codex drew the hull and the turret separately, like two pieces stacked on top of each other. The turret turns on its own and follows its target.

The ground works like a jigsaw puzzle. Tiles of sand, rock and spice fit together, with pieces made for edges and corners, so that rock meets sand without a straight line. A newly placed building rises from the ground in a few seconds, with its foundations, scaffolding and crane.

Voices and explosions generated by another AI

The sound effects come from ElevenLabs, a service that generates a sound from a written description. Codex installed the official ElevenLabs skill, a set of instructions it reads to learn how to use the service, then produced the gunfire, the explosions, the engines and the rumble of the sandworms.

Around thirty voice announcements in French followed, from “Alerte ! Notre base est attaquée” to “Commandant, votre base est opérationnelle”. Codex had each audio file transcribed by a speech recognition tool, to check that the voice really said the intended sentence. During an announcement, the music drops and the sentence appears as a subtitle.

The music plays on a loop during the match. All the sounds are stored in the project, and the game does not call any online service while you play.

What I had to fix while playing

My job mostly came down to playing, spotting what was wrong and reporting it, often with an annotated screenshot. Codex made mistakes, and one fix sometimes broke something else.

Tanks overlapped on screen. Codex enlarged the space each vehicle takes up, and the overlap disappeared. A little later, units were keeping far too much distance from one another, and some refused to pass between two buildings that were clearly far enough apart. Codex tracked down the cause, which was its own fix, and reworked the way units find their way around.

Another time, I interrupted Codex in the middle of a request to send it a picture of the original harvester. It redrew the harvester and forgot the rest of the message, including the Carryall, the flying craft that brings harvesters back to the refinery. I had to ask for everything again, and its reply fitted in one sentence: “You’re right, I finished the sprites without adding the logistics you asked for.”

Some batches of images had to be redone as well. The icons for six new buildings, drawn all at once, looked alike and no longer matched the style of the first ones.

Codex went and read the 1998 manual

I wanted to know whether, in the original game, each refinery had its own Carryall. Codex said no, citing pages from the Dune 2000 manual. Each refinery comes with a harvester dropped off by a Carryall, and transport Carryalls are built separately. The pages it cited do say that.

The same went for concrete. In Dune 2000, you can only build on rock, and Codex reminded me of this before applying my variant, which allows building on sand once concrete slabs have been laid. Sandworms go around these slabs.

What the prototype does not do yet

It is a skirmish against the computer, with no campaign, no multiplayer and no saving. Some rules were changed at my request, such as concrete on sand, or factories that pool their efforts to produce faster.

The same assistant later built a small RPG in a single evening, with a completely different method, described in Make a game with ChatGPT: an EarthBound-style RPG. To see Codex up against its Anthropic rival, read our comparison of Codex and Claude Code. And if you want to write a first small game yourself, our hands-on JavaScript guessing game starts from scratch.

Key takeaways

  • Codex produced a first playable match in half an hour, then a strategy game prototype with animation and sound in under two hours.
  • It writes the code, has the images drawn, generates the sounds and checks for itself that the game launches.
  • The human’s job is to play, spot the flaws and describe them precisely.
  • An interrupted request gets partly forgotten. After an interruption, it is best to repeat everything.
  • The result is still a prototype, a skirmish with no campaign and no saving.

CodexGPT-6 AstraJavaScriptJeu vidéoPhaser

Damien Flandrin Web developer since 2010, creator of Gekkode and Email Impact. Every article is tested on a real project before publication. Contact
Newsletter

New tests, tutorials and projects, by e-mail.

Reproducible tests, versioned code, dated results. Never any spam.