Here’s a study in sprite animations that [Travis Goodspeed] put together. He’s working with one of his favorites, the pink IM-ME device that he’s been hacking on for a while now. But if you don’t have this hardware that shouldn’t discourage you. There’s a lot to be learned from his methods which will translate to any microcontroller working with a graphic LCD.
He starts with a 24-bit PNM sprite that includes three frames of his desired animation. From there he needs a way to store the data for use with 8-bit microcontrollers. He chose to write a Perl script that will translate the image format into a 1-bit map. Each frame of the animation takes up a column width that is a multiple of 8 for easy retrieval by the processor. This translation into a C array, and the accompanying code that translates it into data for the frame buffer is the key to the animation process. What is he shooting for? A sprite-based video game on the handheld.
7 thoughts on “IM-ME Graphic Manipulation Using Sprites”
umm… where’s the link to the actual article of Travis?
Here you go.
haha it’s missing, but I found it on his blog.
Grrr…. sorry about that. Fixed.
Doesn’t Gimp write out a byte array like this if you tell it to save an indexed image as a .h file?
Oh now that the article is there I see that the Perl script generates packed arrays, which the Gimp does not do afaik.
Using a Bus Pirate, you can sniff the SPI traffic to the LCD and grab the images back out.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)