How do I size images?

How do I change my images to fit the screen?

also give me a plain with x and y cordinates for basic image placing.

I need to know where to put my background. Whats the code for putting a full background in?

give me some basics here! thanks im a noob!

for background images I have 3 of them

bg.png - 360 x 570

bg@2x.png - 720 x 1140

bg@4x.png - 1440 x 2280

and then use the following script to place them on the page in my main.lua

local bg = display.newImageRect( "bg.png", 360, 570 ) bg.x, bg.y = display.contentWidth / 2, display.contentHeight / 2

in my config.lua file I use the following, it then looks at what the resolution is of the device being used (iphone, iphone5, ipad) and selects the correct bg image

local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = aspectRatio \> 1.5 and 320 or math.ceil( 480 / aspectRatio ), height = aspectRatio \< 1.5 and 480 or math.ceil( 320 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }

what are the cordinates for a ground?

,

,

,

its no problem, takes a while to get your head around it

for background images I have 3 of them

bg.png - 360 x 570

bg@2x.png - 720 x 1140

bg@4x.png - 1440 x 2280

and then use the following script to place them on the page in my main.lua

local bg = display.newImageRect( "bg.png", 360, 570 ) bg.x, bg.y = display.contentWidth / 2, display.contentHeight / 2

in my config.lua file I use the following, it then looks at what the resolution is of the device being used (iphone, iphone5, ipad) and selects the correct bg image

local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = aspectRatio \> 1.5 and 320 or math.ceil( 480 / aspectRatio ), height = aspectRatio \< 1.5 and 480 or math.ceil( 320 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }

what are the cordinates for a ground?

,

,

,

its no problem, takes a while to get your head around it

YO WASUP I’m back after forever I did that built it on my device and black bars bottom and top

what device is it that your getting it on? iPhone 5 by any chance??

Yeah I am putting it on my iphone 5 and the black bars are on top and bottom

make sure you have a Default-568h@2x.png splash file so that you ios knows to use the iphone5’s “tall mode”

have a read of point 3 on this page http://coronalabs.com/blog/2012/09/19/faq-wednesday-iphone-5-and-ios-6/

Where do I put that??

Oh never mind ok I’ll try that when I’m home from school looks like it should work thanks!

Noob, help another noob out, please. 

I cannot even open my main.lua file.

What program do you open it in?