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

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 just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - 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
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.