PromptFull
Make a 2d space game, in which I can fly a ship, avoid and blow up asteroids, and dogfight with other computer-controlled AI. Be creative with the design of the ships. Ensure the gameplay works and is fun.
Output code in a single next.js page.tsx file, which can be pasted directly into a next.js app created by create-next-app, alongside any context or instructions needed to run it.

Make it yours. Change "2d space game" and "dogfight with other computer-controlled AI" to your own genre and opponents, and keep "Be creative with the design of the ships. Ensure the gameplay works and is fun." Replace the sentence starting "Output code in a single next.js page.tsx file" if you don't use Next.js.

Make it hereFree runs soon

Asteroids dogfight against AI ships

Nebula Drifter, a 2D space shooter: fly a ship, blast asteroids, and dogfight computer-controlled pirate ships, with hull, shield, and energy bars. One of OpenAI's GPT-5.2 coding examples, made from a single zero-shot prompt.

“generated entirely in a single GPT-5 or GPT-5.2 prompt, without writing any code by hand”

You'll need

  • A Next.js app made with create-next-app to paste the page.tsx into, or drop the last sentence and ask for one HTML file
How it was made

OpenAI's README says every demo in the collection was generated in a single GPT-5 or GPT-5.2 prompt with no code written by hand, and the gallery calls it the zero-shot prompt. The prompt asks for a Next.js page.tsx; the hosted GPT-5.2 build in the repo is a single HTML file. The gallery also has a GPT-5 version from the same prompt. Which coding tool ran it isn't stated.

GPT-5.2

Source and credit

GitHub · Dec 11, 2025 · 1.9k stars

Authorship not stated by the source

Published instructions: examples/asteroid-game-5.2.yaml in the repo, also shown on the hosted gallery

Code for every example

GPT-5 version from the same prompt

Look notesby Reference

A top-down space shooter on a dark navy field: a small cyan ship trades dotted fire with red-ringed pirate ships among outlined asteroids, after a menu of controls and intel.

Color
Near-black navy with a soft blue haze in the middle, cyan and teal for the player's ship, shots, and asteroid outlines, red rings on the pirate ships, white debris bursts, and red, blue, and green status bars.
Type
Small monospace HUD text: score, wave, lives, and kills over HULL, SHIELD, and ENERGY bars in the top left. The menu is titled NEBULA DRIFTER, with key caps for each control and INTEL notes on three pirate types; a banner reads "Practice mode: fewer enemies".
Framing
16:10, seen straight down. A faint lit rectangle fills the middle of the field; the ships are tiny against wide empty space, with grey polygon asteroids drifting around the edges.
Structure
The menu with CONTROLS and INTEL panels, then practice mode: the ship drifts and fires at pirates, an asteroid bursts into white fragments, the shield bar drains, and the run restarts with the practice banner.

Remakes

Nobody has shared a remake of this one yet. Made your own version? Send it for review and credit.

More like this

Game

Interstellar connection

Celia

Game

Neon circuit puzzle chambers

Armor Games Studios

Game

Pac-Man from one prompt, 36 ways

Claude Code · Plain JavaScript

Game

Hole that swallows a low-poly city

Codex · Three.js

Game

Cartoon endless runner over parallax hills

GPT-5 · Plain JavaScript

Game

Snowbound pixel platformer

Maddy Thorson / Noel Berry

Game

Dragonsweeper’s monster-filled grid

Daniel Benmergui

Game

Low-poly elevated track racing

Kodub

Game

Short trip

Alexander Perrin

Game

Astra's garden

NomnomNami

Game

Pixel dungeon dice encounter

Alarts

Game

First kiss at a spooky soiree

NomnomNami

Game

Sunflower-lined garden defense

Studio11508

Game

Syrup and the ultimate sweet

NomnomNami

Game

A storybook artificer workshop

Pure Jam Games

Game

Isometric brick building sandbox

Oskar Stålberg

Game

Deepest sword cavern scene

Cosmic Adventure Squad

Game

A firelit cabin cooking scene

pomepomelo

Game

Postcard spy fiction

Tributary Games

Game

A playful pastel mountain climb

Cookiecrayon

Game

A ghost in a cat-filled apartment

Team Bean Loop

Game

Ink-and-paper platformer

TinyBookshelf

Game

The archives of Trevosa

jamwitch

Game

A hand-drawn game of trust

Nicky Case

Game

Pastel town on a teal sea

Oskar Stålberg

Game

A crowd through a camera frame

Nicky Case!

Game

Brutalist city builder in raw concrete

Fable 5.1 · Three.js

Game

Cartoon kart racer for split-screen TV

Partial prompt · Claude Code · Three.js

Game

Pelican riding a bike along the coast

Partial prompt · Claude Code · Three.js

Game

Minecraft-style world with shader lighting

Opus 5.5