12 ms·
Show HN: Atari Missile Command Game Built Using AI Gemini 2.5 Pro
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.
- indigodaddy 1y agoAny 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?
- jjmarr 1y agoCongrats to "Kitten" for being the first to cheat the high score.
- deleted 1y ago[deleted]
- eesmith 1y agoI 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.
- vbtechguy 1y agoWell if you play longer at higher levels, you will see you need that cash and upgrades as it gets harder
- eesmith 1y agoCould 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?q=missile 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.
- deleted 1y ago[deleted]
- Oras 1y agoUsing `Tab` out of all the keyboard keys is such a weird option! What was the idea behind this choice?
- kenjackson 1y agoWhat prompt did you use and how much did you have to code on your own?
- pkaye 1y agoNot the OP but I did something similar for a breakout style game. I just interactively provided details specifications like there is a ball, paddle, bricks, powerups, what they look like and behave, how collision is handled, etc. For example, if you get a multi-ball powerup, it will add additional two balls in flight. If you get a shooter power up, the paddle will be able to shoot bullets for 10s. I didn't even have to write any code to get exactly what I thought up.
- kbouck 1y agoDid same but for Asteroids. Had a working wireframe version after only a couple of prompts! I think using the term "Asteroids" in my original prompt was a bit of cheat/shortcut. My lessons learned for prompting were to have project broken down into clearly defined modules (duh...), and to constantly feed the latest module source back in as context along with the prompts. This helps ground the responses to only adjust the code related to the prompt, and to not break stuff that was already working.
- kbouck 1y agoProbably quite a few prompts. Should we be checking in our prompt history into version control as a kind of source code or requirements spec? Seems prompt revision and improvement would be valuable to keep a history of.
- jansan 1y ago> Initially built using the Google Gemini 2.5 Pro AI LLM model. What does this mean?
- icf80 1y agomy guess: they started with some code generated by Gemini, but they had to modify it in order to get what they wanted.
- vbtechguy 1y agoUsed https://gemini.google.com https://gemini.google.com Gemini 2.5 Pro canvas mode for Gemini Advanced subscription account to ask it to build Atari missile command game in HTML5. Tweeted about it at https://x.com/George_SLiu/status/1906236287931318747 https://x.com/George_SLiu/status/1906236287931318747 almost one shotted but after I passed level 1, it jumped to level 182 and pulverised my cities and bases LOL
- deleted 1y ago[deleted]
- eknkc 1y agoThis 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 1y ago> 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-71aa1c2b0e0d 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
- fer 1y ago[dead]
- garblegarble 1y agoWhy 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'
- Tistron 1y agoAfter some levels I could just press sonic wave 3 times and win without even doing the clicking. Had enough money to replenish. After winning level 29 nothing more happened.
- irjustin 1y agoI started playing with Gemini 2.0 Pro and 2.5 is another level. It's my goto for coding over Cursor. I just wish they put more effort into the VSCode plugin/agent.
- _joel 1y agoI've had the opposite experience when using it in windsurf. I get, for my use cases, worse results using it vs. Claude Sonnet 3.7
- dailykoder 1y agoI started playing with vim, but neovim is another level. It's my goto for coding over vim. I don't expect them to put more effort into anything, because it just works as a editor/IDE.
- redbell 1y agoNo offense here, but I am wondering what's the relation between the topic being discussed here and vim/neovim?! I also checked your profile and again, wondered why you are putting this: "Only admins see your email below. To share publicly, add to the 'about' box." as your bio!
- nottorp 1y ago> I am wondering what's the relation between the topic being discussed here and vim/neovim?! It's a similar religious matter? > I also checked your profile and again, wondered why you are putting this: "Only admins see your email below. To share publicly, add to the 'about' box." as your bio! Why not? I have "Error retrieving about text" in my "About" field on a certain sms replacement chat app...
- lizardking 1y agoHa, it's another story on HN right now. They probably had both tabs open like I do at this very second.
- mentalgear 1y agoI don't know how impressive this is, since the exact or very close variations of these games certainly can be found in the model's training data. This is neither innovative nor showing creativity IMO and reminds me more of twitter hype-bro posts, than something truly HN front-page worthy.
- sgt101 1y agoI think that the other question is "what do we mean that Gemini 2.5 built it" - was it with a prompt like "build me a missile command game with a reward system that will enable me to buy upgrades"? Or was it interactively with the dev?
- vbtechguy 1y agoGist of it was 1. Used https://gemini.google.com https://gemini.google.com Gemini 2.5 Pro canvas mode for Gemini Advanced subscription account to ask it to build Atari missile command game in HTML5. Tweeted about it at https://x.com/George_SLiu/status/1906236287931318747 https://x.com/George_SLiu/status/1906236287931318747 almost one shotted but after I passed level 1, it jumped to level 182 and pulverised my cities and bases LOL 2. Iterations in subsequent chat sessions in Gemini web to fix it up, add in-game store, leaderboard and end-hame AI analysis and when Gemini 'something went wrong' messages, jumped over to Claude 3.7 Sonnet via Claude Pro subscription web interface to finish off the task 3. A few days ago, I tried Cline with VSC for the first time with Openrouter AI API key and Gemini 2.5 Pro free LLM model has helped me with further development. Also now trying out Google Firebase for more Gemini 2.5 Pro access https://studio.firebase.google.com/ https://studio.firebase.google.com/ ^_^
- indigodaddy 1y agoHow are you liking firebase studio?
- vbtechguy 1y agoFirebase Studio still too buggy for my liking. It has potential though
- echoangle 1y agoDoes missile command not have friendly fire? Can you really detonate missiles directly over your own bases? Currently, it seems pretty easy.
- Arisaka1 1y agoAs someone who grew up with an Atari, the difficulty was coming from you having to rotate the turret for target priority. Turning it into a touch and shoot (I only tested it on my phone) removes that portion of the game.
- franze 1y agoIf 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 https://news.ycombinator.com/item?id=43648528
- brador 1y agoI want to start from any star and make the whole route without lifting my finger.
- franze 1y agoimplemented the second part and its is now much cooler / smooth, thx a lot
- brador 1y agoDid you implement that using ai or manually?
- franze 1y agoai of course - not a single line of code written by hand, just an ever rotating wheel pf gemini 2.5 (for high quality code), claude (for beauty in audio and graphics), chatgpt o1 pro for quality assirance, bug reports and diguring oit the edge cases and for DRY and KISS refactoring, and cursor for incremental improvements in between)
- urbandw311er 1y agoYour post makes it sound like you wrote it yourself. “I had a long flight today, so in the airport I coded something”
- franze 1y agocoded / 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?
- greybox 1y agoOne 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 1y agoYes 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 1y agoAI 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 1y agoAn 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".
- DocTomoe 1y agoWhen you get old enough, you realise the cycle turns around and around A new dev tech shows up. Old devs say: That's not real programming. Real programmers use the old ways. You take all the skill out of it. You'll never learn to do it the "right way". And then, it becomes standard, an no-one wants to go back but a few hobbyists. It's been this way with switching from assembly to more human-readable languages. It's been this way with syntax highlighting. ... and with IDEs. I remember when we scoffed at IntelliSense over the Water Cooler because them kids didn't have to memorise stuff anymore. I kept cursing at Docker and npm insanity, having colourful languages for people who hid behind abstraction because they did not understand basic functionality. And today, it is AI. Right now, it divides. Those who love it, those who consider it 'cheating' or 'stealing other people's code'. In reality, it is just another level of abstraction in the development stack. Tomorrow, it'll just be 'the standard way to do things'. I wonder what comes next.
- golden-gato 1y agoI 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 1y agoYeah that sometimes happens as LLM model didn't like the generated JSON format for some reason.
- ehutch79 1y agoWhy 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 1y ago> These models are supposed to be reasoning They don't "reason" - they're just AutoComplete on steroids
- vbtechguy 1y ago
- jrvarela56 1y agoThat was fun, thank you!
- kookamamie 1y agoThe background is animating far too fast and is very noisy to look at. Win/Chrome/9950x3D/RTX5090.
- vbtechguy 1y agofixed :)
- nottorp 1y agoCurious... 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 1y agoCurrently it's coupled. But thanks to your question, will look at decoupling it at a later time :)
- spacecadet 1y agoI 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 1y agoGemini 2.5 has enormous context and has one-shotted 1500loc programs for me.
- m3kw9 1y agoIs a lossy compressed game extracted with lossy error correction
- indigodaddy 1y agoHow/why are random sites/apps hosted on the centminmod.com domain?
- vbtechguy 1y agoBecause the game is hosted on Cloudflare Pages/KV/Workers and domain is already using paid Cloudflare Workers so no additional subscription costs :)
- indigodaddy 1y agoOk sure, but/so you are the centminmod dude then? Eg the WordPress cli stack thingy? I guess I'm just confused lol
- vbtechguy 1y agoYes, same dude. I develop the Centmin Mod LEMP stack :)
- indigodaddy 1y agoGot it! Ok makes sense now, I thought it was just some random person using your domain to publish a webpage:)
- exabrial 1y agoHad a great conversation today with Gemini today where it told me 90000us is 9ms
- Apfel 1y agoSorry - 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 1y agoI've added security.txt now. I appreciate the heads-up.
- vrighter 1y agodoes it also run in less than 128 bytes of ram, with half a scanline as a "framebuffer"?