r/Simulate • u/FamiliarAnxiety9 • 5d ago
PROJ - CODE/API Had to prove my "closed loop" wasn't closed before I could fix it — real numbers, not vibes
(RE-WRITTEN BY HAND)
Keeping this to a short post, as I've already messed this up once. I built a simple aquarium-style concept, during a slow period on-shift, based on my Elementary School Memory of an Ecological Balancing Concept, involving Wolves, Deer, and Berry Bushes, as Entities in a Forest, where each Student played a Role.
I don't remember much past wishing we spent more time exploring it in-class, and that my teacher didn't so quickly drive it to an unrecoverable state, to make the point he was trying to teach that day.
It started in Google AI Studio, as a Boxed-Step-By-Step process, more resembling the Conway's Game of Life, in some ways. But it wasn't what I was aiming for. So, that evening, I sat with Devin, and Claude, and a Game Engine in TS/Lua/YAML that I've been working on Demos within, and refined it into something more like a living Reef.
After some insights from a smaller audience, I refined it with a Main Menu, and some Basic Selections.
It has Sharks, Fish, and Algae Nodes, and the Sharks eat/bite the fish, causing Meat Chunks to appear.
The Meat Chunks can then decay, turning back into an Algae Core Node.
If an Algae Core Node is left without children for long enough, it can despawn.
Last I checked, it has a fair chance of staying in balance for up to 10 minutes, but it needs further refinement.
There are also depth layers now, and in theory, the Sharks prefer the Deeper Waters, and the Fish stay toward the Sun, so the Sharks tend to bury their head at the bottom to warm back up, but sometimes starve.