READ ALL TO UNDERSTAND WHAT IS GOING ON ___________________________________________A simulation of an ecosystem. First plants spawn, and have a small chance to reproduce, and a small chance to die every few seconds. Herbivores then come in, and each of them has their own food bar, which goes up as they eat plants, and down over time. If it reaches zero then they die, and if it reaches a certain point, they reproduce. Carnivores are the same, except they eat herbivores >:) The ecosystem manages to stay in a balance, because if one population goes down, the things that eat it go down, and the thing it eats goes up. This causes them to go up, as they have more food to eat, and less things killing them. This causes all species to stay alive, unless some huge coincidence happens, as its strongly rng base. This is unlikely though, as the populations support each other by reacting to the changes in population.
If you have any suggestions please tell me them in the comments. I plan to turn this into a game, where you control an ecosystem, and have to make a stable community, or create a species that can survive. 100% by me.