Android Adjusting Room Sizes for Android Devices

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Rasmus, Feb 7, 2019.

  1. Rasmus

    Rasmus Member

    Joined:
    Jan 13, 2018
    Posts:
    3
    I just recently bought GMS2 and the GMS2 Mobile Module. I just read through all the documentation to set up the Android Module and was able to successfully run my first app through GameMaker! While I have published apps already to the google play store they were written in C# through the Unity engine, so please bear with me as I am quite the noob with GMS2.

    I am trying to figure out how to set the room size to fit my Samsung galaxy s8 and other recent Android devices as I am targeting API 23.

    I am trying to develop a vertical game so I'm quite lost on how to make a comfortable room to work in GMS2 and have it play without black sidebars on my device. I have been reading up on aspect ratios and 16:9 won't work well on the S8 as it uses a very unique ratio.

    All help is much appreciated!
     
  2. BeepBoop

    BeepBoop Member

    Joined:
    Feb 6, 2019
    Posts:
    6
    There is a great Pixelated Pope's post about aspect ratios and such.
    I am not allowed to post links, but you can copy and paste this into Google:
    "
    Scaling, Resolution, and Aspect Ratio Management for GMS1 & GMS2"
     
  3. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,408
    In general, you want to set a basic room size that is approximately the aspect ratio required, and then you would use a view camera to expand-contract the visible area to fit the screen. Keep in mind that "rooms" in GMS are fairly abstarct and the room size can actually be ignored completely when running your game, as the camera can be larger (or smaller) than the room size. So, essentially, you want to get the aspect ratio for the screen the game is being played on, and then set a base width (or height) and set the corresponding height (or width) of the camera using the display aspect ratio. If you want the room size to remain fixed and don't want to use a camera then you need to let GMS2 handle things for you by checking the "keep aspect ratio" box in the Android Game Options.
     
  4. Rasmus

    Rasmus Member

    Joined:
    Jan 13, 2018
    Posts:
    3
    So if I aim for the aspect ratio of the S8 (37:18) does this mean no other android phone will run the app looking properly other then the S8 and that I should target 16:9? I also have no clue how to really use a camera but im sure I can find tons of tutorials out there, thank you.
     
  5. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,408
    No, it means that you make the BASE resolution set for that, but adapt the camera to show more or less of the game for different displays, so that it's adaptive. Have a look at these videos, they'll help I'm sure!

     
    MarceloP likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice