Tutorial
GoLTGen-Web or GoLTWeb is a webgl2 based Game of Life alike Cellular Automaton. This means that it presents you with a gamefield, rules that apply to a life, lifes, as in cells of the gamefield that are either alive or dead, a start condition and a mean of visualising the cells and their age.
Board
The gamefield has to have a defined size in this Cellular Automaton, it can be set via Size X and Size Y. Since pixels within the game are square it may be set to a fraction of your monitors resolution, e.g. 192x108px for a full HD screen. It can both be interesting to set the resolution to a fairly low and fairly high number. You can also experient with different aspect ratios, just be aware that they might not fit your screen size.
To make the game more visually interesting multiple copies of the field can be displayed adjacent to each other via the array input. If set to e.g. 2x2 a total of four games will be displayed.
Game
You can control the games speed by setting a fps, each frame represents 1 iteration. Feel free to go low with fps, it can be fun to see each iteration, usually the game maxes out at 60-90fps.
Start Condition
To initiate a game there always needs to be a start condition, an empty gamefield usually does not make a game. This start condition is an image of living cells, a collection of cells that are alive with an age of 0. Those will then be susceptible to the rules defined in the next section. A set of condition generators is availble here, from squares, rectangles, circles, ovals, to arrays of thos (2x2 arrays) and random start conditions.
These conditions can furthermore be startConditionModulatorified by changing their "Size". With rectangles, squares, circles, ovals, rings and crosses it affects their size in pixels in the most literal sense. For the random generator it changes the density of living cells, where a lower number means more cells. For the vertical and horizontal bars it defines the number of lines.
GoLTGen is for the most part a standard two-dimensional Moore neighborhood Cellular Automaton with the additions of a cells Age (from 0-255) and the Natural Death attribute (When does a cell naturally vanish?).
Rules
There are three basic sets of rules. When does a cell Survive? When does a cell get born? When does a cell die naturally? The first two rules are represented by a string of literals, e.g. "1, 2, 3", that represent how many neighbours have to be alive to meet this rules condition.
I.e. if the rules for survival are set to "1, 2, 3" then either 1, 2 or three neighbours have to be alive for the cell in question to survive another iteration. If no neighbouring cell is alive, then the cell in question will "starve" and die. If more than 2 neighbouring cells are alive, it will die of "overcrowdedness".
Similarly if a game has a ruleset of "1, 2" for births a cell will be born, switch from dead to alive when it has one or two neighbours that are alive. With no neighbour the cell will stay dead and with more then two neighbours the cell wont come to live due to "overcrowdedness".
Feel free to go crazy with these rules, even a ruleset of 1, 1 for survival, birth can result in an interesting game.
Last but not least the natural death rule, this is a more foreign one to typical cellular automaton implementations, it defines an age at which a cell will vanish naturally and even with otherwise perfectly fine survival conditions. This allows for more interesting games with otherwise static cellular automatons. The maximum age is 255 iterations, while a minimum age will cause the cells to never die, basically disabling this rule. For faster rulesets (e.g. 1, 1) you may choose an early natural death to better map the colour palette, while for many other rulesets a long lifetime might be desirable.
Colors
To make this cellular automaton visually interesting we need to map some colors onto it. Since usually there are only two states to a cell, dead or alive, we have added a third state that gives us a more interesting view of a cell, its age! Our display is each cells age mapped onto a colour palette from matplotlib.
The colour-maps can be reverseColormapd by enabling reverseColormap
To give you some more control you can re-map each color palette better onto the cells lifetime by changing when in its lifetime the palette should start to change, and when it should stop to change. You can create some dead-banding with this and make the whole game visally less complex, more pleasing.
Controls
For when you are in a game you can control it with your keyboard. A game will keep some history, allowing you to go back in time.
Press space to start or pause a game.
Press arrow-right to advance one iteration when the game is paused.
Press arrow-left to reverseColormap one iteration when the game is paused.
Press h to hide the game-controls
Press F5 to go back to this screen.
You can share Games by sharing their link, you can also save games to local storage by giving them a name in game and press save!