Hi all!
Random question when it comes to Universal apps and the way they are stretched/scaled.
Instead of using forms of scaling like letterbox, etc. for scaling an app to different devices, couldn’t you just adjust the location and size of every image like the background, ground, and objects relative to the device width and height?
For example:
Lets say you have a device with a 400x400 display size, and a device with a 800x600, just for simplicity.
If you did say:
local W = display.contentWidth
local H = display.contentHeight
then did:
local background
background = display.newImage(“XXXXX”)
background.x = W/2
background.y = H/2
background.width = W
background.height = H
local ground
ground = display.newImage('XXXXX")
ground.x = W/2
ground.y = H/16
ground.width = W
ground.height = H/8
On both the 400x400 display and the 800x600 display, and any other sized display for that matter, the images would be placed in the correct locations.
If you did this for every image in your game, with absolutely no fixed numbers… technically wouldn’t this make the game universal without stretching anything and no need for multiple image resolutions? Granted you would want to start with images sized for a large device like an iPad.
Any thoughts on this?
Am I making it more confusing than it needs to be?