Hi @estiennelornzo,
The # of images itself is not necessarily the concern, but rather the total number of pixels and hence texture memory required (after all, 200 images sized 20x20 pixels would fit relatively easily into a single sprite sheet). And trying to support a wide array of Android devices is always going to lead to frustrations with the capabilities of older devices. That said, keep in mind that because the “power of two” rule will apply, you’re almost always going to wind up wasting texture memory loading a bunch of smaller images individually:
Copied from __http://docs.coronalabs.com/guide/basics/optimization/index.html:
In OpenGL, textures obey the Power of 2 (PoT) rule. This means that any texture rounds up to the next highest Power of 2 (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, etc.) in terms of the texture memory it occupies. Thus, an image sized 320×480 and another sized 280×400 will both consume 512×512 of texture memory. Note that the next highest PoT occurs independently on either the horizontal or vertical, and the effective size does not always adhere to a “square” configuration — thus, an image sized 920×40 will round up to 1024×64 in required texture memory, not 1024×1024.
So I still encourage you to use an image sheet, for the optimization in texture memory usage, as well as for the simplicity in your project folder - ditching 200 image files for a small number of image sheets just makes things easier to manage, in my opinion. And I still recommend TexturePacker - though you may see some improvement by adjusting some output settings (more on that below).
Also, keep in mind that for better performance, you may want to avoid having unnecessary invisible display objects on the stage - since you’ve already loaded your image sheet, you should be able to create new display objects and destroy old ones with no noticeable delay.
Now, as to what your texture memory usage limit should be, that’s hard to say. At a certain point, you may just want to say that your game has certain performance requirements that make older Android devices non-supported. But I understand that’s not ideal. For myself, I try to keep image sheet usage to no more than two 2048x2048 image sheets in memory at any one time (4096 x 4096 for retina/HD screens). And you should keep in mind that Texture Packer does not necessarily limit the size of your output image sheets by default. So double-check the settings and make sure that the maximum size is 2048 x 2048 to ensure that you don’t end up with an image sheet too big for the devices you’re targeting.
All that said, if your game simply requires enough texture memory that there’s going to be a loading delay from time to time, you can always go the route of turning that bug into a feature and coming up with a clever loading scheme that “hides” the load time by employing some sort of transition between environments or scenes where a loading hiccup isn’t as noticeable. And at the very least you can try to be extra strategic about when you load new images into memory or create new display objects so that the hiccups occur at non-mission-critical moments.
In any case, good luck! And if you find a solution that works well for you, please remember to share it here so others can learn from your experience.
Best,
Jason