Vibe coding project - particle life.

1) Particle life.

particle life is a fancy term referred to particle system which is in influence of each particle inside it. The ‘influence’ includes Gravitational or any forces taking place in between the particles (in our context).
I got inspired by NASA’s simulation where they simulated collision of Milky way galaxy and Andromeda galaxy. They give all the forces to particles and place them in desired positions. Once the simulation is played, we get the results of merger between both galaxies.

2) The Code.

I experimented with Gemini CLI which is Google’s AI coding tool to generate logic and code. I used C language for the project and used Win32 for UI.
The code quickly became unmanageable and unreadable. Code had a switch statement with 12 switch cases and 334 lines of code. This is nightmare for maintenance and debugging. The came switch statement contained 4-5 levels of nesting. The code quality was very poor and chaotic.

3) The Output

On running compiled executable file, many glitches showed up. Specifically about the UI.
By only looking at the output of executable file (i have no idea what code it has written. As i was unable to read it.)
It was always reloading whole window or at least the dashboard which contained force matrix and some other buttons. The dashboard was continuously iterated in a loop and it was showing output at end of each loop. I figured out this because each time when the window was resized, the dashboard moved with it leaving leaving traces of dashboard behind in a continuous line. Like a trailing screen and was It was always flickering. On Google search it showed bug called ‘Screen artifacts.’ Typically caused by improper buffer handling or continuous redrawing without clear invalidation.
(please let me know what could be real problem. correct me if i am wrong)
The actual particle life physics was no working. There was no movement in particles at all. I wanted it to choose color of particles, but it could not change any. The screen was just flickering with a lot of glitches.

4) Conclusion

While AI tools like Gemini cli show promise, they currently fall short in building complex, maintainable systems. There were numerous problems in the code which resulted a very buggy and glitchy output. Indeed AI is a good assistant but not a good developer. AI written code needs major fixes and debugging. The code is unreadable and lack various things.

0
Subscribe to my newsletter

Read articles from Atharva kulkarni directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Atharva kulkarni
Atharva kulkarni