Are there size limits for @2x & non @2x images?

Monkey Targets Forums/iOS/Are there size limits for @2x & non @2x images?

benmc(Posted 2012) [#1]
Does anyone know if the the atlas images for GrabImage can be much larger for the @2x images?

For example, I have the image gameatlas.png and it is 1024x1024 for loading sprites, options screens, etc. I can easily load 3 or 4 atlas images about this size for an iPhone game. (say they are around 70Kb to 120kb per image)

When I create gameatlas@..., can it be 2048x2048 without causing any real problems - and the sizes more in the range of 300kb to 500kb?

I assume that the iPad can load a much larger atlas image file into memory than, say, an iPhone could, but I don't have an iPad to test, so I would hate to release a game and have it crash on iPad because my atlas images are too huge.


JIM(Posted 2012) [#2]
Nothing is safe above 2048x2048. I'd say you stick to that as your max. Some devices may support textures above that, but it's not a "safe" option.

As an added extra, in case at some point you want to convert that to PVR, 2048x2048 is the max PVR supports.


John McCubbin(Posted 2012) [#3]
Just remember internally a 1024x1024 32 bit image will be using 4 meg of video ram, 2048x2048 will be using 16 meg.

I am not sure of the limitations imposed by iOS but its worth remembering.


benmc(Posted 2012) [#4]
Is there any way to look-up how much video ram each iPhone/iPod has? And Android too actually.

So this basically means that each 960x640 background image is going to have to be its own 1024x1024 atlas. Wow, creating a universal app isn't really as cut and dry as putting an @2x after the image is it :(


JIM(Posted 2012) [#5]
As far as I know, RAM and VRAM are shared in both iOS and Android devices. (Tegra GPUs might be an exception, but I'm not sure)

For lower end devices, RAM is very limited (for example 3G has about 30MB free for apps, and same goes for low-end Androids like Wildfire)

One big problem with images is that you basically have it in RAM twice (once in RAM, and once in VRAM). So 16MB for 2048x2048... twice, that means 32MB.

1 image like that and you can safely cross all low-end devices off the list :)

Monkey needs support for compressed textures in order to get better use of memory. A PVR (or ETC for Android) version should be 2MB instead of 16, and have a better layout in memory (for fast fetches).

You could probably get away with keeping a few images in the low res version. (Like blurred backgrounds for example)


benmc(Posted 2012) [#6]
What are other people doing to support iPad, and the new iPad? Are they putting backgrounds in their own images?

From what I'm reading, the screens are getting bigger and running at higher definitions, but if we can't load images large enough to take advantage of that in a game, what's the point?

For an iPad,iPad2,and New iPad, do they not have plenty of memory to support a giant gameatlas?

If, in my game, I check to make sure that it's one of these 3 devices, then I would think that I could then load the @2x 2048x2048 images, and if not, then it's going to be blurry ... sorry Android Tablets (again) :)