Fork me on GitHub

Project Notes

#302 TheMatrix/GameOfLife

A simple implementation of Conway’s Game of Life on the Boldport Club Matrix.

Here’s a quick video showing it in action..



This is a quick and dirty implementation of Conway’s Game of Life on the Boldport Matrix, mainly to learn a bit more about using the AS1130 LED driver.

I’m using a Boldport Cuttle as the controller (Arduino compatible).

Game Play

I’m using the classic rules and a random seed:

  • Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any live cell with more than three live neighbours dies, as if by overpopulation.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

If all cells die, the game automatically restarts.

If the game reaches a still life or oscillating endpoint, it will just carry on and needs a reboot to restart!


GameOfLife.ino uses the AS1130Picture24x5 class from the LRAS1130 library to represent to frames: the current “tick” (round) of the game, and the next one.

Processing a game round evaluates the cells in the current AS1130Picture24x5 page, and writes the next stage of life to the next AS1130Picture24x5 page. The AS1130 driver is asked to switch pages on the Matrix display and then the process repeats.

It is a pretty naïve implementation of the game, and certainly not optimised. It spends a lot of time reading pixels from a AS1130Picture24x5 page, and each time that involves decoding the “virtual” LED/cell address into the page address.

But as it is, it runs perfectly fast enough - I even needed a delay between each game round to keep things at human speed!





Credits and References

About LEAP#302 BoldportLEDAS1130
Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is my personal collection of electronics projects, usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting (IMHO!).

The projects are usually inspired by things found wild on the net, or ideas from the sources such as:

Feel free to borrow liberally, and if you spot any issues do let me know. See the individual projects for credits where due. There are even now a few projects contributed by others - send your own over in a pull request if you would also like to add to this collection.