Detecting iPhone 6+ screen resolution?

fogartyfogarty Member, PRO Posts: 181

I have an old game that I'm updating. I used what I think is a now old way to do a universal build where I detected the screen size individually for each device and then changed the camera size and origin, and do an overscan.

I have it working for all devices except the iPhone 6+/7+, and I can't seem to get it to detect the screen.

I've tried all the following sets of parameters.

When all conditions are valid:

attribute --> game.screen.size.width=1080
attribute --> game.screen.size.height=1920

attribute --> game.screen.size.width=1920
attribute --> game.screen.size.height=1080

attribute --> game.screen.size.width=540
attribute --> game.screen.size.height=960

attribute --> game.screen.size.width=960
attribute --> game.screen.size.height=540

But in all those cases, the game acts like it's not detecting the screen properly. No matter what I change in the rule, the screen looks the same in preview.

Do I have something wrong about the screen resolution numbers?

Here's an example of what I have working for the iPad. I just want to do the same thing for the 6+/7+:

Thanks in advance!

Best Answer

  • BBEnkBBEnk Posts: 1,764
    Accepted Answer

    No, I mean set it up so the display text tells you what size the screen is on the device.

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Not that I know anything about this but maybe try 1242 x 2208?

    https://www.paintcodeapp.com/news/iphone-6-screens-demystified

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • fogartyfogarty Member, PRO Posts: 181

    @tatiang That didn't work, but thanks for the suggestion. Any other ideas, anyone?

  • BBEnkBBEnk Member Posts: 1,764

    physical pixels is 1080x1920

  • fogartyfogarty Member, PRO Posts: 181

    @BBEnk Thanks! Yes, I tried every configuration of that I could think of (thinking maybe I got the height/width mixed up, or maybe you divide it in half like you do for some of the other devices). It's not detecting the screen though.

  • BBEnkBBEnk Member Posts: 1,764

    put a display text on screen, and see what it says on device.

  • fogartyfogarty Member, PRO Posts: 181

    @BBEnk That's a great idea! The text never displays, so that confirms my suspicion that the rule is never getting past the parameters to detect the screen.

  • fogartyfogarty Member, PRO Posts: 181

    @BBEnk Haha! Well, that's an even better idea--and it worked.

    It gave me an iPhone 6 plus landscape screen size of 736 width x 414 height, and when I plugged that into my rule, it worked.

    I'm adding the keywords universal and resolution here so maybe this will come up better for the next person who searches.

    Many, many thanks to you.

Sign In or Register to comment.