With Adafruit and other common libraries to display an image, a text or a shape, there's no need to swap between 2 buffers, we just need to call the graphical function to fill the screen with what we want.
So if I want to add an image among others, I don't need to to clear all and display all the previous (memorized) things plus the new desired object.
With Gameduino, I only found the swapping buffer method but all the code becomes very complexe because of it!
For example, a simple algo like "every 5 secondes display a grid of 9 random sprites" becomes boring to code because you need to memorize 10 random values just to display the same 9 sprites during a given time.
So, is there a way to display things without redrawing all??
Screens like the gameduino don't work like the screens you've seen before. They are GPU chips which work at refresh rates close to 60 Hz. The erase-redraw technique that supports the GFX library for example (ILI9341, ILI9488, RA8875, ST7735, etc), does not work.
You should consider that the screen continuously shows the code inside the main loop. Forget about the delay () statement, use millis (), to manipulate the sampling times.
Of course timers are often more judicious than delays but it was not the purpose of my question. I just wanted to be sure there were no other ways than store in memory all the previous data to paint a screen with random sprites or texts. Four variables just to draw 2 random sprites... Imagine you have more than 100! Of course I would use arrays of structures instead but it's what I expected because of the refresh system of the screen. Thanks to confirm my doubts!
On "Adafruit" screens there would not need to memorize data like that and the code would be really lighter and simple for a such example, but of course there's no comparison with the speed to animate a game, but they still are interesting screens for static games. However, with some tips, I made games with animated sprites on background on that screens despite of the very limited memory of the UNO and the impossibility to refresh the screen:
You might also want to explore the use of the APPEND command to efficiently render static and dynamic screen segments. The idea is to write the static parts of a screen to RAM_DL, but without actually displaying them. You then copy the display lists to RAM. After that, you can add any of them to the current display list using a single APPEND command, after which you can add the dynamic parts of the display and do a SWAP.
Yes, why not, thanks for the idea Later I'll do a special version of the library so that I can add/remove/modify graphic objects (texte, bitmap etc.) at any time from a chained list. I'd like to code like I was used with ActionScript 3.0 and the DisplayObjectContainer...