Using Dynamic Image Resolution without Dynamic Content Scaling

So I have an iOS and Android app. It is designed to handle the layout of different resolutions and expects the display.contentWidth and display.contentHeight to be the physical screen size dimensions.

However, I also want to use Dynamic Image Resolution to load different images depending upon the screen size of the device. So high-res Android devices get high-res images, the iPad gets high-res images, etc.

In order to use Dynamic Image Resolution, it seems that you must set the width and height properties in the config.lua file. However, this causes the Dynamic Content Scaling feature to activate in Corona. Even with "scale=none" the display.contentWidth and display.contentHeight now return the width and height values in config.lua rather than returning the physical screen size.

Isn't there any way to use Dynamic Image Resolution without also turning on Dynamic Content Scaling? For Android devices especially, Dynamic Content Scaling just isn't a very good idea. I want to use the whole screen and not have letterbox bars or any distortion from the zoomStretch.

Or maybe somebody can give me advice on how they are developing apps that can handle all of the different iOS and Android resolutions and aspect ratios in the best way.

@MPotter i have the same question letterbox causes black and unused margins to my game

ok

If you want to hide the bars while using letterbox the easiest way is by using an extended background image.

Peach :)

PS - Don't post that again mhantash, it was relevant in this thread but the other 3 copy/paste posts haven't been and only serve to create clutter.

thank you @peach but sorry for that but i am looking for how can i use the top of screen and the bottom of it not just fill it in non usable area ?? i am using it to show buttons and the top bar to show player information with some help icons how can i use that area without leaving bleeding area just style ??? i appreciate your answer and need code sample if you can to help me ..

thank you again @peach
with respect

Well if your app is for Android it would be very difficult due to fragmentation - because of scaling. You could try scale = "zoomStretch" - I linked to all zoom options in your other thread.

Peach

thanks @peach yes its android app and my objects when setting scale = "zoomStretch"
it becomes fat all resources will be stretched can i prevent some resource from being stretched ??

thanks in advance

What I'm doing to support all resolutions is to place the main group doing that:

group.x = display.screenOriginX
group.y = display.screenOriginY

And if you want to know the screen dimensions (scaled, but will vary depending on the screen proportions), you can do that:

display.screenWidth = display.contentWidth-(display.screenOriginX*2)
display.screenHeight = display.contentHeight-(display.screenOriginY*2)

@emi thank you but what type of scaling you are use ??

i want all my resources shown as it is not scaled up or down i mean i will design more than 3 copies of all my resource and choose the image depending on scaling factor of that device that defined in (config.lua ) file so each device will take its own image without zooming or stretching or crop the image so its appear in its size

I always use the letterbox scaling mode.

what about android mobiles and black borders and how can i use the top and bottom of screen to put my game controls ???
when letter box user then all the content off the screen can't used in useful way

views:1495 update:2011/12/1 20:56:45
corona forums © 2003-2011