Target iPad resolution and screen shape but scale down for iPhone?

I have a game that I've created that primarily targets (and utilises the screen shape and resolution) of the iPad, but that I wish to offer as an iPhone application also. I'm aware that the pre-4 iPhone resolution is lower (as well as being a different ratio, on all iPhones) - so how do configure Corona to use lower resolution images for these iPhones?

The usual examples provided, with using the @2x in the image name, are for the opposite scenario to the above - scaling up, rather than down. As I said, I need to target the 1024 x 768 resolution (and have no black bars) on the iPad and then support the lower resolution as necessary (and have letterbox black bars) on the iPhone.

Here is what I currently have in my config file:

content =
{
width = 768,
height = 1024,
scale = "letterbox",
fps = 60
},
imageSuffix =
{
[""] = 0.5,
["@2"] = 1,
},

This doesn't work, but hopefully you can see what I'm trying to achieve.

I would imagine this sort of requirement would be a common one?

Thanks,

Bryn

for images, if you use newImageRect and the scale letterbox, it should pretty much work without the whole suffix thing. I have experienced that corona pretty much "downscales" images very well. text may need to be tested in retina vs non-retina devices but i have had no issues developing for ipad and viewing the same app correctly on iphone. Internally this approach may use more memory on older iOS devices, but something that needs to be decided on your specific apps memory requirements and cleanup.

Thanks for the reply altafr. I hear what you're saying - indeed, if I exclude older iOS devices (pre-iPhone 4) then I already get the expected results (letterbox on an iPhone 4).

It is exactly your last statement that I'm trying to avoid really, the memory issue - how can we get Corona to load lower resolution images when faced with these older iOS devices? The inverse of the myimage.png and myimage@2x.png logic if you will.

views:1412 update:2011/10/25 9:10:48
corona forums © 2003-2011