• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Adjusting Room Sizes for Android Devices

R

Rasmus

Guest
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!
 
B

BeepBoop

Guest
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"
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
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.
 
R

Rasmus

Guest
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.
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.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
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!

 
Top