As were many people, I was saddened to hear about the passing of John Conway. This seemed like the perfect time to finally do something with a TTGO T-Display dev board that has been sitting in my parts box. This board has an ESP32, 135x240 LCD and a couple buttons.
The coding is a pretty straightforward implementation of the game, though I added a few things to take advantage of the hardware:
- Button 1 switches between full auto and single-step operation.
- Button 2 cycles through 3 resolutions: 135x240, 45x80, and 27x48.
- Rather then just black and white, I added color coding to indicate cells that just transitioned to alive (green) or dead (red).
Thanks, Mike. I also thought about tracking how long a cell has been alive or dead and doing color gradients, but got lazy ;) I look forward to seeing what you come up with.
I also got lazy. I figure it's a matter of assigning a value to each cell and decrementing it with each evolution. It would stop decrementing at 1 as 0 would be the special case for death which requires rule validation. Then the value of each cell can be the lookup table of colors. Someday I'll do the implementation :-D
Very cool color version. I've been testing Bodmer TFT library examples and I found this monochrome version:
https://twitter.com/martinfasani/status/1253177037738651648