Hi! This is just a small simulation I made in which some organisms (which I call cells although they're way more advanced than a cell) try to survive and evolve, simulating natural selection.  The project is heavily inspired by a video by Sebastian Lague on ecosystems and genetic algorithms and a video about a cell simulation, the Bibites.

Instructions for the simulation

Set the desired parameters and then click generate. These are the suggested parameters to start the simulation:

  • MinStartingCells10. The minimum amount of cells to be generated at the beginning of the generation.
  • MaxStartingCells20-25. The maximum amount of cells to be generated at the beginning of the generation.
  • MaxFood1000. The maximum amount of food to be generated.
  • FoodMultiplier500. The higher, the more food will be generated per second.

Cell behaviour

When born, the first cells of the simulation get random traits/genes which allow them to act different than other cells. These are the possible genes:

  • Speed: The maximum velocity the cell can reach. A small cell will move faster than a big cell.
  • RotationSpeed: How fast can the cell rotate.
  • Size: The scale of the cell. A big cell will consume less food per second (energy wasting) than a small one.
  • FoodType: What food will the cell eat, either vegetal or meat.
  • LookRadius: The vision range of the cell, with which it will detect food and other cells.
  • Color: It doesn't have a purpouse other than showing all the members of a "family".
  • MinSurvivingTime / MaxSurvivingTime: A random number between these two traits determines how long will the cell live.
  • VirusResistance: The higher, the lesser the effect of a virus when infected.
  • Cell action genes:  When born, the cell might acquire some of these genes:
    • CanMove: Ability to move around the scene. It's essential to survive, so it's easier to get it when being born.
    • CanStop: Ability to stop. Really useful to better control the cell's movement.
    • CanTurn: Ability to rotate.
    • CanAttack: Ability to attack. Not really useful at the moment, since it's not fully implemented.

The cells can also get infected by a virus when eating poisoned food (purple food). A virus can give the host cell the following effects:

  • Damage: Inflicts damage to the cell, making it more vulnerable.
  • Mutation: Makes the cell mutate a random gene without having to create a new child.
  • Hunger: Consumes food.
  • Slowness: Reduces the cell speed. 

A cell with a virus.

To survive, cells must eat food (that includes other cells!). There are 3 types of food:

  • Vegetal: Only appears in the scene, but more abundantly than meat.
  • Meat: Appears in the scene and is released by dead cells.
  • Poisoned: Contains a virus.

All three kinds of food.

UI

Clicking a cell will display this menu. This panel shows all the variables of the cell, from health to color. At the bottom, five dots are shown, which represent the genes:

  1. CanMove
  2. CanStop
  3. CanTurn
  4. CanAttack

If a dot is red, the cell doesn't have that gene. If the color is green, the cell has that ability.

The cell panel


Enjoy!

ics_de

Development log

Comments

Log in with itch.io to leave a comment.

This is a copy from the bibites