This is a simulation that takes lot of time to work fine and give visible results.
And it lags a lot.
Some technical crap:
It's an example of evolution. The big dark red balls are something like plants and the small red are herbivores, that keep the number of the plants at a constant level. The "plants" are reproducing, but the next generation is always a little bit better or worse than the previous. What does it mean?
The plants have a maximal age to which they can live (it is measured by the friction of the balls (15 = die)). Every collision with a black object is something like gaining a little bit of resources to grow, but is also "making the plants older". How much older the plant will get is depending on it's color. Red = die faster. Green = live longer! Every 10 collision the plants are reproducing, creating a new plant with random mutations.
The formula for how much new plants a plant will create before dying is:
1.5 / The red value in the RGBA
You have to round the result down.
So a plant with red = 0.5 will create 3 new plants, but a plant with red = 0.4 will also create 3 new plants (only if they won't be eaten by herbivores). In fact every value between 0.5 and 0.38 is a neutral mutation. Only if the plant will have the red value below 0.38 it will create more than 3 new plants. But the process is getting faster with each mutation.
This is how much "children" a plant will have with the corresponding red colors:
37 - 4
30 - 5
25 - 6
21 - 7
18 - 8
16 - 9
15 - 10
13 - 11
12 - 12
11 - 13
10 - 15
9 - 16
8 - 18
7 - 21
6 - 25
5 - 30
4 - 37
3 - 50
2 - 75
1 - 150
I can't really explain that good... It will just change it's color from red to green, but it takes about 20 minutes and will also lag a lot.
If the screen is full of plant-balls just copy a herbivore. In reality the population of herbivores would also grow, if there were enough food. That way you can reduce the lag.
It isn't a very good simulation. In majority it is because of the lag, and the very slow evolution, but hey! evolution on earth took much longer.
If anybody could speed it up i would be thankfull
. For now it's just an idea.
Edit: You can delete a herbivore at the beginning of the simulation, to speed the proces up. Also you can create with the box tool a big object at the white spaces, that will ram into the balls.
SORRY FOR BAD ENGLISH