Looking For Tutorial/help On Working With Different Resolutions

I am at a loss for the perfect solution, so maybe nothing exists.

What’s throwing me off is settings the config file content width/height vs the size of the display.newImageRect().

Should I set the config to 320x480 and scale everything up? Use high resolution @2x and @4x versions of all files for higher res?

Should I set the config to 640x960 and scale everything down/up for iphone5?

Should I set config to 640x1136 and scale everything down?

I guess i’m confused as to base resolution to use. The whole ‘display.viewablecontentheight’ is throwing me off since it just uses whats in in the config file as the height…not the ACTUAL viewable content depending on the device…

Hi @sean84,
I’d say that it’s mostly a personal preference. You can start at 320 x 480 and scale up, or start at 640 x 960 and scale both up and down. From Corona’s standpoint, it all works out the same under the hood. The only caveat is that if you start at a middle range like 640 x 960 and position a display object at an odd-number position like 351, the position scaling down would be like 175.5, which is not ideal (non-integer positioning can cause issues in some cases).

Basically it’s up to you, whichever you feel comfortable working with. A tutorial which might help you is this:
http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

Regards,
Brent

Thanks for the help, but now I have an issue where what is shown in the simulator doesn’t work on xcode/device.

Everything works except when I switch xcode/device to iphone5. On the simulator everything is correct, and fills the screen, but on xcode/dveice i get black bars on the top and bottom which I wouldn’t expect at all…so something is wonky. Is there a limfac i’m not aware of?

Hi Sean,

Yes, this is a common question: you just need to include a “tall” launch image in your project directory per Apple’s specifications. I believe this will be required by Apple before May 1, as it triggers the “tall” mode on iPhone5.

See here: the details under “Launch Images”:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

Oh my god thank you :slight_smile:

FIXED :slight_smile: I swear there are so many tiny tweaks that need to be ‘stickies’ :slight_smile:

Thanks for the quick response.!

Hi @sean84,
I’d say that it’s mostly a personal preference. You can start at 320 x 480 and scale up, or start at 640 x 960 and scale both up and down. From Corona’s standpoint, it all works out the same under the hood. The only caveat is that if you start at a middle range like 640 x 960 and position a display object at an odd-number position like 351, the position scaling down would be like 175.5, which is not ideal (non-integer positioning can cause issues in some cases).

Basically it’s up to you, whichever you feel comfortable working with. A tutorial which might help you is this:
http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

Regards,
Brent

Thanks for the help, but now I have an issue where what is shown in the simulator doesn’t work on xcode/device.

Everything works except when I switch xcode/device to iphone5. On the simulator everything is correct, and fills the screen, but on xcode/dveice i get black bars on the top and bottom which I wouldn’t expect at all…so something is wonky. Is there a limfac i’m not aware of?

Hi Sean,

Yes, this is a common question: you just need to include a “tall” launch image in your project directory per Apple’s specifications. I believe this will be required by Apple before May 1, as it triggers the “tall” mode on iPhone5.

See here: the details under “Launch Images”:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

Oh my god thank you :slight_smile:

FIXED :slight_smile: I swear there are so many tiny tweaks that need to be ‘stickies’ :slight_smile:

Thanks for the quick response.!