I’m testing my little game on a Samsung Galaxy J3 v2017.
Sometimes the game is no longer in 60fps without me being able to really know which part is slowing down.
There are a lot of tutorials to optimize Lua, but are there tutorials to optimize Solar2D.
Is there an impact to using too many Groups?
Does a sprite not visible (isvisible=false) take time?
Is it better to create objects when you need them or is it better to create them upstream and make them visible if necessary.
Is it really useful to delete graphical objects that are no longer displayed? (actually, I use mapeditor and I create the blocks as they appear, but I never delete them, does it matter)!
I ended up not finding how precisely the “free” CPU time (so the one that includes the Lua scripts and the Solar2D engine), and surprise:
- the touchpad alone consumes a lot of time when it is requested
- moving a group (translation) requires openGL more time to draw than if it does not move!
- The use of masks is very expensive.
On the other hand, huge sprites are not much more expensive than small ones.
I would like to know if you have any suggestions for improvement.
Stuff where you noticed a significant performance boost that I could implement.
Thank you