T R I X E L   G A M E   O F   L I F E 
by Lode Vandevenne


This is a game of life in 3D, based on a raytracer engine I made some time ago.  The raytracer isn't really the fastest one out there, so it runs in a very samll resolution, but it should work great on any computer that's more than 1GHz.

Game of Life is a cellular autonoma invented in 1970 by John Conway.  normally Game of Life is played on a 2D grid and the rules are as follows:

For a space that is 'populated':
 
Each cell with one or no neighbors dies, as if by loneliness. 
Each cell with four or more neighbors dies, as if by overpopulation. 
Each cell with two or three neighbors survives. 

For a space that is 'empty' or 'unpopulated' 
Each cell with three neighbors becomes populated (birth).

more info here: http://www.math.com/students/wonders/life/life.html


But Trixel Game Of Life plays on a 3D grid.  The grid is made out of 64x64x64 cubes and you can choose the rules yourself.


Choosing The Rules:

edit rules.ini: this ini file contains a total of 52 values, 26 SurvivalRules and 26 BirthRules.  Leave all the values at 99 if you want No Rules, that means everything will die and nothing will get born.  change any of the values to something smaller than 27 te get a new rule, for example if you set a value 12 under SurvivalRules, a cube will survive if it has 12 filled (= living) neighbourcubes.  Or if you enter 5 under BirthRules, a cube will get born if it has 5 filled neighbours.  Please make sure the ini file always looks like this:

SurvivalRules
26 lines with a numerical value
BirthRules
26 lines with a numerical value

If the ini doesn't look like that the program will get confused.  The lines with value 99 simply mean "survive" or "get born" if there are 99 living neighbours, but this never can happen because a cube only has 26 neighbours.  If you delete the ini, the default rules will be used: 2/3 for the SurvivalRules, 3 for BirthRules.


Controls:

When you edited the ini, start up the exe and use the following controls:

Up arrow: move forward
Down arrow: move backwards
Left arrow: strafe left
Right arrow: strafe right
Keypad 1: move up
Keypad 0: move down
Mouse: rotate camera

b: make the cube in front of you "alive": you will see a colorful cube in front of you
n: make the cube in front of you "dead": the spot in front of you will be empty again

Spacebar: apply the Rules of Life once
Keep spacebar pressed: apply the rules all the time
s: calculate the rules 50 times (takes about 7 seconds on my pc)
d and f at the same time: apply rules 10000 times (do this if you don't need your computer for a while...)

c: clear world
i: invert world (all living cubes will die, all dead cubes will live)

Keypad 7: bigger resolution
Keypad 8: bigger resolution
Keypad 9: full resolution (slow!)
esc: quit
Keypad 4: roll camera left
Keypad 6: roll camera right
Keypad 5: reset camera direction

grey +: faster movement speed
grey -: slower movement speed

SO BASICLY:
-set rules in the ini file
-press b and move the camera around with mouse/arrows to place living blocks
-keep the space pressed to see the life grow according to your rules
-if the camera is upside down and you're confused, press 5 to reset it
-press keypad 7, 8 or 9 for bigger resolutions
-when you're tired, hit esc to quit


This is freeware so feel free to distribute but leave binary intact and always include the readme.
Maybe I'll release the source code one day but it needs cleaning up first.

Copyright C 2002 by Love Vandevenne