Dynamic resolution (imageSuffix) on iPad Mini

Hey.  A quick look at the iPad mini simulated device file shows it as 1024 x 768.  That is the original I belive it will select 1x (nil).

For the resolution.

Try editing the file, and change this:

 screenWidth = 768, screenHeight = 1024,

to this:

 screenWidth = 768\*2, screenHeight = 1024\*2,

The selection should work fine then.

PS - This conversation is a little disconnected and I’m missing some of the points you made above.  Bear with me. :slight_smile:

I’m going to zip it for a bit.  I’m not really helping much and I could actual help more by experimenting on my end.  

Cheers,

Ed

I use 1.5x for my retina and that works on all but iPad.  Apparently on my landscape app this is a “Corona bug” on they way the calculations are done because the device is very wide.  So on my app (480x800) I get retina images showing on iPad2 when they technically shouldn’t and this causes memory issues!

Ignore the simulator as on that iPad2 uses non-retina assets where as the device uses retina assets.  

Confusing huh?

I am back.

@roaminggamer, thanks for trying to help me. To your questions:

  1. No, I don’t have a iPad mini to test it. I will try to run on the iOS Simulator and see what happens…

  2. Yes, I am talking about the Corona Simulator, which uses iPad mini 768 x 1024.  

Your suggestion to change the device settings IMHO does not solve the root issue.  Independently if that resolution is for the iPad mini 1 or not, since it is 768, it should be @2x, since when I use iPhone 4S Simulator (640 x 960) it correctly loads the @2x. (768 > 640). Note that I am talking about absolute pixels here.  

My main concern is if the imageSuffix is buggy… If it is, that problem could happen in more devices than only the iPad mini.

@adrianm, I am not using Landscape.

 

So, I ran the Corona app on the iPad 2 iOS Simulator (which has the same resolution as iPad mini) and it is loading the @1x instead of @2x. So it is not a issue with the Corona simulator itself. 

Could someone from Corona shed some light here?  Shouldn’t a device with 768 px (width) load the @2x?

Adaptive works differently than letterbox and zoomEven.

It assumes that you want objects to be the same physical size on a phone vs. a tablet. Adaptive is 1x at 320x480 on phones and 768x1024 on tablets (using Apple sizes) adjusted for aspect ratio.  You won’t get any 2x assets until your device becomes retina in size, that is 640x and 1536x.  I don’t know if the large iPad Pro will get 4x assets, but the “Plus” phones will be a 3x device.

The Adaptive scaling mode is intended primarily for business apps where the phone view and the tablet view are expected to be radically different. Games generally want to occupy the same real estate on the screen and letterbox or zoomEven are better choices.

Rob

Ok, got it.

How Corona is identifying if the device is a tablet?

I don’t believe we really determine phone vs. tablet. We determine a base content area from the device’s information. For iOS it’s based on 320 points. The iPhone 4/5 will be 320 points wide, the iPhone 6/7 will be 375 points wide and the plus models are 414 points. The iPads are 768 points. 

Android has dpi information so we can compute the width and height from that.

Rob

Thank you for the clarification.