This AI tries to code whatever you tell it to, even videogames

robotic hand using laptop
(Image credit: Kilito Chan via Getty Images)

In the ever-increasing list of things that machine learning AI can do in our modern world, there's now a program that will code (or at least, try to code) whatever you tell it to in plain English. Want some flashy banner text that changes color every few seconds? Tell that to OpenAI Codex and it will code it for you in seconds.

The OpenAI Codex beta, currently only available through an online waiting list, is a simple web tool with three windows: one to type in commands, one that shows the code generated by those commands, and one that shows what the code does. You could theoretically use Codex for all sorts of tasks in over a dozen coding languages, but the coolest use I've seen is coding simple Javascript videogames with just a handful of natural language instructions.

Check out the video below from YouTuber Joy of Curiosity to see it in action.

It's pretty wild—the tool can easily handle simple commands like "make a black circle," but it can also correctly interpret commands that require context, like "make it smaller," and even multi-step instructions like "if the rectangle and the circle overlap, make the circle go in the opposite direction." In minutes, Joy of Curiosity has a crude version of Breakout up and running.

That's impressive, but I noticed a few instances where Joy intervened with little tweaks to the AI's attempt to code. OpenAI also made an official live demo of Codex's Javascript skills (zero intervention required) with a little spaceship game. It's cool how the tool leverages the OpenAI platform to have general knowledge about the world, like when the user tells Codex to "set background to the color of space," resulting in black. The commands get even more elaborate in this demo. With the single sentence beginning with "When the rocket is clicked," Codex successfully programs a boost mechanic that accelerates the ship in its current direction. By the end of the eight-minute demo, the game has scoring, a tutorial, and an objective.

I fully expect that the spaceship video is a manicured demonstration that plays toward OpenAI's strengths and avoids its weaknesses, but the magic of watching a simple phrase turn into actionable code seems very real. Now, even a math-averse person like me can be one of those game directors that points over his programmer's shoulder and says "make this faster, that needs more color." For a look at an alternate use of Codex, YouTuber Ania Kubów was able to make a snazzy (if simple) website to showcase her work.

I suspect Codex is still a long way from being useful for projects beyond demonstrations, but it's a fascinating glimpse at a potential future in which telling computers what to do doesn't require fluency in any language other than the one you learned to speak growing up, a la Star Trek. Concurrently, there's a growing interest among Silicon Valley investors in "low-code" or "no-code" tools that aim to make programming faster and simpler, and even accessible to those who aren't fluent in any coding languages.

OpenAI is still hiding Codex behind lock and key for now, but you can sign up for the waitlist for a chance at access. If I get access, my first goal is to instruct the AI to destroy itself. I'll let you know what happens.

Morgan Park
Staff Writer

Morgan has been writing for PC Gamer since 2018, first as a freelancer and currently as a staff writer. He has also appeared on Polygon, Kotaku, Fanbyte, and PCGamesN. Before freelancing, he spent most of high school and all of college writing at small gaming sites that didn't pay him. He's very happy to have a real job now. Morgan is a beat writer following the latest and greatest shooters and the communities that play them. He also writes general news, reviews, features, the occasional guide, and bad jokes in Slack. Twist his arm, and he'll even write about a boring strategy game. Please don't, though.

Read more
The OpenAI logo is being displayed on a smartphone with an AI brain visible in the background, in this photo illustration taken in Brussels, Belgium, on January 2, 2024. (Photo illustration by Jonathan Raa/NurPhoto via Getty Images)
OpenAI is working on a new AI model Sam Altman says is ‘good at creative writing’ but to me it reads like a 15-year-old's journal
An Ai face looks down on a human.
Xbox announces 'a generative AI model for gameplay ideation' called Muse, but don't get too excited: Machines aren't about to make games for you just yet
Microsoft Muse-generated gaming in action
'A massive, massive moment of wow.' Microsoft CEO predicts AI-generated games are a 'CGI moment' for the industry
OpenAI Operator
OpenAI's Operator is your new autonomous AI assistant ready to do your biding across the web
Razer Project Ava key visual
Razer has released a backseat gaming AI bot called Ava, and I'm not sure whether using it should be considered cheating or not
CHONGQING, CHINA - OCTOBER 30: In this photo illustration - The Facebook app page is displayed on a smartphone in the Apple App Store in front of the Meta Platforms, inc. logo on October 30, 2024 in Chongqing, China. (Photo by Cheng Xin/Getty Images)
Meta might've done something useful, pioneering an AI model that can interpret brain activity into sentences with 80% accuracy
Latest in AI
The titular character from Princess Mononoke is depicted riding the wolf goddess Moro and carrying a spear.
Studio Ghibli AI image trend floods social media, cheered on by OpenAI and denounced by critics as an insult to Hayao Miyazaki
Otter AI Meeting Agent
As if your work meetings weren't already fun enough, now Otter has a new all-hearing AI agent that remembers everything anyone has said and can join in the discussion
Image for
'No real human would go four links deep into a maze of AI-generated nonsense': Cloudflare's AI Labyrinth uses decoy pages to trap web-crawling bots and feed them slop 'as a defensive weapon'
CHINA - 2025/02/11: In this photo illustration, a Roblox logo is seen displayed on the screen of a smartphone. (Photo Illustration by Sheldon Cooper/SOPA Images/LightRocket via Getty Images)
'Humans still surpass machines': Roblox has been using a machine learning voice chat moderation system for a year, but in some cases you just can't beat real people
OpenAI logo displayed on a phone screen and ChatGPT website displayed on a laptop screen are seen in this illustration photo taken in Krakow, Poland on December 5, 2022.
ChatGPT faces legal complaint after a user inputted their own name and found it accused them of made-up crimes
Public Eye trailer still - dead-eyed police officer sitting for an interview
I'm creeped out by this trailer for a generative AI game about people using an AI-powered app to solve violent crimes in the year 2028 that somehow isn't a cautionary tale
Latest in News
A screenshot from SaGa Frontier 2, showing one of the protagonists wandering through a quaint fantasy village
One of Square Enix' most underrated PlayStation-era JRPGs just shadow dropped on Steam
The titular character from Princess Mononoke is depicted riding the wolf goddess Moro and carrying a spear.
Studio Ghibli AI image trend floods social media, cheered on by OpenAI and denounced by critics as an insult to Hayao Miyazaki
Marvel Rivals tier list - Wolverine
Marvel Rivals director says a future patch will reduce the shooter's insatiable hunger for RAM: 'It's a very big problem'
Hogwarts Legacy potions professor holding a potion
An unannounced Hogwarts Legacy expansion and 'definitive edition' have reportedly been cancelled
Story of Seasons - A cahacter in a purple tuxedo stands outside in a town square talking to the player
Story of Seasons is doing another Harvest Moon remake and it might be the best the series has ever looked
Assassin's Creed Shadows change seasons - An upper-body shot of Yasuke looking cheerfully up into the distance.
Assassin's Creed Shadows puts up the 'second highest day-one sales revenue in Assassin's Creed franchise history'