Skip to content(if available)orjump to list(if available)

Show HN: Atari Missile Command Game Built Using AI Gemini 2.5 Pro

Show HN: Atari Missile Command Game Built Using AI Gemini 2.5 Pro

145 comments

·April 7, 2025

A modern HTML5 canvas remake of the classic Atari game from 1980. Defend your cities and missile bases from incoming enemy attacks using your missile launchers. Initially built using the Google Gemini 2.5 Pro AI LLM model.

greybox

One question I continue to ask myself when I see impressive AI examples like this, (because it is impressive) is "are we solving the right problems"? Instead of training an AI to produce a tonne of JS to create something that's been done before, should we not be engineering better tools to allow people to precisely craft software without the need for AI.

I worry that because we are now able to instantly produce a bunch of JS to do X thing, we will be incentivized not to change the underlying tools (because one, only AI's are using it, and two AI's won't know how to use the new thing)

I worry this will stall progress.

noduerme

Yes and no. It's very impressive, in that it would take a human with no coding knowledge a very long time to learn how to write it. It's not impressive if you know the anatomy. But it's only as good as asking the "programmer" to make those stars in the background stop running around wildly, or make it scrolling, or something. Then what. Well geez, I have no idea how this works so I better ask the AI to do that for me?

It's not really that different from taking your 2022 car to a shop to adjust your camless engine, and assuming everything's fine, but not having a clue what they did to it or how to fix it if the engine explodes the next day. You can't even prove it had something to do with what the shop did, or if they actually did anything at all. They probably don't even know what they did.

It won't stall progress for clever people who actually want to figure things out and know what they're doing. But it will certainly produce lots more garbage.

That said, the game is impressive for something stitched together by an LLM.

mosura

AI is the bulldozer for building ever bigger piles of rocks, like the pyramids. Impressive in their way, but unsustainable.

You still need paradigmatic shifts in architecture to enable delivering scale and quality from a smaller amount of materials, and it has not made a dent there, yet.

jnwatson

An evil timeline is the construction of frameworks in the future that are only grokkable by AI.

The standard for new frameworks won't be "does this make humans more productive using new concepts". It will be "can I get an LLM to generate code that uses this framework".

kridsdale1

The world you describe is about how I feel about Law.

hankrod

Valid point about whether AI generating piles of JavaScript might lock us into outdated tools. Isn't what you're describing though a form of advanced prompting? The ideal tool could act as a layer that takes a prompt and builds exactly what's needed to deliver the outcome, without humans or AI wrestling with traditional code. This is similar to what OpenAI initially aimed for with function calling, where AI writes and executes code in a sandbox to fulfill a prompt but it was clunky so they shifted to structured tool calling. The reason we still need program code like JavaScript, rust, assembly, ... is that current computing architectures are built for it. That’s changing, though, with initiatives from NVIDIA and other startups exploring inference as the main computational primitive, which could reduce/remove the need for conventional programming.

greybox

I don't see AI inference becoming the main computational primitive. It will always be faster and more efficient on the execution side to just write some code to do a task, than it will be to ask an AI to do the same task. Unless nobody knows how to write code anymore, and everyone just loves paying Google/OpenAI rent to avoid having to think for themselves.

briga

In my experience, AI is quite good at picking up new tools and techniques. In the sense that the models only need to be provided some documentation for how the new tool or framework works to instantly start using that new framework

Gemini in particular is really good at this

indigodaddy

Agreed, for example you can give it a sample FastHTML app, and it will basically review that app pretty much learn/pick up FastHTML (a new Python web framework ~8-9 months old) on the fly without even giving it https://docs.fastht.ml/llms-ctx.txt

Obviously it will do even better if you give it the full documentation but it doesn't do that badly in general with the language when you provide a sample app where it can basically just pick up the patterns of the language/framework.

vbtechguy

That's why Gemini 2.5 Pro was so helpful too with 1 million token context window, easily feed it docs for stuff to be more accurate

eknkc

This is impressive honestly.

I also find it interesting that the ai code submissions like this one are generally vague about the process.

This seem to be created using Cline on VsCode, prompting to Gemini 2.5 Pro using OpenRouter.

The commit history implies that a crude version was created by the LLM using an initial prompt and then gradually improved with features, fixes etc. Assuming ongoing conversations with the AI agent.

All code in a single index.html file which might not be great for human coders but who cares to be fair.

All in all, a prompt history would be really educational if anyone thinks about doing something similar.

sdesol

> All in all, a prompt history would be really edicational if anyone thinks about doing something similar.

As we start to develop AI first programs, I believe we will need to start connecting LLM conversations to code, not only for educational purpose but for maintenance as well. I'm currently experimenting with what I call Block-UUIDs, and they are designed to make it easy to trace LLM generated code. You can see what I mean in the link below, which contains a simple hello world example.

https://app.gitsense.com/?chat=7d09a63f-d684-4e2c-97b2-71aa1...

Something worth noting is, you can't expect the LLM to properly generate a UUID. If you ask the LLM, it'll says it can, but I don't trust it to do it correctly all the time. Since I can't trust the LLM, I instruct the LLM to use a template string, which I can replace on the server side. I've also found LLMs will not always follow instructions and will generate UUID and how I handle this is, when the LLM stops streaming, I will validate and fix if needed, any invalid UUIDs.

How I see things playing out in the future is, we will alway link to LLM conversations which will give use the Block-UUIDs generated and by looking at the code, we can see what Block-UUID was used and how it came about.

Full Disclosure: This is my tool

garblegarble

Why not just put the conversation / prompt at the end of the commit/PR message? That way you have everything in one consistent database and don't run the risk of losing it.

Additionally, you get more directly usable text out of a 'git blame'

sdesol

> Why not just put the conversation / prompt at the end of the commit/PR message?

This might be something I would do. My only concern is, the conversations can be quite long and mean very long. My "Chat Flow" right now is to discuss what needs to be done. Produce the code, which can span multiple chats and then have the LLM summarize things.

What I think might make sense in the future is to include detailed chat summaries in commit messages and PRs. Given that we get a lot of text diarrhea from LLMs, I think putting them in a LLM as is, may do more harm than good.

shermantanktop

Capturing the prompt is probably a good idea. But if I think about the goal of "reproducible builds" and "supply chain security," the use of LLMs in a vibe-coding mode looks like a step backward.

Ultimately the code needs to stand alone, but if you discover that a specific version of an LLM produced vulnerable code, you have no recourse but to try again and read the generated code more carefully. And reading code carefully is the opposite of vibe-coding.

sdesol

When dealing with prompts, there is no such thing as reproducible builds, since we are dealing with a non-deterministic system. The purpose for connecting prompts and conversation to code is to aid in debugging and developing new features. I also believe by connecting code to conversations, we will produce better LLMs in the future.

I would say AI has generated about 98% of my code for my chat app in the last 3 months and it was definitely not vibe coding. Every function and feature was discussed in detail and some conversations took over a week.

My reasoning for building my chat app wasn't to support vibe coding, but rather to 10x senior developers. Once you know how things work, the biggest bottleneck to a senior developers productivity is typing and documentation. The speed at which LLMs can produce code and documentation cannot be matched by humans.

The only downside is, LLM don't necessary produce pretty or more readable code. The more readable code is something I would like to tackle in the future, as I believe post-processing tools can make LLM code much more readable.

fer

[dead]

Hojojo

I've experimented with making it more explicit in one project I'm working on where 99% of it is written by AI, but the chat logs from Roo Code are way too verbose. Ideally, I could export a version of the chat with my prompts and metadata about which lines were changed, then I could commit that with the rest of the changes. I have every chat associated with changes made solely with AI in a chat folder named similarly to the commit, but the chats themselves are just impossible to read, so I haven't committed any of them.

rom16384

I also find Roo Code chats add way too much stuff. I'd would like something that only includes to the context exactly the files I want, and only calls the model when I want. Using AI Studio with custom system prompt works, but is not as fast, but with Roo / Cline the costs can explode if you are not careful to create new tasks.

froh

I think putting prompts into the commit log, mixed with manual edits, would be a great way to document the evolution of LLM assisted engineering.

I wonder if there is some tool support yet that supports that.

vbtechguy

That would be one long commit description. I have had prompts in 1000s of word lengths!

froh

oh wow. were those context files? or did you write the multi page prompts by hand?

re-thc

> but who cares to be fair

i.e. who cares when the LLM starts giving up when the file is too big and confusing?

i.e. who cares when the LLM introduces bugs / flaws it isn't away of?

eknkc

I mean I don’t think these projects will be maintained by humans anyway because they are not structured by humans.

If the AI fucks up then its a lost cause. And maybe you’ll better off create a new version from scratch instead of trying to maintain one when LLM starts to fail. Just ask Gemini 3.5 this time around.

The AI can write obfuscated code. Name all variables from a to z. Even emit binaries directly. Who cares if it works?

rom16384

Unfortunately I think this will the the future of vibe coding. Minified blobs of code that only the AI is able to edit. We don't usually review the compiler's use of registers or memory allocation after all.

re-thc

> If the AI fucks up then its a lost cause. And maybe you’ll better off create a new version from scratch instead of trying to maintain one

So how does it save time? Do I also tell customers we're blowing things up and redoing it every few months with potential risks like data loss?

ehutch79

Would a prompt history even be useful? This is all non-deterministic. the same prompt could result in wildy different code?

onion2k

Would that actually matter if the result code ends up running a similar, working game?

_joel

> All code in a single index.html file which might not be great for human coders but who cares to be fair.

AI won't cope well as that file gets larger, or best hope that experimental diff feature is working well. I find stuff really breaks if you don't refactor it down.

Hojojo

Gemini works with large files surprisingly well, but from my limited experience, the token usage (and cost) explodes and I'm not not sure it's worth it. I try to keep my file lengths fairly small because of it, so I have more control over what is pulled into the chat context.

vbtechguy

already broke up index.html so no longer an issue

golden-gato

I am getting the following error when running the AI analysis: AI analysis received, but failed to parse structured advice. Raw content: "```json {"summary": "The player, LIGMA, demonstrates a high rate of missile usage, firing all 170 missiles by wave 4. Despite destroying a significant number of enemies, including two shield bombs and 23 planes, LIGMA lost a substantial amount of cities and bases, indicating potential issues with defense coverage or target prioritization.", "advice": ["Prioritize city defense. Focus on intercepting missiles and bombs headed directly for the cities, as losing four cities by wave 4 significantly hinders the score potential.", "Increase accuracy for bonus points. With only 11 accuracy bonus hits out of 170 missiles fired, practice aiming closer to the incoming targets to maximize the accuracy bonus and the score multiplier.", "Consider purchasing and using special weapons like the mega bomb or sonic wave, as the click data doesn't reflect any usage of these options which can become invaluable in later waves.", "Improve resource management by not firing more missiles than is needed to destroy any given incoming attacker. The player fired all 170 missiles indicating a poor kill/shots ratio."], "improve target evaluation speed and accuracy."} ```"

Could not parse specific advice due to formatting issues in the AI response content.

vbtechguy

Yeah that sometimes happens as LLM model didn't like the generated JSON format for some reason.

ehutch79

Why would it not like json? These models are supposed to be reasoning, that would imply it could reason that there's an error and fix it or interpret around it like a reasoning human could.

DrillShopper

> These models are supposed to be reasoning

They don't "reason" - they're just AutoComplete on steroids

vbtechguy

deferent models handle JSON slightly differently, Gemini handles it better other models as does OpenAI GPT4/o1/o3 but they cost a lot more so I don't use them for AI gameplay analysis

franze

If this is too stressful, I created my own star based relaxation game yesterday before boarding a plane. Sadly did not get much traction. Its basically the travelling salesman in space

https://news.ycombinator.com/item?id=43648528

brador

I want to start from any star and make the whole route without lifting my finger.

franze

implemented the second part and its is now much cooler / smooth, thx a lot

brador

Did you implement that using ai or manually?

urbandw311er

Your post makes it sound like you wrote it yourself.

“I had a long flight today, so in the airport I coded something”

franze

coded / code directed

we cam start the discussion now i.e.: is using cursor still coding ?

is a senior team lead coding when the only thing he does is code reviews and steering the team?

urbandw311er

If you didn’t write the code then, no, you didn’t “code” it.

You didn’t even mention AI.

spacecadet

I have been building a "realistic" but simplified 2D universe simulator since GPT3.5 was first introduced, it has slowly grown to become a 1000loc Python file that uses Pygame. I think it represents a good mix of what might appear in training as code examples and physics understanding. Aside from occasionally "playing" the game, its a zero-player game... I mainly use it to test new models. Can the model handle 1000 lines of complex physics code? Can the model make improvements to areas that I already know are poorly optimized or incorrect?

Workaccount2

Gemini 2.5 has enormous context and has one-shotted 1500loc programs for me.

jjmarr

Congrats to "Kitten" for being the first to cheat the high score.

Apfel

Sorry - couldn't find a security.txt but thought I should alert you your API is currently vulnerable to prompt injection on at least a few of the fields in the structured JSON you send when analysing the game.

Happy to give more details if there's any way to get in touch outside this thread.

vbtechguy

I've added security.txt now. I appreciate the heads-up.

indigodaddy

Any chance you could reveal your entire initial prompt, or even your later-down-the-line detailed portable prompt that you mentioned you could utilize from one LLM chat to another?

eesmith

I got up to level 8 before I decided to go to the store.

I had something like $500,000. I bought up the entire inventory (at least, until the Buy buttons stopped working - there were still items available).

It then became a 'click as fast as you can and don't care about strategy' game, so I stopped.

null

[deleted]

vbtechguy

Well if you play longer at higher levels, you will see you need that cash and upgrades as it gets harder

eesmith

Could be, but the game play doesn't encourage me to continue.

Again, the first time I went to the store I could max out with everything, so there wasn't the accumulative build-up, or decision to prioritize one purchase strategy over another.

There wasn't any sign there would be new things to buy which I couldn't yet afford.

There was no hint that future game play would be anything other than clicking madly, with no need to conserve or focus resource use.

Part of Missile Command is to wait until just the right point so a single missile can do a chain reaction to take out several incoming warheads; to watch if your strategy was effective, not simply twitch-fire; and even the slow dread of watching an incoming warhead come towards a city after you've depleted your missile supply.

Here's an example from the novelization of WarGames, from https://archive.org/details/wargames00davi/page/n45/mode/2up... :

> David Lightman hovered over the controls of the Atari Missile Command tucked neatly between the Frogger machine and the Zaxxon game. ...

> Goddamned Smart Bombs! he thought as a white buzzing blip snuck through his latest volley of shots and headed for one of his six cities at the bottom of the screen. He spun the control ball, stitched a neat three-X line just below the descending bomb with the cursor, and watched with immense satisfaction as his missiles streaked white lines to their targets, blowing the bomb right out of the phosphor-dot sky.

I didn't get the same sense of satisfaction playing this version.

vbtechguy

Cheers I updated the gameplay logic a bit for this so it is better including chain reaction explosions :) Work in progress to dial in gameplay logic. But thanks for suggestions.

exabrial

Had a great conversation today with Gemini today where it told me 90000us is 9ms

nottorp

Curious... if anyone can read the source fast...

Are the game state updates and input coupled with the frame rate, as in most beginner game development tutorials out there, or did the "AI" do the right thing and decouple them?

vbtechguy

Currently it's coupled. But thanks to your question, will look at decoupling it at a later time :)

Oras

Using `Tab` out of all the keyboard keys is such a weird option!

What was the idea behind this choice?