Page 1 of 1

Writing a game / graphics library

Posted: Thu Feb 26, 2015 12:01 pm
by Pyrofer
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 :)

Re: Writing a game / graphics library

Posted: Thu Feb 26, 2015 1:38 pm
by Greenwire-Elektronik
Nice work!
Do you want to explain the basics to use a display as a graphical output?

Re: Writing a game / graphics library

Posted: Thu Feb 26, 2015 1:40 pm
by Vonger
I watch your youtube video, very good! Looking forward for the library :) want to have a try

Re: Writing a game / graphics library

Posted: Sat Jun 20, 2015 2:12 am
by brad
This is great, did the code ever get made public?
Many uses for this in a big way.