Vibe coding an invaders game for the web.
We have been vibe coding for a while now but not had a name for it. As I have not written any articles for a while, I thought I could Vibe Code a simple well known game. With the release of OpenAI:s 4.1 and Gemini Pro 2.5, Claude 3.7 is no longer the strongest model for use according to my experiments. Unfortunately I have not had the opportunity to try Grok 3 yet.
If you want to try final version of the game, here is an online version.
We start with Gemini 2.5 it only makes minor misstakes such as using DrawCircleBlend that does not exist in raylib. Typical hallucination. This is easily fixable. But there are still bugs.
Ons is that you cannot shoot through the planets. So that needed to be fixed.
I tried to feed the program to Open-AI O3 but the whole program did not fit so I had to try o4-mini-high. Also no success here. It added some pretty useless unit test but could not identify the error. Then by sheer luck I used black instead of blank for drawing in the DamageShield() function. This showed the error more clearly.
I got claude to rewrite the function andlocate the error by looking at the resulting image when shooting at the shield. It also used GetTextureData() that has been renamed to LoadImageFromTexture() in raylib.
Claude could not read the whole program either but I was able to fix the error by feeding it the faulty function only.
This was easily fixable. The whole program did not fit so I had to go back to using Gemini
The Seniordev has done more vibe coding than me and here I summarize his key takeaways as well as the one I have added.
- You get technical debt on steroids.
- You cannot build what you do not understand
- English is not a programming language
- There is a big gap between production ready and proof of concept.
- No, It will not get fundamentally better
Vibe coding can be fun for a really small Hobby project, but it is not as easy as one thinks. As been said in the video: Software is an ever changing solution to a ever changing problem with forever changing technology. No doubt the models will get better but it will take some more time before we can solve real world complex problems that require project wide changes.
Using LLM:s in your developer toolbox is helpful and vibe coding can be fun but it cannot replace us as software developers yet. (May 2025)