Fast refresh on an 3.5 TFT 480x340 display

Hello everyone.
Excuse my pretty bad English and please read my problem :slight_smile:
This is the first time I write a new topic in my whole life, because this time I really need your help.
First, I'll explain my situation :slight_smile:
I have a project to manage for the 5 following month (a school project), and I decides to create a little video game. So I took a look on the internet for which display choose, and I purchases one from Amazon after severals days of investigation. The display I got is this one : Kuman Ecran Tactile 3.5 Pouces TFT avec Carte SD pour ArduinoIDE Module Mega 2560 avec Fonction Tactile SC3A-1: Informatique
It also allows tactil, but I'm not interested in it.
The possibility to use SD card helped me alot, that's one of the reason why I choosed this display.
But I encounter a problem I don't know how to solve : The slowness of this display.
For a videogame, having 10 FPS would be so nice, but even filling the screen takes more than 1 seconds.
The "optimized librairy" I saw on the internet doesn't even work with me, for some reasons I don't know.
I'm using an arduino MEGA.
This is a true barrier for me and my project, and I would really like to solve it.
I would thank you for studying my problem.
Have a good day,

Which library?
What are you trying to do?
Which Arduino are you using?

I suspect that you have an ILI9486 controller on the Display shield.

You can vertical scroll in hardware (Portrait mode)
Or it looks like horizontal scroll in Landscape.
Which means you can move a background instantaneously but have to be careful with redrawing the foreground.

Anything on a small MCU requires careful design to achieve the best speed.
e.g. only re-drawing the smallest areas that have changed.

You can draw pretty fast with a Uno. SLOW with a Mega2560.
Fairly fast with a Due. Very fast with a Teensy3.x or Teensy4.0


The only libraby I managed to use is MCUFRIEND_kbv.
I'm trying to draw sprites on the display, first the map and then the caracter, to finally be able to animate the caracter, making him moving and moving the map with him (the camera would follow the caracter).
I'm using an arduino mega.

I also think that the display have a ILI9486 controler :slight_smile:

I didn't understand well what you're saying about background and foreground : am I able to redraw the foreground without clearing the foreground ?

The problem is the camera : if I want the camera to follow the player, I'm forced to redraw the map each time the player moves. I saw some very fast refresh on the Internet, like this video ST7789 fast SPI library optimized for 16MHz AVR Arduino - YouTube (with another display and another Arduino), so I think this is possible.
I also saw that a scrolling() function exist, it may be a solution.

What is the problem with the Arduino MEGA ? it has alot of dynamic and flash memory so it looks to be the greatest Arduino for my project, but if this one is the slowest, I don't know exactly what I should do.

Thanks alot for paying attention to my problem and for explaining some basic stuff to me, I really thanks you.

I guess I'll need to use tensy :smiley:

Your display shield was designed for a Uno

If you want a fast display for a MEGA2560 you need to buy a MEGA2560 Shield i.e. with an 18x2 header for pins 22-53

A 320x480 display will take longer than a 240x320 or even the 240x240 from your YouTube video.

You still need to design your video game carefully.


Thanks David, I understand much things than before :slight_smile:

For the management of sprites it is better that these are fully loaded at the beginning of each level of the game, and preferably from an external medium such as a microSD memory for example.

Current libraries are limited to working a screen with all its elements at once. So the refresh rate is limited to a few frames.

You could use much better screens with a graphics processor. An optimized library will not be able to give decent refresh rates, without necessarily modifying it very deeply, withsomething of kind of mathematical trick, so the learning curve will be more pronounced.

Some time ago I ventured with a minigame and although he stayed in the inkwell, I will resume it later. It is designed with a 5 "FT813 display and an F767ZI core; it uses a microSD reader supported with a variant of the SdFat library.

Video game play demo

In this example I used an arduino due and a 5 "FT813 screen from RIverdi. The control library is a modification of the library for gameduino 2

Some sprites