A downloadable simulation for Windows, macOS, and Linux

Download NowName your own price

I spent the last few months developing a simple evolution simulator.

I have found that it's quite meditative just watching those small creatures mate, feed, and grow. There's something really relaxing about just watching "nature" take its path.


There are 3 classes:

- Prey (They feed on plants and are hunted by the predators)

- Scavengers (They feed on the corpses of dead creatures)

- Predators (They hunt both scavengers and prey)

Every creature has genes, which it can pass on to its offspring. Every generation, random mutations happen. This way, the population should eventually come to a point where there is a balanced mixture of creatures, living on indefinitely.

When there are less than two creatures left, the population will officially be extinct.


Every creature has hunger, which it can only fight by eating its preferred food. When a population grows too big, the plants, which grow every sunrise, won't suffice anymore to feed the number of prey, which serve as food for predators. Their corpses will fill the bowl and the feast for the scavenger class will begin. Once every herbivore has died, there won't be anything left to feed on the plants, who will now start to overgrow everything. Except, of course, a mutation happens while two predators or scavengers mate and their child starts eating plants. 

You can speed up the simulation by 1x, 2x, or 4x.  You can toggle names and descriptions on and off. You can zoom in and follow a creature. And you can start a new generation from scratch if you're not happy with how it's going.


Creatures also have a description that tells you, if they are a herbivore, a carnivore, or a scavenger. It also depicts the age and the generation of the creature. Generations each have their own names. The more herbivorous ancestors an animal has, the greener it gets. The more carnivorous, the redder, and the more scavenging ancestors the greyer. The tail size shows the hunger of a creature. 

A few genes that can be passed on are:

- Speed

- Metabolism

- Sight

- Reproduction Speed

- Curiosity (How often the creature looks out and turns)

- Persistency in finishing what it started

I also implemented a few gimmicks :)

For example, the ground gets greener, the more plants grow on it, you can click on the paper sheet lying on the book and you can read the instructions, tails swing faster the more speed a creature has, predators get disgusted when they encounter a corpse lying on their way to prey and turn around.

Some things I learned while doing this project:

How to make objects instantiate, how to randomly instantiate objects in a circle radius, how to make creatures stay inside a circle naturally, how to invoke something, how to assign components to objects via script, and how to use and animate with Blender, how to use for (i), and just practice, of course. 

Some nerd facts: 

Creatures detect food by raycasting a line, if something edible hits it, this object will be assigned to the food slot of the creature, disabling the normal script and casting a line to the food, following it until it comes in range of the second (mouth) raycast or its persistency runs out. 

Food is sentient! It gets a message if it gets eaten and starts shrinking down and then destroys itself. 

The speed button scripts are done with Unity's time scale implementation, which makes it really easy to change the speed of the whole game! Well done, Unity!

Originally, the button click areas wouldn't work in build mode, the solution was to move all child text objects in the canvas down in the hierarchy, set all button scales to 1.0f, and then change their scale with the object rectangle scaling.

Never import light and camera together with your blender object, this will mess up the whole project! And the materials don't work in Unity, you have to make them manually. Also, un-subdividing objects is awesome for the performance.

So, that was everything! Have fun with my software!

Download

Download NowName your own price

Click download now to get access to the following files:

Pocket Agar.app.zip 25 MB
Pocket Agar Windows.zip 25 MB
Pocket Agar Linux.zip 13 MB

Development log

Leave a comment

Log in with itch.io to leave a comment.