should I have 2 files/images for the same app ?

Hi

i see some tutorials developpers using 2 images of a same object , i mean there’s image with double size

of the other and they coding in config.lua like that :

imageSuffix =
{
["@2x"] = 2,
}
i understood that there’s an issue of resolution betwean devices

so, if im making a game for Iphone should i use this syntax above , or now this issue is resolved?

thank you [import]uid: 100339 topic_id: 32438 reply_id: 332438[/import]

This post explains it better -

http://developer.coronalabs.com/forum/2012/03/12/understanding-letterbox-scalling

But yes you should have 2 images (at least) for every image. If your targeting iPad as well then 3 images, as the iPad retina is 4x the size of original iPhone.

Dave [import]uid: 117617 topic_id: 32438 reply_id: 129043[/import]

@maqajma, to answer that question you have to ask yourself how important is performance on iPhone 3Gs’s and original iPads to you?

Here’s the deal. Lets say you build your graphics to be for 640 px wide devices and let them scale up a bit for iPads. Your backgrounds are likely going to be 640x1136 if you plan to support the iPhone 5. OpenGL rounds those dimensions up to the next power of two. So that 640x1136 pixel background is going to take a 2048x2048 block of texture memory (2048x2048*4 bytes per pixel) or 16MB of memory.

See http://developer.coronalabs.com/forum/2011/02/25/android-233 as a reference.

That image at 320x568 is going to take up 1024x1024x4 bytes of memory, or 4MB.

The 3Gs and the iPad 1 have 256MB of memory. It doesn’t take many graphics to chew up your memory. The iPad 2 and later, as well as the iPhone 4 have 512M or more, so they can handle the larger graphics.

And that’s just memory. If you also look at CPU power, those larger graphics have to be down-sampled to draw on the lower resolution screens as opposed to a graphic sized natively. That’s horsepower that could go into calculations for other things. If you start with 640px based graphics (or 768px) and don’t care about the older devices then you will be fine. You will save a little space in your app bundle. If you care, use the right sized graphics. [import]uid: 19626 topic_id: 32438 reply_id: 129076[/import]

This post explains it better -

http://developer.coronalabs.com/forum/2012/03/12/understanding-letterbox-scalling

But yes you should have 2 images (at least) for every image. If your targeting iPad as well then 3 images, as the iPad retina is 4x the size of original iPhone.

Dave [import]uid: 117617 topic_id: 32438 reply_id: 129043[/import]

@maqajma, to answer that question you have to ask yourself how important is performance on iPhone 3Gs’s and original iPads to you?

Here’s the deal. Lets say you build your graphics to be for 640 px wide devices and let them scale up a bit for iPads. Your backgrounds are likely going to be 640x1136 if you plan to support the iPhone 5. OpenGL rounds those dimensions up to the next power of two. So that 640x1136 pixel background is going to take a 2048x2048 block of texture memory (2048x2048*4 bytes per pixel) or 16MB of memory.

See http://developer.coronalabs.com/forum/2011/02/25/android-233 as a reference.

That image at 320x568 is going to take up 1024x1024x4 bytes of memory, or 4MB.

The 3Gs and the iPad 1 have 256MB of memory. It doesn’t take many graphics to chew up your memory. The iPad 2 and later, as well as the iPhone 4 have 512M or more, so they can handle the larger graphics.

And that’s just memory. If you also look at CPU power, those larger graphics have to be down-sampled to draw on the lower resolution screens as opposed to a graphic sized natively. That’s horsepower that could go into calculations for other things. If you start with 640px based graphics (or 768px) and don’t care about the older devices then you will be fine. You will save a little space in your app bundle. If you care, use the right sized graphics. [import]uid: 19626 topic_id: 32438 reply_id: 129076[/import]