Skip to Content

Conway's Life with Color

I was trying out different methods of adding color to Conway's Life. The result may be viewed by clicking HERE.

Rule Changes

This demo follows the normal rules of life with minor changes for colors. In keeping with the simplicity of Life, the new rules are also very simple:

  • Each cell has a color attribute. When generating the initial board, colors are randomly assigned.
  • When a new cell is created it inherits the most prevalent color of the surrounding cells, or if there is a tie, any one of the the top colors may be used.

Randomly assigned colors aren't filtered, so it is possible for dark cells to exist that are the same color as the background.

Notes

The code is a modified version of nLife. The released version of nLife is pre-HTML5 and done using DIVs. This modified version uses the canvas tag and gets much better performance with larger boards.

Browser Support

This has been tested in Chrome and Firefox. Other browsers may work, but IE probably won't.