Screen Width

I have completed a game but have an issue with the screen size. When I view the game in the simulator for the Iphone it looks great and when I load to my Ipod Touch 4th addition, it looks great also. The problem in the simulator is that it looks stretched and does not fit the screen properly for the Iphone 4 and the Ipad.

What do I need to do in the coding to correct the sizing for the Iphone 4 and the Ipad? [import]uid: 72372 topic_id: 13268 reply_id: 313268[/import]

Do you have a config.lua file in your project? This file is where you would specify how your app should scale on different devices. The Corona doc for how to set up this file is here:
http://developer.anscamobile.com/content/configuring-projects [import]uid: 27965 topic_id: 13268 reply_id: 48690[/import]

I do have a config file. The current code I have is listed below. I’ll read the document to see what it says. Thank you!!

[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”
},
}[/lua] [import]uid: 72372 topic_id: 13268 reply_id: 48693[/import]

Calebr2048,

I read that document but I’m still confused. Do I take the image I want which is a background that is messing up and make several sizes of it in the file and then update the config? I sorry I just don’t understand what to put there and then how to adjust the image.

Michelle [import]uid: 72372 topic_id: 13268 reply_id: 48696[/import]

Are you able to post a screenshot of the problem? What image format(s) are you using? Are you disproportionately scaling any of the images in your project such as xScale = 1 but yScale = 2? [import]uid: 27965 topic_id: 13268 reply_id: 48702[/import]

I don’t know how to post screenshots on here. It is just showing the background too wide for the screen for the Iphone 4 and the Ipad. I may be able to email an image to you though. My scaling is all .5 whenever I use it for images but I am not using that for the background. I am assuming I need two images for the the background. a normal one for the iphone screen then an adjusted one in size for the Iphone 4 and Ipad? [import]uid: 72372 topic_id: 13268 reply_id: 48704[/import]

I am assuming I make the config.lua file like this with adjusted .png files?

[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,

imageSuffix =
{
["@2x"] = 2,
}
}
}[/lua] [import]uid: 72372 topic_id: 13268 reply_id: 48705[/import]

Perhaps you could try a different scale option in your config file.
Have you tried “zoomEven” or “zoomStretch”? If you want to email me the image you can at calebdev2048@gmail.com. [import]uid: 27965 topic_id: 13268 reply_id: 48707[/import]

I have tried both of those and it didn’t help. I’ll send you the pictures so you can see what I’m talking about. [import]uid: 72372 topic_id: 13268 reply_id: 48711[/import]

Does anybody have an answer for this?

I show the config I changed it to but it still does not show up right in the simulator for Ipad and Iphone 4.

[import]uid: 72372 topic_id: 13268 reply_id: 48763[/import]

Hey Everybody,

I got this fixed with 1st adjusting my base picture size to 480 X 320 because I do have a landscape game. For some reason when I opened it up in preview it said it was that size but it really wasn’t, so I resized it. I then took that png file and made another one in the size 960X640. So I have two files, one named myfirstapp.png and myfirstapp@2x.png. Lastly I had to adjust my config.lua file to have zoomStretch. I don’t know if this is the proper way to do it but it worked for me. It now shows up correct in the simulator for any of the items you open it up on.

[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “zoomStretch”,

imageSuffix =
{
["@2x"] = 2,
}
}
} [/lua] [import]uid: 72372 topic_id: 13268 reply_id: 48773[/import]