My App Fits Perfectly On All Devices Except The Ipad

So I used the ultimate config document for my app and the screen size fits perfectly on all devices except the iPad.  My app is a landscape orientation and it has black bars on top and on the bottom of the iPad screen which is strange because the app fits perfectly on other tablets.  Should I be adding something to the iPad section in the config document?  Or is there a way to resize the background images just for the iPad once the game detects the iPad device? 

I should note that all my objects fit perfectly from top to bottom, it’s ONLY the background images that have the black bars on top and bottom.  All of my background images are 570 width and 320 height.  Those settings makes it fit perfectly on all other devices.  

My background is, oddly, at 570x380 (and I don’t remember why I did the 570x380 to begin with), and my fullscreen house ads are at 570x360.   They are for both iOS and Android versions…   Now, I should think back and figure out why I did 570x380, and maybe I should consider cropping 380 down to 360…  Hmmm.

Naomi

If you used the ultimate config.lua file, then the iPad is scaled at 3_ 60 _ x 512 or something like that, not 320.  Your backgrounds should be 360x570.  Naomi, extra bleed doesn’t hurt, other than taking up more memory.

Thanks, Rob.  I decided not to bother cropping the background art.  After all, the texture memory it takes up will be the same whether it’s 360x570 or 380x570 (because it would take up 512x1024 worth – I mean, if I remember correctly, it would round up to the next power of 2 – unless I got this wrong), and it would hardly make difference in terms of file size of the app itself.

Thanks again.

Naomi

Wow, thanks for the reply Rob but I cannot do that.  All of my background images set at 320x570 fits perfectly on all other devices.  If I expand it to 360x570 then the images appear stretched on every device except the iPad.  Is there a function where the image changes it’s size based on which device is detected?  I thought I read somewhere that it’s possible unless I was reading it wrong. I was hoping to make my app universal.  

Without seeing your background can you not add padding, don’t stretch it, but extend the background to make up the difference?  You have to make sure when you do a display.newImageRect(“background.png”, 570, 360)

so it will load it in at the right aspect ratio.  On less square devices the extra will be cut off and won’t show.

The images are all large files 1538x832 originally.  When I do the newImageRect and scale the images at 570x320, it looks perfect on all devices but has the black bars on the iPad.  Then I change it to 570x360, it only looks fine on the iPad but the height looks stretched on all other devices.  Maybe it’s the way I’m creating the background images?  

@neilw711, you’ll need to add padding to 1538x832 image to have the same aspect ratio as 570x360 to make this work right.

Naomi

Hmmm, how would I do that?  I sound like an amateur right now haha 

Urrmm, if you didn’t create the background art, you’d need the artist who created it to add the padding/extension to the original art… meaning, the background image would have to extend beyond the 1538x832 boundary.  Keep in mind, the 1538x832 area would be used for iPhone & iPod devices, so you don’t want to distort it.  You just need to add the extension that would cover up the black strips on iPad.

Naomi

Your background images should be 1538x971 it seems.  Then the top and bottom will get cut off on the narrower devices but fill out your iPad.

My background is, oddly, at 570x380 (and I don’t remember why I did the 570x380 to begin with), and my fullscreen house ads are at 570x360.   They are for both iOS and Android versions…   Now, I should think back and figure out why I did 570x380, and maybe I should consider cropping 380 down to 360…  Hmmm.

Naomi

If you used the ultimate config.lua file, then the iPad is scaled at 3_ 60 _ x 512 or something like that, not 320.  Your backgrounds should be 360x570.  Naomi, extra bleed doesn’t hurt, other than taking up more memory.

Thanks, Rob.  I decided not to bother cropping the background art.  After all, the texture memory it takes up will be the same whether it’s 360x570 or 380x570 (because it would take up 512x1024 worth – I mean, if I remember correctly, it would round up to the next power of 2 – unless I got this wrong), and it would hardly make difference in terms of file size of the app itself.

Thanks again.

Naomi

Wow, thanks for the reply Rob but I cannot do that.  All of my background images set at 320x570 fits perfectly on all other devices.  If I expand it to 360x570 then the images appear stretched on every device except the iPad.  Is there a function where the image changes it’s size based on which device is detected?  I thought I read somewhere that it’s possible unless I was reading it wrong. I was hoping to make my app universal.  

Without seeing your background can you not add padding, don’t stretch it, but extend the background to make up the difference?  You have to make sure when you do a display.newImageRect(“background.png”, 570, 360)

so it will load it in at the right aspect ratio.  On less square devices the extra will be cut off and won’t show.

The images are all large files 1538x832 originally.  When I do the newImageRect and scale the images at 570x320, it looks perfect on all devices but has the black bars on the iPad.  Then I change it to 570x360, it only looks fine on the iPad but the height looks stretched on all other devices.  Maybe it’s the way I’m creating the background images?  

@neilw711, you’ll need to add padding to 1538x832 image to have the same aspect ratio as 570x360 to make this work right.

Naomi

Hmmm, how would I do that?  I sound like an amateur right now haha 

Urrmm, if you didn’t create the background art, you’d need the artist who created it to add the padding/extension to the original art… meaning, the background image would have to extend beyond the 1538x832 boundary.  Keep in mind, the 1538x832 area would be used for iPhone & iPod devices, so you don’t want to distort it.  You just need to add the extension that would cover up the black strips on iPad.

Naomi