How do I get the height of the displayed area in overscan?

hesdeadjimhesdeadjim Member, PRO Posts: 38

I'm developing a universal game starting on iPad. I want to know the height of the area shown when on the iPhone, but nothing seems to show as accurate.

When in overscan scene cam height shows 768, display height is 768, screen height is 320.

How do I get the height of the actual shown area? Shouldn't cam height show that?

Thanks

Best Answer

Answers

  • joshiwujoshiwu Member Posts: 207

    I'm no expert but an iPad is 2x larger than an iPhone .in pixels. To get screen size you need to unlock an actor on the scene to acces device.screensize. Rather insightful wouldn't you say?

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    Hi @hesdeadjim First, a correction: @joshiwu - that's not correct, I have to say ( that iPad is 2x larger than an iPhone .in pixels)

    Actual screen sizes in pixels:

    iPad 1024 x 768

    iPhone 4 and before 480 x 320

    iPhone5 and onwards 568 x 320

    If, by cam you mean camera height, this can be changed as you want for each and every scene - there's no connection as such between the actual screen size and the camera size. Has that helped?

    A tip: if you want your universal game to include the old iPhones, then personally, I'd recommend using Letterbox, with the top and bottom missing for the older phones (or left and right missing/cut off if screen is landscape)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • hesdeadjimhesdeadjim Member, PRO Posts: 38

    Thanks for the replies. I thought about using letterbox, but I really prefer overscan.

    I want a way to have an actor the same height as the shown area. The vertical cutoff for iPhone, iPad and iPhone legacy are all different. I tried grabbing the unlocked cam height from scene, but it's always 768 and my actor gets cut off when I use that. same with screen size y and device size y.

    I could hardcode the heights, but I might want it working on other devices like android later.

    I need a way to make an actor fill the shown height in overscan mode... no matter what device.

  • hesdeadjimhesdeadjim Member, PRO Posts: 38

    Another way to put it is, if I manually size an actor to the height of overscan landscape: iPhone 5: ~570
    iPhone legacy: ~670
    ipad: 768

    How do i get that value, no matter what the device?

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    @hesdeadjim said:
    Thanks for the replies. I thought about using letterbox, but I really prefer overscan.

    Fair enough... (I prefer, letterbox, as it happens!)

    I want a way to have an actor the same height as the shown area. The vertical cutoff for iPhone, iPad and iPhone legacy are all different. I tried grabbing the unlocked cam height from scene, but it's always 768 and my actor gets cut off when I use that. same with screen size y and device size y.

    So you mean the camera size width and height is being used for the smaller iPhone sizes? I guess you will have to use change attributes to change these manually to match the individual screen sizes... I can't think of an alternative... maybe someone else can chime in here...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • hesdeadjimhesdeadjim Member, PRO Posts: 38

    Thanks for the help guys

Sign In or Register to comment.