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..

Build

Notes

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!

Algorithms

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!

Construction

Breadboard

Schematic

Build

Credits and References

About LEAP#302 BoldportLEDAS1130

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

Project Source on GitHub Return to the LEAP Catalog
About LEAP

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.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader