nLife Color

History

In the years before the canvas tag I made a <div> based version of Conway's Life with an integrated editor called nLife. I had been experimenting on making Javascript based games and implementing Conway's Life was a fun little distraction from those projects.

When the canvas tag came around updating nLife to use it seemed essential. I made a big update with some new features. While searching online, I found a large repository online of state files for Life and added support for loading those files. The files made it possible to load in very complicated Life presets which made the new version much more interesting. Unfortunately there was no license and the author of the files never responded to email, so that was never released.

While the nLife app was at the time unique in a world where Javascript applications weren't common, it now is far inferior to some web-based Life apps. The only part possibly worth preserving was a little modification that used nLife's code to add color to Life.

Rules

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. (In retrospect, I wish I had chosen some clear rule, such as highest color-value wins to ensure consistency.)
Randomly assigned colors aren't filtered, so it is possible for dark cells to exist that are the same color as the background. Adding some pattern or pulsing background colors might help those stand out more.