Hackerbox 112: Gamelife | Side Quests

·


Greetings! It’s been over a month since my last post, largely due to a couple back to back trips in March and then a couple weeks of hard studying that I didn’t want to break up with a side quest. Anyways, today’s post is about the March Hackerbox, #112 Gamelife.

Gamelife is a very interesting project relating to Conway’s Game of Life, a cellular automaton that operates on a 2d square grid. The essential goal of the ‘game’ is to simulate cellular objects by placing them in a two-dimensional grid and allowing them to move/grow/shrink based on some simple mathematical algorithms. By following these algorithms, the cells will interact and form unique patterns that can be analyzed to learn how these patterns evolve given different input and starting positions. The rules themselves are simple, but they can get pretty heavy on math theory and that makes for boring reading so we’ll dive right into the project itself:

The project kit came with a basic rpi2040 board, a couple pHAT components that could be attached to it, an SD card and a NES controller that will be important later.

The first part of the project involved compiling a simple arduino simulation of the game of life onto the Pi and outputing the display to a monitor:

These little cells would move in a single direction and not do much, so with a small tweak we were able to randomly draw cells, leading to a much more interactive experience:

As you can see above, the cells interact with each other in interesting ways, forming specific repeating patterns that can be observed and measured to gain insight on cellular interaction as defined by Conway’s Game of Life. There are a handful of other interesting tweaks that can be made to the program to change the starting patterns and behavior of the cells to experiment with how the simulation reacts to different scenarios.

The Next part of the project was quick and easy: we soldered some resistors onto the Pi and slapped on an LED matrix Bonnet/pHAT that could display programs running on the Pi. One of these programs was, you guessed it, Conway’s game of life:

Pretty neat, huh? Cells within cells, interlinked.

As an added bonus, it does text too!:

Next we moved on to the last part of the project, turning the pico pi into a N*ntendo Entertainment System (NES) emulator. which was pretty simple and just kind of a ‘for funsies’ aspect at the end which was pretty cool. I know N*ntendo is known for being litigious to say the least so I’ll tread lightly here:

First we soldered together this neat controller bonnet that allows input to be passed to the rpi.

Next we installed Frank Hoedemakers’ pico-infonesPlus repository, which has some installation instructions as well as the files needed to turn your pico pi into an NES playing machine.

Lastly, we were able to THEORETICALLY play a copy of a somewhat well known Russian puzzle block strategy game:

(disclaimer, I own a copy of this game)

Pretty cool stuff! From simulating cellular interaction via algorithm to making blocks disappear when you line them up, the pico pi really can do it all.

Thanks for reading this post! It has certainly been longer than I would have liked since my last post, but I am happy to report that I have kept chugging along on working toward my CPTS and am about halfway through at this point. I’ve found some difficulty in being consistent with my uploads and documentation, in part due to not knowing how much of the content I can actually share publicly and to a larger degree due to the time it takes to document everything and then format it for a blogpost. I’ll be back hopefully very soon with some more updates on the main front and some cool new hacking techniques I’ve practiced since then.

See ya next time!

¶¶¶¶¶

¶¶¶¶¶

Leave a comment