A simple implementation of Conway's Game of Life on the Boldport Club Matrix.
Here's a quick video showing it in action..
I'm using a Boldport Cuttle as the controller (Arduino compatible).
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!
Processing a game round evaluates the cells in the current
and writes the next stage of life to the next
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!