Aquarium

← Back to Home

Project Description

Can AI simulate realistic animal behavior? :) Notice how the fish gets more reactive and aggressive as they get hungrier. They will chase food to beat the others. Can you spot the largest... poo?

Initial Prompt

I want to build an app in p5.js that simulates an acquarium. Please generate code that I can copy and paste into the p5.js editor. Let's start with the background, I want a blue gradient, sand, pebbles and a few plants. Great! Now let's add a few fish. I want them to be able to turn around and swim realistically.

Project Development Snapshots

Development snapshot 1 for Aquarium

Preparing the aquarium with sand, pebbles, and plants. Only at the very end I played with the app constants and multiplied the plants by 100!

Development snapshot 2 for Aquarium

The first fish! Gemini created a lovely variaty of sizes and colors!

Development snapshot 3 for Aquarium

Adding food

Development snapshot 4 for Aquarium

Adding a ton of food and trying to fix the 360 rotations of the fish

Lessons Learned

  • What worked: 2D fish are incredibly easy to draw and they look good. The final result is awesome, in my opinion! Easy to change paramters and configure your own aquarium.
  • What needed help: I ton of tweaking to the the fish to turn around and swim realistically.

Project Card

Dev environment: Google AI Studio

Model: Gemini (2.5 (preview))

Dev time: 4 hours

My Rating: ♥︎♥︎♥︎♥︎♥︎

Submitted: May 30, 2025

SimulationP5.jsRelax

Author

Roberto

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

© 2025 Solo Productions ⌘ CO·DERS.com ⌘ All rights reserved.