Ants
← Back to HomeProject Description
A surprisingly accurate simulation of ants foraging for food. Click to feed them!
Initial Prompt
I uploaded a sprite file with fruit images. Create an HTML page that shows a random selection of each fruit in random locations on the screen. Later... create a simulation of ants, looking for food and bringing it back to their nest, in the middle of the screen.
Lessons Learned
- What worked: The final product is amazing! I love the behavior that ants have and how close it is to reality.
- What needed help: The initial cutting of the sprite was incorrect, even if AI detected that each fruit was 16 pixels and even if it gave names to each fruit! The pheromone logic was inverted, so ants would follow others carrying food, instead of going towards the source of the food. The ant was initially an ugly black rectangle, and after another prompt, it became a detailed ant with long antennas. I refined that manually and I'm happy with the result.
Project Card
Dev environment: AI Studio
Model: Gemini (2.5)
Dev time: 3 hours
My Rating:
Submitted: May 31, 2025
Credits: Fruit asset from itch.io
Author
Roberto
About Me
When I don't code for work, I code for fun! On CO-DERS I like to post some of the results of my vibe coding sessions, as I learn how to build with AI.
I'm rediscovering the origins of my passion for coding: creating something new, visually appealing, with surprising behaviors and functions.
Stuff I do
- I come up with project ideas all the times
- I'm writing a book
- I love my family
Keywords
- Android
- Italy
- Solo
Explore Other Projects
Have a Project to Share?
We're always looking for exciting new solo projects to showcase. If you've built something cool, we'd love to hear about it!
Start Your Project