Universal Binary

RedRoboRedRobo Member, PRO Posts: 682

Hi,

I'm just embarking upon my first universal binary project. Can anyone point me to a good tutorial or thread so that I get off on the right foot.

I'd rather do it myself than purchase a template as I really want to understand what's involved and how it works.

Thanks guys :)

Comments

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

    The most simple and, in my opinion, best UB technique is to start with iPad orientation and use overscan. That's it. All you have to do is make sure that you place actors within a certain area where they will not get chopped off on different devices. It sounds more difficult than it really is.

    I've attached an example.

  • LovejoyLovejoy Member Posts: 2,078

    @strag said:
    Hi,

    I'm just embarking upon my first universal binary project. Can anyone point me to a good tutorial or thread so that I get off on the right foot.

    I'd rather do it myself than purchase a template as I really want to understand what's involved and how it works.

    Thanks guys :)

    Fortuna Infortuna Forti Una

  • RedRoboRedRobo Member, PRO Posts: 682

    @Braydon_SFX Thanks for posting that, I really like the simplicity of this solution and I see it will work perfectly for apps with a flat coloured background, I think this will cause me issues though as I need full sized images as backgrounds which will not crop so well.

    @Lovejoy Thanks for the video link....very useful and taught me a bundle. It seems that there are quite a few different ways to go so I think I will just dive in and try a few.

    Cheers again guys!!!

  • RondoRocketRondoRocket Member Posts: 411

    I found the whole Universal Binary thing annoying, I ended up just starting with the iPhone 5 as my target device since it's the most popular device, as far as I know. It looks good on iPhone 6 with overscan and I crop the camera on the iPad.

    I set a rule dividing screen width by screen height to find the aspect ratio and used that in the rule to find out if it's iPhone or iPad/Legacy iPhone. This also works if you are porting to Android and their millions of devices. :/

    But the Universal thing is definitely a trial and error process and what works best for you. I use to start with iPad but I found I ran into more issues when adjusting for the taller screen of the iPhone and it was easier for me to just crop if I started with the iPhone 5.

  • colandercolander Member Posts: 1,610

    What type of game are you writing, is it a non scroller, scroller or map scroller in portrait or landscape?

  • RedRoboRedRobo Member, PRO Posts: 682

    @RondoRocket Thanks for the advice. I like your idea to find the device aspect ratio. And it's interesting to hear your approach, I think it could also work well for what I am doing.

    @colander It's an interactive childrens book/game so lots of full sized background images.

  • colandercolander Member Posts: 1,610

    @strag said:
    colander It's an interactive childrens book/game so lots of full sized background images.

    That doesn't answer my question. Because it is a book it will probably be in portrait. But if it will have two pages open at the same time it might be in landscape. Do you intend to scroll around the page/scene? For example if you are going to zoom in and out on the book it will need to map scroll. If it is for tablets only a non scroller should be fine.

  • RedRoboRedRobo Member, PRO Posts: 682

    @colander It will be purely in landscape mode, see attached (sorry about the watermark, it's a collaboration). As you can see it will be one full sized image per page with interactive actors placed over the top. There is no need to scroll or zoom about. This is the home page the other pages have the text which tells the story.

    As this is my first iOS project just wondering does the universal build have to also support iPhone 4 to be accepted?

  • colandercolander Member Posts: 1,610
    edited March 2015

    Read the instructions below in my signature it will explain it all. It is a bit confusing when you first start thinking about it but it is not as difficult once you get into it.

    When you think about aspect ratios picture a spectrum. In landscape at one end will be iPad at 4:3 and at the other end is iPhone 6 at about 16:9. Everything else is in-between these two. For example iPhone 4 aspect at 3:2 is wider than iPad but not as wide as iPhone 6.

    Forget the physical size and think only about the aspect. Put your image in an iPad project and letterbox it to iPhone 6. The sides of the scene are empty/black. Now overscan it and it will fill the screen but the top and bottom will be chopped off. They are still there in memory you just can't see them. You will need to design your game with this in mind.

    Looking at your image you have spare space on the top and bottom. I would create it in iPad and overscan to all other devices as a universal build and keep you game play in the iPhone 6 area. All the HUD actors can be placed on a separate layer and using code they can be automatically moved to suit the new layout.

    I have attached two screen shots of my game Kicka for Kids so you can see this. The top and bottom of the iPad shot has been cut off in the iPhone shot (No game play takes place in these areas) and all the HUD actors have the same positions in both shots.

  • RedRoboRedRobo Member, PRO Posts: 682

    @colander Wow thanks for sharing that! It makes it very clear and I think I will do exactly what you said. I need to adjust the artwork on some of my other pages to account for the cropping but you live and learn!
    Thanks for making it so understandable...I've been trying to get my head round this for days :)

  • colandercolander Member Posts: 1,610

    @strag said:
    colander Wow thanks for sharing that! It makes it very clear and I think I will do exactly what you said. I need to adjust the artwork on some of my other pages to account for the cropping but you live and learn!
    Thanks for making it so understandable...I've been trying to get my head round this for days :)

    Your welcome :)

Sign In or Register to comment.