I’m having trouble with image optimization in my application. I was recently using a config.lua file that was custom for iPhone 5. But before I launch my app I would like to optimize my application for as many devices as possible, from iPhone 4 — iPhone 6 Plus. I care most about the iPhone 5/5s. I just switched to the newly updated Ultimate Config.lua:
–calculate the aspect ratio of the device
local aspectRatio = display.pixelHeight / display.pixelWidth
application = {
content = {
width = aspectRatio > 1.5 and 800 or math.ceil( 1200 / aspectRatio ),
height = aspectRatio < 1.5 and 1200 or math.ceil( 800 * aspectRatio ),
scale = “letterBox”,
fps = 30,
imageSuffix = {
["@2x"] = 1.3,
},
},
}
Currently the menu screen image is at 640 x 1136.
In the menu.lua file the code is below for setting up my image
mainMenuScreen = display.newImageRect(“NewMenuScreen.png”,640 , 1136)
mainMenuScreen.x = display.contentCenterX
mainMenuScreen.y = display.contentCenterY
sceneGroup:insert(mainMenuScreen)
The above gives me a very zoomed out version of my application.
My questions:
What size do I need to make the Images? (“Please specify which device this is for”)
What suffix will I use for each of those images ?
What do I put for the x and y coordinates in the display.newImageRect() function ?
Is there anything else I need to do?
I’m using Photoshop for the creation of all Images.
I’ve read all of the comments under the Ultimate config file and have looked threw the forms. I’m still very confused. Please Help.