The ultimate config.lua is designed to avoid having to constantly add display.screenOriginX/display.screenOriginY in positioning objects and to assure that display.contentWidth always equals display.actualContentWidth. This assures that the top, left will be 0,0 and the bottom right will be display.contentHeight, display.contentWidth on every device.
It really has nothing to do with scaling. I’ll address that in a bit.
When you tell Corona to create a content area that’s 320 x 480 or whatever, you’re saying 0, 0 is the top, left of that box. That makes display.contentHeight, display.contentWidth bottom, right. But very few devices today are the same aspect ratio (1.5:1 the same as 4x6 photo). Most phones are HDTV shaped 16:9 or 1.7777778:1. That means that are areas that are on screen that are outside of that 320x480 box. I’ll use an iPhone 5 to illustrate. Its a 640x1136 device, but when using 320x480 in config.lua, you have 320 x 568 content points to work with. 568 is 88 points bigger than 480. 44 of them will be on top (portrait apps) or to the left (landscape apps). I’m going to continue this assuming a landscape app since that’s the OP’s screenshot. In a normal config.lua, The actual top left of the screen would be X = -44, Y = 0. The bottom right X would be 568 and Y = 320. display.contentWidth would return 480, display.actualContentWidth would return 568. The config.lua you’re using would the left, top be 0,0 and the right, bottom 568, 320. With the standard config.lua display.screenOriginX = -44, display.screenOriginY = 0
Enter an iPad, it’s a 4:3 format (old school TV) or 1.25:1. Given a content area of 320x480 (standard config.lua), the actual content area for a landscape iPad becomes 480 points wide and 360 points tall. Now the left top is 0, -20 (360 - 320 = 40, half on top half on bottom) and the right bottom is 480, 360. Now screenOriginX is 0 and screenOriginY = -20. But with your config.lua, you’re guarenteed of getting left, top 0, 0 and right bottom, 480, 360
None of this has anything to do with your backgrounds. Before we get to the background you have to understand that regardless of the config.lua, on a phone you have extra area on the sides. On an iPad and some other tablets, you have extra area on top/bottom of the screen that you background needs to cover. These are called “bleed” areas since they will fall off the screen. To make a generic background that works on all devices, it needs to be 570 x 360. The 570 is similar to the iPhone 5’s 568 points but other Android devices actually works out to 570. This width will cover your 16:9 devices. The 360 covers the iPads. The iPads will loose 45 pixels outside the 480 content area. The HDTV phones will loose 20 points top and bottom. They will be off screen. Generally you don’t want critical art in these areas. If you have UI elements that need to be in the corners or near the edges, they should be separate graphics that can be independently positioned around the edges/corners.
Now for scaling. No modern device today uses such a small content area as 320x480. Both Apple and Google highly suggest that we continue to use 320 points in our apps.
Since you have this in your config.lua:
imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, },
For a config.lua of 320x480 + the aspect ratio adjustments, any images loaded at their normal size will be used on devices that go up to 480 points wide (config.lua is always referenced in portrait mode). From 480 to 959 pixels, you get your images with an @2x suffix. For devices 960 or greater it will use the @4x images.
For this to work, you have to use display.newImageRect(“yourbackgroundimage.png”, 570, 360) and let Corona scale the image for you. You can’t use display.newImage() it ignores the @2x and @4x images. It will grab your 1x image and then you have to stretch it to fit which will lead to blurry images if you size it up too much.
Now if you use 800x1200, then screens up to 1200 px wide will get the 1x images, 1200 to 2400 px will get @2x images and so on.
And for games, we do not recommend “adaptive”. It’s too much work to build both a 320x480 and 768x1024 game in the same code base.