I’ve just read the article “Tutorial: the Ultimate “config.lua” File” and thought I would give it a go for my new app. Here’s the entirety of my config.lua (which is a literal copy/paste from the blog post)
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 = 60, imageSuffix = { ["@2x"] = 1.3, }, }, }
Now, my problem is that on an iPhone 5 I get black bars and can’t use the space for anything; even though I place objects there, they just don’t get rendered.
Here’s my entire main.lua:
display.setDefault( "background", 0.5, 0.5, 0.5 ) display.setStatusBar( display.HiddenStatusBar ) local background = display.newImageRect("images/background.png", 1425, 900) background.x = display.contentCenterX background.y = display.contentCenterY
I’ve included screenshots of what I’m seeing in the different devices (ACTUAL devices, not simulator, only I converted them to jpg so that the forum would let me post them). I’m also including the original background.jpg image (1425 × 900).
Is there a way that I could use the entire iphone 5 screen? I’m ok with relative positioning -like the article says you should do- as I’ve been used this technique many times before on other platforms.