Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / T2: Sprite Sheet Animation Image Size

Author
Message
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 5th Mar 2012 21:12
I have a sprite sheet animation that will show up white if it is a certain size but if I cut the size in half it shows up fine. The size that doesn't work is 1680X240. I have it working fine at 840x120. Is there some sort of limit on the size of the sprite sheet?
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 5th Mar 2012 21:41 Edited at: 5th Mar 2012 21:49
By convention it's prefered to use "power of 2" textures size (like 2/4/8/16/32/64/128/256/512/1024/2048/... (squared or not) for each size to be correctly understood by almost all devices... in the other case AppGameKit will extend it to the next power of 2 if it's not (so you will lost some memory).

At the same time, some devices have a maximum textures size of 1024 ...
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 5th Mar 2012 22:52
Okay thanks, Just tested it out and yeah it caps me at 1024. Anything past that turns into a white image.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 5th Mar 2012 22:54
on what platform are you testing windows or mobile?
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 5th Mar 2012 23:01
Windows right now.

One more quick question. I have three characters one big one small and one normal. Should I make them all the same image size and size them down? Or make the smaller ones image smaller to take up less memory? Or does it really not matter =/
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 6th Mar 2012 04:50
Are your 3 characters differents ?


If they are differents, it does matter. Make your images smaller when you can (you're right on memory management) with an editing image tool (Paint.NET, Photoshop or Gimp to have a better quality downsized image). Otherwise on mobile devices, you will quickly be faced to some memory problems.

If they are identical but want to use them at different sizes, so you can downscale sprites in your code (3 sprites from only one image loaded in memory).
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 6th Mar 2012 19:30
Yeah there all different. I will play with the sizes and see how bad the performance is.

Login to post a reply

Server time is: 2024-11-23 05:15:09
Your offset time is: 2024-11-23 05:15:09