Hi,
I'm looking for the best practices for textures and animations.
I would like my characters to be displayed at the highest resolution for the last ipad retina.
Each character should take around 30%/40% of the screen's height.
However, I end up with very big textures for each one of my animations.
What would be your advice to optimize the use of textures?
1. Should I limit my spritesheets to 2048x2048 and separate animations per spritesheet? (1 animation = 1 spritesheet)
Is 2048 even too much?
2. Or should I, instead, load more animations per sprite sheets and work with smaller texture files if possible?
-Tradeoff -> will have to lower the resolution of my character sprite.
How do you deal with those situations?
What's the common way to deal with it?
Thank you!
Comments
Maximum texture size for iPad 1/iPad 2 is 2048x2048 and for iPad 3 4096x4096. If you're using automatic image resolution, you can use 2048x2048 textures for iPad 1/iPad 2 and 4096x4096 for iPad 3.
I don't know your currents settings but let me give an example. Assume that:
1. Your logical dimensions are 768x1024, enabled a scale mode other than "No Scale" and enabled retina display for iPad 3.
2. Your image scale settings are "@2x" -> 2.0
Here you can have texture.png with size 2048x2048 and texture@2x.png with size 4096x4096. Because image@2x.png will only load when your device resolution is about (748x1024)*2 (e.g. iPad 3).
On the other hand, I wouldn't use lower resolution character sprites (especially in your case )
Also you can always divide your texture atlases into separate textures because if you don't have a lot of textures, performance decrease will be (really) small.
Hope this helps,
Likes: Mells
First of all, I wanted to thank you for the great support on the forums.
And now about my question, I understand that I need to take advantage of the auto detection of the device resolution.
I'd like to know, here under is an example of one of my animations
Imagine this is a 4096x4096 image
x Number of animations (10 per character) (Attack, stance, dash, die, win, counter, etc..)
x Number of characters
Seems to be a lot, but I have no idea about what devices are able to handle.
Should I change my strategy or does it look "ok" to you?
Here iPad 1 can be problematic (because of low memory). I don't know the percentage of iPad 1s but you may decide to target iPad 2 or newer: http://stackoverflow.com/questions/7235979/how-do-i-target-an-app-to-work-on-ipad-2-or-newer-not-ipad-1-before-submission So that you won't get 1 star from iPad 1 users
And last if possible, when images are loaded at startup (launching Gideros player image.jpg is uploading.) are they counted in the used memory or only when I create a Bitmap/Sprite?
Is there any performce difference between dynamic creation of texture atlases and pre-packed texture atlasses?
And will the performce be much better by using texture atlasses than create a texture for each image?
And if the size of each image is of pow of 2,is the performce boost still exist?
https://sites.google.com/site/xraystudiogame
Using texture atlases improves the performance because on OpenGL rebinding different textures many times can effect the performance.
If you use 2^n images, rendering performance doesn't change. But loading time can increase or decrease.
I get it.
Then I guess you render all the textures in one batch call for both case, just as the batch node in cocos2d do,is that true?
https://sites.google.com/site/xraystudiogame
For batch node,it is said that if put sprites in a batch node ,they will be drawed in one call,otherwise,each one require a draw call.
https://sites.google.com/site/xraystudiogame
http://stackoverflow.com/questions/10861550/how-do-i-properly-use-ccspriteframecache-and-ccspritebatchnode
Is that trick also used in gideros internally?
https://sites.google.com/site/xraystudiogame
It would be better gideros use it automatically,the user may even not notice this change.
Cocos2d is good but too many concepts.
https://sites.google.com/site/xraystudiogame
@Atilim - does this mean that currently there isn't that much of a performance increase to be gained from using a single texture atlas if you not batching the rendering?
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill