# Game of life – dlow ticker

## Introduction

In 1970, John Conway found The Game of Life, a type of cellular automaton that could replicate itself. It is played on a theoretically infinite, two-dimensional square grid where each cell is either ‘alive’ or ‘dead’. Given a initial pattern of living and dead cells, the next generation can be computed based on a set of rules.

What is shown above is generated by an initial pattern and following the standard rules of the game. By zooming in on this image, one can see that the moving dots are actually made up of smaller cells.

Most patterns will die off, but there are some patterns and structures that will survive, oscillate, or remain unchanged. One such pattern is the glider, which makes up the moving dots seen above.

## My journey

It all started with this video: (aside: great epic background music)

Inspired by the scrolling word @3:58 and my course requirement to create a game of life viewer in Java, I did some research and decided to make a scroller (aka ticker).

This page explains succinctly how the above pattern works. Basically the letters can be decomposed to 6 rows of bit patterns. The diagonal structure at the right side is a memory loop; it stores the bit pattern of each row. There is a ‘reflector’ and ‘duplicator’ to retain the pattern as well as to generate the horizontal bits. On the left is an ‘eater’; it kills the moving bit when they reach it.

It turned out to be not as easy as I expected it to be. It took me about 2 hours just to get everything right.  First I had to make the bit pattern, that was quite straight forward. Then I had to find the position of the bits in the memory loop. Finally I had to design the pattern by adding and removing bits from the memory loop. In my first attempt, I had the direction wrong and made a mirror image of the pattern I wanted. Since I got the length wrong as well, I decided to restart. Getting the length right and keeping the bits synchronised was the most tricky part. After much effort, I finally got the game to work the way I wanted.

The next part was making a gif out of it. I wrote a Java program to generate the gif but the file it created was very big – 10mb for a total of 2240 frames (that’s the period of my pattern). So I had to improvise and skip a few generations per frame, the difference is indistinguishable at the size of normal images. Upon zooming in, one realises the bits (gliders) are just translating, that’s because  the transition is skipped. It was a compromise, and I managed to reduce the size down to <1mb.

## I want to make something like this!

If what you see above interests you and want to make one. Read the following articles.

## Future enhancement

A possible extension to this is to write a program that will generate the pattern automatically. So one can input a string and get the pattern as the output.

Hmmmmm.