Mikedowney.co.uk
What's New
Site Map

Diary
Astronomy
Bits N Bobs
Computing
Food And Drink
Links
Photography
Welcome


Recipe Collections
Recipe A Week 2013
Recipe A Week 2010
A-Z of Regional Cakes
Alphabet of Nations

Game of Life

Story location: Home / computing /
15/Jun/2013

Here is the ImageJ version of the classic Game of Life which I wrote in an evening, several years ago. I have made a small change since then so the 'Reset' button clears the window and the 'Random' button fills the window with random dots.

Game of Life running in ImageJ

The ImageJ drawing tools can be used to fill in pixels. Clicking on 'Start' will begin the animation. Pixels which have remained unchanged slowly fade to grey while pixels which 'came alive' are in white.

To Install

Download the source code and load into ImageJ or Fiji. Select 'Compile and Run' to start.

The program was cobbled together fairly quickly and ideally would need a bit more work to make it more user-friendly. Any configuration is done by editing the source code and recompiling. The speed of the animation can be changed by altering the value of 'pause' (value in milliseconds). The size of the world is given by the 'width' and 'height' variables. If these are changed then the image window may need to be resized by changing the default magnification in the setMagnification() command.