Possible Big Performance gain. Ansca please confirm

I was chatting with Andreas from Texture Packer. In his awesome tool there are options for saving the spritesheets in different format.

Graphics for iphone come into flavors 32 bit and 16 bit. The formats for 32 Bit are RGBA8888 and BRGA8888 the formats for 16 bits are RGBA4444, RGBA 5555, 5551 and 565.

Currently using the 16 bits formats saves lots of space when loading the app at some suffering of quality with Texture Packer is very good at minimizing.

When it comes to Texture Memory though, it seems that the Iphone uses for png files 32 bit. This means that even if the files where saved in Texture Packer using any of the 16 bit formats they are then converted to a 32 bit when used by the iPhone.

If I understand this correctly, this means that we are using twice the texture memory as needed if we were to have our files in 16 bit format. The iphone is capable of using 16 bit files natively using the pvr extension.

Assuming that I understood Andreas correctly and that I have interpreted everything correctly, wouldn’t there be a huge gain in allowing Corona to set the graphics for the spritesheets to 16 Bit pvr format?

Please feel free to comment. [import]uid: 8192 topic_id: 4206 reply_id: 304206[/import]

+1 ! [import]uid: 7356 topic_id: 4206 reply_id: 13482[/import]

@Magenda. Can we use spritegrabber for dynamic scaling with this new release?

I was looking at this, might be able to deduce the device.

http://developer.anscamobile.com/reference/index/displayviewablecontentheight [import]uid: 8192 topic_id: 4206 reply_id: 13536[/import]

@amigoni

No and yes…

*Dynamic* scaling is not currently supported (by SDK) for sprites (it has nothing to do with spritegrabber). It is only available for images.

But you can now use manual device detection and load the proper spritesheet depending on the device’s resolution.

For example, you can save your images in HD and tell TexturePacker to generate two spritesheets: High Res and Low Res. Then, in your code, before calling spritegrabber, you can call display.contentScaleX (the ratio between content pixel and screen pixel width) to detect the device and accordingly tell spritegrabber which spritesheet to use. Have not tried it yet, but there was at least one thread today that confirmed that this works (on device only though).

[import]uid: 7356 topic_id: 4206 reply_id: 13565[/import]