Cells simulation

 

Cells simulation

Unity



It was a fun project to watch how it simulates mini-world where I created two types of entities: plants and cell-like 'animals'. Each 'animal' has it's own genetic traits such as: 

  • baseSpeed, 
  • baseSize, 
  • color, 
  • seeDistance, 
  • seeDistanceAsleep, 
  • seeInterval, 
  • seeIntervalAsleep, 
  • attack, 
  • healSpeed, 
  • energyLeftForChildren, 
  • childrenCount,
  • energyReserve, 
  • wanderChance, 
  • baseAge, 
  • chanceToGetSick
  • and many more were planned... 
Each 'animal' Starts with full energy bar and does these things: 

  • searches for smaller animals to eat, 
  • searches for nearest plant to eat, 
  • searches for mating partner,
  • sleeps,
  • wanders,
  • flees from bigger enemies.
Plants get spawned at fixed interval at random locations.

Cells' children inherit parent traits.

Conclusion: simulation needs more tweaking, as most of the time all '[animals' die, because food is not nearby.

In video I was speeding up the simulation, this is why it lagged.

Comments