Multiple Screen Size Issue

0 favourites
  • 15 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • I'm trying to adapt my game to be suitable for multiple screen sizes, but I'm having trouble with 2 things.

    1) I want the player to be bound to the viewable screen, but I can't make the player solid because of game mechanics and I can no longer use the "Bound to layout" behavior because I'm using "Scale Outer" and I don't know what the width of the screen will be. No matter what I set the width of the layout to be, it won't be right for every device.

    2) I have enemies spawning on the right side of the layout, but now that the screen can be wider than the layout, they might spawn near the middle of the screen on some devices. I'd like for them to spawn out of view.

    The event I'm using for spawning enemies is this...

    Condition:

    System - Every 2.0 seconds

    Action:

    Create object "enemy" on layer "enemyLayer" at (800,random(0,600))

    The current layout is 800x600. Any help would be appreciated. Thanks!

  • Change the 600 in your random to ViewportBottom(a layer number).

  • Use this:

    https://dl.dropboxusercontent.com/u/169 ... utions.png

    Set this as the last layer and when all is done just delete it and compile your game.

    Set project window size to 640:960 and basicly set everything important (that needs to be seen) into the smalest screen aspect ratio (iphone4) and make sure that background covers both biger aspects (iphone 5 and ipad) and your good to go... and spawn everything that needs to enter screen from outside bigger aspest ratios also!

    (if you are more expirienced than you can use anchors to stretch visible objects to fit into every aspect ratio)

    and yes... use scale outer.

  • I tried:

    Create object "enemy" on layer "enemyLayer" at (ViewportRight(6),random(0,600))

    And it works. Thanks for your help!

    Is there a way to bound the player object to the Viewport instead of the layout?

    irina

    That's going to help me a lot, thanks! Is there an android version?

  • Fwumpy

    Theres no need for some "android" version becouse this covers basicly all screen aspects ratios (resolutions are irrelevant).

  • irina

    Great! And thanks again for the ratio guide. I don't have an iPhone 5, but I feel I can see how may game might look at that screen size.

  • irina does this guide works for all ipads? What aspect ratios do that guide represents, 3:2 4:3 and 16:9 right?

  • sachos345

    That's correct.

  • Thanks man that guide is awesome xD

  • Fwumpy irina

    http://i.imgur.com/fVPYfr3.png

    I took the job to make it better, hope it helps =)

    17:10 is 1024x600

    16:9 1280x720

    16:10 1280x800

    3:2 1152x768

    4:3 1024x768

    5:3 1280x768

  • You really need only 2 extremest aspects... the widest and the longest wich i think are 4:3 and 16:9 and all others fall in between.

    http://upload.wikimedia.org/wikipedia/c ... os_svg.svg

  • Fwumpy irina

    http://i.imgur.com/fVPYfr3.png

    I took the job to make it better, hope it helps =)

    17:10 is 1024x600

    16:9 1280x720

    16:10 1280x800

    3:2 1152x768

    4:3 1024x768

    5:3 1280x768

    Hello, (my number 1 post!)

    how should I place this on the Layout?

    I mean, is there a correct position ?

    I'm using the "image point" for your .png = 0,0, (edit animation)

    and on the layout -> position = 0,0

    ((please sorry my english))

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • nmlucio

    Hello, use sample capx iw posted here:

  • nmlucio

    Hello, use sample capx iw posted here:

    Thanks Irina!

    I really appreciate your help !

    The App will look good on a Android Tablet (like galaxy Tab2 : 1280x800) using the android mark of your sample?

    I dont have the equipament right now to make real tests on this issue! ...

    -------------------------

    Also,

    I have no idea why this happens, but when I open your C2 File, it look like this. :/

  • hm.. interesting... i dont know why.

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