Let me jump in to this.
The “Modernizing the Ultimate Config.lua” tutorial had a goal of assuring that 0, 0 is the top, left corner and that display.contentHeight, display.contentWidth is the bottom, right corner. This won’t work for all games and apps. It’s good for positioning things around the edges of the screen or positioning things some relative distance away from center and the actual distance between object isn’t all that important. Think of a card game where the card stacks can be easily balanced and might be further apart on a phone and closer together on a tablet
The other option is to use the simple config.lua that Brent provided above, it requires more work to edge position items, but your objects will be the same distance apart. Think of Angry birds where the slingshot has to be a fixed number of pixels away from the pigs regardless of the device you’re on. If you use this config.lua, then display.actualContentHeight, display.actual.ContentWidth is the bottom, right corner and display.contentOriginY, display.contentOriginX represents the top, left corner. Anything positioned along the top or left edges that needs to stay a fixed distance from those edges requires you to add display.contentOriginX and display.originY to those coordinates. This can make the code a bit ugly, but it works effectively.
Consider (assuming a landscape app and a 320x480 content area):
local healthBar = display.newImageRect(“health.png”, 100, 25)
healthBar.x = 55
healthBar.y = 15
Regardless of device, the health bar will stay the same distance from other game elements. On a 16:9 shaped phone, there will be 44 extra pixels between the left edge and the health bar. On an iPad, it will be 5 pixels away from the left edge.
local healthBar = display.newImageRect(“health.png”, 100, 25)
healthBar.x = 55 + display.screenOriginX
healthBar.y = 15 + display.screenOriginY
With this code, regardless of the device, the bar will be 5 pixels away from the edge.
As someone who has used the dynamic aspect ratio a lot (it makes sense for my way of screen design), I’ve switched to using the simple config.lua on my recent projects and I’m just biting the bullet on adding display.screenOriginX/Y to everything and I’m pretty happy with the simple config.lua.
Rob