Universal build queries

drs997drs997 Member, PRO Posts: 27

Hi Guys,

I'm having a few issues trying to figure the best way to acheive a universal build. There appears to be lots of different methods and advice!

I currently currently have a iPhone landscape project. I initially want this to work on iPad, with the aim of porting to android at a later date. I'd be happy with getting iPhone/iPad working for now.

I want to use the overscan method, with no stretching of images.

I have been positioning my actors using percentages based upon screen size, but it doesnt appear to behave as I would expect.

If I position an actor in the center using game.Screen.Size.Width /2 and preview in iPad landscape, the actor is not centered. If I position an actor using game.Display Size.Width /2 and preview in iPad landscape, the actor is centered.

I would like to know:

  1. What is the difference in game.Display Size.Width and game.Screen.Size.Width?
  2. Which of the above should I be using to position my actors.
  3. Examples I have seen have changed the camera size/position. Do I need to do this if using the method above?
  4. What is the prefered method of achieving a universal build these days?
  5. Do you have any other tips?

Thanks!!!

Comments

  • colandercolander Member Posts: 1,610
    edited July 2014

    I did some work on this a while ago and got a ton of help from @‌CodeMonkey wouldn't have got it dome without his help. Here is the thread http://forhttp://forums.gamesalad.com/discussion/61643/why-doesn-t-this-formula-work#latest

    I have attached a project that deals with shifting actors on the X axis. Overscan magnifies the screen from the centre point in all directions until it fills the screen. This always leaves two sides on either the X or Y axis off the screen. Basically game.Screen.Size.Width is the screen resolution you wrote the game in and game.Display Size.Width is the screen size of your target device. You do not have to change your camera size/position to do this.

    You will need to choose a method to suite your game. Or if you can, design your game to suite the method so no game play takes place in areas of screen. Use the first method for endless scrollers and the second method for non scrolling games if possible. If you and design your app for stretch it is the easiest option. Don't use letterbox some stores won't accept it.

  • drs997drs997 Member, PRO Posts: 27

    hey colander, this has been a great help. thanks for taking the time to upload the example project. I'm glad you provided the link to the original thread as the formula looks rather scary!!

    cheers

Sign In or Register to comment.