designing for dynamic content based on screen height.

jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
so how are all of you dealing with changing positions based on screen height? I know it's easy to handle the basic ones, i.e.:

iPad
if screen.height = '768' then
self.postion.y = 700

nook
if screen height = '600' then
self.position.y = 550

kindle
if screen.height = '580' then
self.position.y = 500

how are you planning for other resolutions, or are you even bothering?

Comments

  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    edited December 2012
    Instead of making a rule for every device wouldn't be more simple to have, for example, a change attribute for the self.positionY to screen.height-50 ?

    That way in my example regardless of the screen size the actor will always be 50px below the top edge of the screen.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    The problem is when you have an iPad game as an iPhone one. It shrinks everything so a 100px tall actor might only show up as 50 (a guess to the scale). So it places it in the middle of the screen
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    edited December 2012
    Ah yes, you're right. Then you could try to do it with some little proportions.

    For example if your baseline is a distance from top of 50px on an iPhone you can change the actor Y position to (50/320)*screen.height (or maybe it should be better to use camera size since the screen height will change from retina to non retina devices).

Sign In or Register to comment.