Hello,
I am using the modernized config.lua for a game that I am making:
--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, }, }, }
I keep an external file where I set x and y positions of objects that appear on the screen. Like so:
l6= { {x=400, y=420, n=1}, {x=400, y=550, n=1} }, l7= { {x=150, y=220, n=3}, {x=320, y=450, n=3} },
I though if I use the new config.lua x=400 would result in a centered object, on all devices. However on the iPad it’s slightly moved to the left. Whereas it’s perfectly centered on all iPhones.
Is there a better way to do this? How do you design your levels?
Thanks so much in advance,
Phil