Writing a game / graphics library
Posted: Thu Feb 26, 2015 12:01 pm
Cut to the good bit, https://www.youtube.com/watch?v=LUY6FEgzcLw
Ok, so all written by me in C. I have a nice library for the LCD that handles all the graphics including things like lines, triangles, boxes and "sprites". I made a little tilemap engine and drew each tile as a sprite. This renders quite quickly as I simply point the hardware SPI buffer at the location of the sprite in memory. Not the most memory friendly approach as each sprite/tile is 32x32x16 making them 2k each! The advantage is that they are RGB565 full colour and render incredibly quickly with hardware SPI.
I am looking at the LCD datasheet to see if I can achieve pixel scrolling (I think it's easy in one axis, not sure about the other). I could do pixel scrolling in my code but that would be a lot slower than letting the LCD do it (a full screen refresh for each pixel).
LCD is again the ili9341 controller, and I am using the touch input on GPIO again. I was just thinking about abusing a touch controller chip to fit an analog joystick onto it
Ok, so all written by me in C. I have a nice library for the LCD that handles all the graphics including things like lines, triangles, boxes and "sprites". I made a little tilemap engine and drew each tile as a sprite. This renders quite quickly as I simply point the hardware SPI buffer at the location of the sprite in memory. Not the most memory friendly approach as each sprite/tile is 32x32x16 making them 2k each! The advantage is that they are RGB565 full colour and render incredibly quickly with hardware SPI.
I am looking at the LCD datasheet to see if I can achieve pixel scrolling (I think it's easy in one axis, not sure about the other). I could do pixel scrolling in my code but that would be a lot slower than letting the LCD do it (a full screen refresh for each pixel).
LCD is again the ili9341 controller, and I am using the touch input on GPIO again. I was just thinking about abusing a touch controller chip to fit an analog joystick onto it