Game of Life

Back to projects list

AnimationArtificial lifeCanvasCellular automata

Conway's Game of Life is one of the originial "artificial life" programs. Despite quite simple rules it is capable of generating incredibly complex behaviors. In fact, anything that can be computed, on any computer, can be computed on a computer running within the world of the Game of Life.

The obvious first step is to implement an animation that fills the drawing area with an initial random state and then executes the Game of Life rules. Some bells and whistles you might consider are allowing the the speed to be adjusted, including possibly faster than one generation per frame. (I.e. since the graphics can only be redrawn at most 60 or maybe 120 times per second, if you want to go faster than 60 or 120 generations per second you'll need to simulate more than one generation on each cycle.)

Another cool trick would be to simulate a much larger universe than fits in the drawing area and then provide a way to scroll around and look at different parts of the universe or zoom in and out.

References