Opinions on best way to handle resolutions

I have read a lot of conflicting advice on best way to handle multiple resolutions both for Apple devices and Android.

I know that there is the zoom scale method as well as using if(system.getInfo("model") == "iPad") then method to determine the model and have a load of ugly condition statements to work with the changes.

I am using sprites and have optimised everything for the iPad in a vain attempt that everything should scale down correctly.

What approach have you taken around handling sprites,fonts, positioning etc? Leave it to the dynamic positioning or a little more specific?

Hi. I use dynamic content scaling.

However if you want your apps filesize to be smaller you could impement a idea i have to load the correct images based on device (it would mean having a build per device though)

here is the basic idea

1
2
3
4
5
6
7
8
9
10
11
local device = "ipad"
local imageSuffix = ".ipad"
 
if device == "iPhone" then
    imageSuffix = ".iphone"
end
 
--you change the initial constant "device" per build
 
--display images like so to handle it automatically
local image = display.newImage("myImage" .. ImageSuffix .. ".png")

Thanks Danny

I decided with my assets to work to the largest size (in this case iPad) first to keep the quality of the images etc. So i am best creating a spritesheet etc for each rather than expecting dynamic scaling to take care of this?

I have tried where possible to use display.contentWidth and height and percentage offsets to make it scalable.

But with dynamic scaling I wasn't seeing the results I have expecting is that because I have gone the wrong way about it? I have also of course changed the width and height in the config.lua.

Creating a image for each target screen is the way to do it for preserving quality, combined with display.newImageRect

Thanks and that would be where your trick comes in

And as I am using sprite sheets for most of the on screen activity that would be newSpriteSheet as normal and let the sprite sheet confirm the image size based on the scaling of the spritesheet image resizing done separately

i have the same problem i have huge amount of images if i need to support multi-res android devices how many number of images i need to support them ??

Which I thought was the point with device scaling in that you didn't need separate assets. Its fine for Apple but for Android there are over 300 different devices.

thanks @ mygamingproject
what should i do ??? for all devices ?? is it possible to run application with single assets and working for all devices ?

Yes it is by using zoomlevel ans scale for dynamic scaling as explained in http://developer.anscamobile.com/content/configuring-projects

But as Danny suggest you won't get a crisp image which is obviously a problem with HD / Retina handsets such as the iphone 4 series.

This latter point is the one I am struggling with in getting scalability and quality

I would highly recommend anyone reading the following blogs which I failed to pick up on when asking this question:

http://blog.anscamobile.com/2010/11/content-scaling-made-easy/
http://blog.anscamobile.com/2011/01/dynamic-image-resolution-made-easy/

and obtain the excellent TexturePacker to help with your standard and HD stylesheets

http://texturepacker.com/

Having followed the blogs I suggested above I've now sorted fonts and images. The bit I'm struggling with are sprite sheets

With images they remain in proportion when the @2x gets pulled in but for sprite sheets I do a calculation using display.contentScaleX to see if it's less than @2x and then pull in the hi res equivalent. The problem is its massive now when it isn't if I set the dimensions to iPad.

It's only on the sprite sheet. Can ou help please?

views:1856 update:2012/2/10 9:26:24
corona forums © 2003-2011