King’s Conway’s Game of Life Game

 

menugifI developed a game built on top of Conway’s Game of Life using processingjs for processing, which is playable here.

 

Conway’s Game of Life

For those that do not know about Conway’s Game of Life, it is a simple (in terms of the rules) system that has very interesting and complex properties.

The Rules are as follows:

The universe of the Game of Life is an infinite two-dimensional orthogonal grid of squarecells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overcrowding.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations.

There is plenty of information available on the internet about the subject which, I won’t re-write about here. A good place to start is wikipedia and deeper discussion is available at www.conwaylife.com. I thoroughly recommend looking into the subject as it is fascinating.

 

King’s Conway’s Game of Life Game

In the game you control a glider, which within the context of CGoL is a spaceship. Spaceships are a repeating patterns of living cells that move across the grid. In this game the glider is not animated sprites in the traditional sense, the glider is built from living cells and follows the rules for Conway’s Game of Life. When you change direction you actually kill all the green cells and change the state of the correct cells to make a new glider in the correct position and direction.

The aim of the game is to destroy all the living cells (white) that are on the screen, where each level is a different known pattern of living cells from CGoL. The only way you have of killing these cells is dropping a number of living cells behind your glider, and hopefully overpopulating those current living cells.

bombgif

If you place this living cell bomb carefully you can kill small clusters of cells relatively easily. However, there is a risk that you can cause an outbreak of living cells that you will then have to clean up.

This is the effect of a living cell bomb on a pulsar and a lobster.

pulsar

lobster

 

Misplacing a bomb can have a serious affect on the number of living cells on the screen as certain patterns of living cells can expand much further than their original size, some can cause infinite numbers of living cells to be produced.

If you move your glider over living cells, your health is reduced. This makes it harder for the player to place the bomb exactly where they want without risk.

Overall, I’m please with the way the game has turned out, there is also potential to expand it beyond the six levels currently implemented. Perhaps there is something that could be done with a multi-player version.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s