This program is the Game of Life, written for 3DS in SmileBASIC!
The Game of Life is a cellular automata game, in which cells [pixels] live, die, or reproduce according to simple rules. The default rules used in the program are [quoted from conwaylife.com]:
"Any live cell with fewer than two live neighbours dies (referred to as underpopulation or exposure).
Any live cell with more than three live neighbours dies (referred to as overpopulation or overcrowding).
Any live cell with two or three live neighbours lives, unchanged, to the next generation.
Any dead cell with exactly three live neighbours will come to life."
The way this is implemented here is this:
"If a cell has more than one neighbor and less than four it continues to live. If a dead cell has 3 live neighbors, it becomes alive."
The program is designed to be easy to read (hopefully) and simple to modify, as most important stuff is defined as variables at the start of the code, such as board size, cell color, the neighboring rules, and
Spoiler
secret bonus colorful cells - looks really cool ;)
Instructions:
The program controls are:
- A - Advance one generation of cells.
- B - Randomly fills cells.
- X - Clears all cells.
- Y - Enables 'automatic mode,' where each generation automagically advances without input. Currently not disableable.
- L - Enter text which will be turned into cells. Fun!
Within the code, several variables are defined and can be easily modified to enhance the user experience.
These variables include:
- celColor%[0]
- celDead%
- celGrow%
- celMany%
- xMin%
- xMax%
- yMin%
- yMax%
All of the above variables can be changed to produce different effects.
Oh, and
Spoiler
there is commented code that can be un-commented and will enable the secret :)
Notes:
The program works best on New 3DS due to enhanced speed.
Saving/Loading designs MAY be implemented, but I don't want to design compression stuff and don't want to waste space either... ;-;
Use text input for the current 'set patterns' or whatever. Watch your name explode with life!
Needs pictures.