The most efficient way to handle graphics: sprites vs draw()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TrinityReverse
:warning: Old Version Published before Godot 3 was released.

Hello everyone, I’m looking for some advice on how to handle graphics. The game I’m working on is a 2D top-down shooter for mobile, with minimalistic and geometric style similar to 140 (Carlsen Games).

Here are some doubts I have:

  • Many sprites will need to be spawned together: is it better to use the draw() function instead of sprite nodes? Using sprites seems much easier, but I’m concerned for possibile lags.
  • Is there a recommended size for character sprites in mobile games?

for using many sprites vs _draw, it’s no difference in my test.

volzhs | 2017-03-08 13:07

:bust_in_silhouette: Reply From: eons

I could suggest you to try to do it first, if you do a good scene structure, should be easy to replace the problematic parts.

On mobile, the first problem you can get may be related to overlap/collision detection but that can be reduced by visibility enablers or techniques like the shower of bullets demo.

Look, this is the platformer demo on my horrible smartphone, still playable on this state (remember all these are animated rigid bodies):

Of course texture size can affect the performance but that is easilly solved by scaling down, you won’t need 4k textures for a 32x32 sprite zoomed 0.5x on a small screen.


And better open another post for the rest of the questions not related to the title.

Thank you for your answer! I created another post for the other questions as you suggested.

TrinityReverse | 2017-03-09 09:11