I believe there are some pretty good algorithms for this. I think they show up under the google term “swarming behavior”.
I think it might be a good idea to remove the distinction between herbivores and carnivores. I think it would work better if you gave every animal the ability to evolve their food preference.
Each animal could instead use two nutrition values (For eating plants and eating animals). Every new spawn could have a slightly randomized preferences from their parent. The catch would be that both nutrition values must add to a preset constant and a nutrition under a certain amount would not yield any benefit for eating that type of food.
I think this would improve balancing issues with bad spawn rates since more herbivores will evolve when meat is scarce and vice versa. It would also introduce omnivores which sacrifice digesting one food really well for the ability to be able to quickly switch between food sources when one is scarce. It would also continue to follow the original model since switching would take many generations to complete.
You don’t want to restrict them too much with our conception of what an animal is and does.
Agreed! We’ll get to what you describe a couple more iterations down the line, after the very basics are complete, such as having creatures chase and evade, go hungry etc.
I’ll write more extensively soon about how mutation events will work, but basically you’ll:
- Select a species and fork it
- Give that forked species a new ability
- Choose if the forked species should be genetically compatible (can create offspring) with its origin species or not
That’s a good idea, when I implemented the current solution I only had in mind doing exactly what the MVP described, so there was no consideration for omnivores.
But I like this solution better, mainly for the flexibility it brings.
I’m interested in the discussion regarding mutation, should we have this on the agenda for a call after the current MVP is done?
Yeah. I’ll touch on the larger design this weekend, and then for our next meeting I should have already published more design documentation to further clarify my vision.
A post was split to a new topic: General purpose steering behaviors for Amethyst/ECS