This is a simulation of life, where on the cellular field agents and food for are indicated in two colors, red and blue, respectively. Cell brightness describes energy for an agent cell, food amount for a food cell. Each agent has his own set of instructions (stand, move around the field, clone himself).
To perform them, energy is needed, which can be resumed by moving into a cell with food. This project targets two goals:
- Build a stable ecosystem (agents are alive)
- Get cool graphic effects
Both are done by changing the simulation parameters described below.
After launching the app, a field will be generated. It will be shown in the center of the screen. Simulation stats will be displayed in the top left corner.
The app has 2 input modes:
- simulation control (default)
- console
In simulation control mode you may use:
Space
to pause/unpause simulationN
to go only 1 tact ahead
To switch to console mode and back from it, use Tab
.
Console mode is used for advanced game control. Using commands you may change simulation parameters and do some cool stuff described a bit later These commands for simulation parameters changes are available:
ame
- agent move energyace
- agent clone energyamo
- agent mutation oddsfgl
- food grow limitfgt
- food grow timetft
- time for tact (in ms)mce
- min clone energyfma
- food max amountfia
- food max init amountfms
- food max spawn amountfsa
- food spawn amountcfs
- change field size (in cells)
Each of them requires a number parameter (with space as delimetr)
There is also a second type of commands - actions:
hlp
- show most used commandsrst
- restart simulationdra
- enable agent draw modedrf
- enable food draw modedrc
- enable clear modedrs
- disable draw mode
In draw mode a cursor appears, and you can either click on the required cells one by one or click and move the mouse above the required cells while holding the button pressed.
Note that you can't continue the simulation while the drawing is active. Use drs
to stop it.
After the game ends you may use draw mode to add some agents and continue the simulation. (Note that it will be paused)