Setting Screen Size Dynamically based on Legacy iPhone or iPhone 5

Hey gang. Maybe I am missing it (probably), but with the new 10.1, how I can tell a scene to resize itself (I.e. Actors move to adjusted locations, etc,) based on whether it is running on an iPhone 5 or iPhone 4S and older? Seems like it would be a pretty standard function, but I can't seem to find it.

Ex. As my game scrolls horizontally, I will need it to dynamically resize based on the screen aspect ratio. I assume that this would be done with some kind of "If iPhone 5 then X, else, Y"

Simply cropping in won't work as it would create odd negative space. So far I only found an option that changes all my scenes to iPhone 5 aspect ratio or the old version. Thanks.

Answers

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hi there,

    We should have a vid up shortly on this subject over at GSHelper.com.
  • ellfireellfire Member Posts: 187
    @Braydon_SFX that would be great. Without this functionality, we would be toast as far as cross iPhoning goes.
  • part12studiospart12studios Member Posts: 620
    edited November 2012
    yea it seems like 10.1 default for iphone is the iphone 5.. personally i'd rather support the old devices over the iPhone 5 since there are still many more of them than iPhone 5's.. not to mention i'd rather have black boxes on the left and right of the screen (landscape) than two long thin boxes above and below for all older devices, but that's just me
  • lycettebroslycettebros Member, PRO Posts: 1,598
    Someone suggested moving graphics based on the device screen size. Works well for me - created a boolean (iPhone4)...if device screen width is 480 then true.
    Then whatever graphics need to move location they just check the boolean and move or not.
    Tested only in preview and it works fine - you do not have to make an Adhoc. You can just set the relevant screen res in GS preview mode and hit the reload button to test if it works for that res setting (overscan etc.)
  • ellfireellfire Member Posts: 187
    edited November 2012
    Okay gang, so more info is coming around slowly, but I'm still a little lost here. I understand how to create rules based on the different device width. Cool. What I'm not sure of is how to setup my project settings for it. What is this "crop" thing in the GS Helper video? I am from the CG animation realm and whenever you say "crop and blow-up" (what I think the function does) that is a big no no as you loose your native resolution. So my question still stands. How can I setup a project and build it so that it will fill the screen correctly on both legacy and iphone 5 devices without doing any kind of cropping/letterboxing stuff. Should I pick Legacy or iPhone 5 in my project settings? Doesn't that force the build into one format or another? It seems really odd to force folks to pick one or the other. Does it even matter what project format I choose as I will be changing camera sizes on the fly with rules anyway?

    All help is, as always, appreciated.

    UPDATE - Okay, I tried leaving my project on legacy and then using a rule to switch camera sizes. This didn't work at it displayed correctly on iPhone 4 and weirdly letterboxed on iPhone 5.

    UPDATE 2 - Same thing happened in the other direction. So now I am flumoxed. Maybe I am just not understanding the idea of the crop function?
Sign In or Register to comment.