3D implementation of Conway's Game of Life in Processing
p
- Resume/pause the simulation
c
- Clear the grid
r
- Randomise the grid (generate a new seed)
j
- Rotate the grid left
k
- Rotate the grid right
h
- Zoom the camera in
l
- Zoom the camera out
q
- Quit
Modify the following in GameOfLife3D.pde
to your preferences:
ANIMATION_DELAY
(default: 100)GRID_WIDTH
(default: 32)GRID_HEIGHT
(default: 32)GRID_DEPTH
(default: 32)CELL_CHANCE_TO_LIVE
(default: 5)- Relevant only when randomising the grid
- Must be greater than 0
- 1 = 100%, 2 = 50%, 4 = 25%, etc.
CELL_SIZE
(default: 5)NEIGHBOUR_MAXIMUM
(default: 17)NEIGHBOUR_MINIMUM
(default: 7)NEIGHBOUR_REPRODUCTION
(default: 8)
- Live cells with less than 7 neighbours die of underpopulation.
- Live cells with more than 17 neighbours die of overpopulation.
- Dead cells with 8 neighbours live by reproduction.
- Live cells with 7 to 17 neighbours live on to the next generation.
The current rules result in a mostly full grid.
- The simulation starts with a random seed.