[Duality] just finished programming Conway’s Game of Life on a character LCD. The game is a great programming exercise that everyone should undertake at one point or another. It uses a very simple set of rules to evolve the playing area from a given starting state. In this case the game grid is only 64 pixels, one for each of the positions on this 16×2 character LCD screen. This makes for very quick games as the cells tend to quickly reach an equilibrium as they arrive at the outer borders. See for yourself in the clip after the break.
We could have sworn we’ve seen this before, but with four times the playing space thanks to some custom characters. We couldn’t find an example of that, but the idea is to use a larger grid (something more like what’s seen on this graphic LCD) by generating a set of custom characters that slices each 5×8 pixel character into four smaller discrete areas. Something along the lines of what is being done with this spectrum analyzer.
There’s actually another way. Divide a 5×8 character field in three parts (upper – middle – lower), then fill the custom characters which all the combinations of these parts on/off possible. Character 0 is all off, character 1 is top black, character 2 is middle black, character 3 is top and middle black – you get the point. Now, with the right control routines you have a 16×12 display instead of a 16×4! (Ok, with a somewhat weird aspect ratio.)
Custom characters can give you a 20×14 image, but it’s kinda small on a 16×4 display… it works fine on a 8×2 display, though: I’ve been playing with some effects for it some time ago: http://www.youtube.com/watch?v=b0oe6PJz8Qs
Ah, found a great example (and all-in-all awesome demo) by Hedelmae:
http://www.youtube.com/watch?v=4wjj0Xcu2F8
yea I thought about that,
but I wanted to learn how to do this first,
this on its own was quite a challenge for me :)
I decided to give it a try. Here’s my 20×4 character LCD playing Life with a 20×8 grid:
http://jumptuck.com/2012/05/26/life-character-lcd/
Nice program, but you might want to work on those soldering skills a little bit. Dang…..
You should use a female pin header since you can just plug the cables in it. You might also try the glider configuration, should work nicely on your torus.
That looks a little wider than a 16×2 character LCD…
it actually is a 20×4 says so on the project page:http://tkkrlab.nl/wiki/Game_of_Lifeish,_on_a_lcd