GameSalad

Detecting iPhone 6+ screen resolution?

fogartyfogarty Posts: 172Member, PRO

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

Answers

  • tatiangtatiang Posts: 10,916Member, Sous Chef, PRO, Senior Sous-Chef

    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 Posts: 172Member, PRO

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

  • BBEnkBBEnk Posts: 1,708Member, PRO

    physical pixels is 1080x1920

  • fogartyfogarty Posts: 172Member, PRO

    @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 Posts: 1,708Member, PRO

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

  • fogartyfogarty Posts: 172Member, PRO

    @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 Posts: 172Member, PRO

    @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.