would this work? Yes, No or Maybe?

0 favourites
  • 4 posts
  • Hello everybody,

    I probably already know the answer to my question.

    on start of layout compare windowsize

    if window size > 16:9 goto layout small

    if window size = 16:9 goto layout normal

    if window size < 16:9 goto layout tablet

    does this work? has anybody tried this? In theory it sounds solid.

    What is your take on creating multiple screen sizes without making 20 of the exact same app?

    Thanks in advanced for any input on this subject matter. Jeremy C.

    Update:

    and the answer is yes it works. I have not tested on mobile device as of yet.

    The code shown was for demo testing. So setting a

    16:9, as in 1280x720px

    16:10, as in 1680x1050px

    5:3, as in 1280x768px

    3:2, as in 960x640 (This screen ratio is also used on iDevices.)

    4:3, as in 1024x768

    ratio in a mobile app is possible without to much extra effort. Basically clone layout re-size to ratio and leave event sheet the same.

    update 2:

    so this should work with screen orientation also if you have to adjust for landscape/portrait.

    on device landscape/portrait. goto layout or switch between active layers.

  • I've done something like this for different interfaces when in landscape/mode by comparing to see if height is greater than width, so I'm pretty sure it would work to target different aspect ratios and resolutions. Although it seems like a lot of extra work, when I (and other big budget games I've noticed) can just use scale outer and pin ui elements to viewport edges or center to target all possible aspect ratios at once.

    In case you haven't seen it before, this tutorial covers a lot regarding aspect ratios. https://www.scirra.com/tutorials/73/sup ... zes/page-2

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've done something like this for different interfaces when in landscape/mode by comparing to see if height is greater than width, so I'm pretty sure it would work to target different aspect ratios and resolutions. Although it seems like a lot of extra work, when I (and other big budget games I've noticed) can just use scale outer and pin ui elements to viewport edges or center to target all possible aspect ratios at once.

    In case you haven't seen it before, this tutorial covers a lot regarding aspect ratios. https://www.scirra.com/tutorials/73/sup ... zes/page-2

    yes! I have seen that. but Understanding how it would work best for multiple screen sizes is a little hard.

    as paralax sets 0,0 = same size as layer if layer = bigger/smaller HI moves or is off screen.

    I could design center of layout but that would look off depending on the game/app I wish to create.

  • Our auto-scaling mechanism.

    https://drive.google.com/open?id=0B-xiq ... 0lDRklrNVU

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)