Hello,
I have a small program that displays sprites in order to know the performance of the plot, and it’s quite surprising because the speed is more or less the same whether I display sprites of 32x32 pixels, sprites of 128x128 pixels or 512x512 pixel sprites.
The speed is still around 2000 sprites at 60 fps!
I have the idea that solar2D does a lot of obscure stuff that ends up simply limiting the speed of the plotting.
Say otherwise the bottleneck is not in the graphics card but in the engine of Solar2D.
If you are testing on a computer with a dedicated GPU, then you are very unlikely to hit any GPU related bottlenecks. Also, if you are creating sprites out of only a few images, then the first time that Solar2D uses the textures, it caches them. Even if you were to create 2000 display objects using the same texture, the texture memory usage won’t go up, but Lua and C memory usage will go up.
While loading a smaller texture may be relatively a lot faster than loading a larger one, the absolute difference may be so negligible when you aren’t loading hundreds or thousands of textures it just doesn’t register.
once you have tested the code, try to use a smaller or a bigger sprite (32x32 pixels or 512x512 pixels), and you should be surprised to see the performance don’t really change !
That probably mean (for me) that the sprite display time is small compared to what Solar2D does before displaying it!
I have tested another game engine using Lua and the result is not the same at all : big sprite are really slower than small ones !