Android Resolution advice: Which option is better?

kupo15

Member
I found some peculiarities working with mobile when it comes to resolution that you don't see in windows...(well perhaps its the same thing when you work in a boarder windowed mode for pc). My game's resolution is natively at 360*640. My phone is an S10 set to 1080x2280 resolution. Interestingly enough, when I get the display_height, the number is not 2280 as I expected. Instead, its actually 1080x2024. My only guess as to this smaller number is that perhaps the notification bar at the top (which isn't displayed) and the android nav bar at the bottom is cutting into this vertical resolution. When I bring up the VK, the screen_height is both 144 and 1071, I'm assuming that is referring to the nav bar and the keyboard height. GM isn't spitting out a number for the notification bar height so I can only assume that

Notification_height = 2280-2024-144= 112px

Here is where things get interesting. I tried setting the application surface two ways, one based on the width and the other the height

Width Based Resolution
1080x1920

Height Based Resolution
1219x2168????

Its strange the height in the height-based is not 2024 as its displayed in the game. The leftover amount is once again 144 which leads me to believe it didn't take into account the android nav bar. And removing fullscreen confirms this by matching the 2168 in the window and the surface height. I guess it takes an extra frame to register the navbar to take into account when getting the screen height.

Its good to know that you don't have to worry about covering up the notification bar at the top because 0,0 in the game room is where the notification bar ends. You would need to use the GUI feature to draw under the top notification bar

TL;DR

Here are the three options. Which of the three methods is the better one for scaling resolutions for devices? Keep in the mind, the nav bar will be blocking out the bottom all the time so option 2 sets the resolution height greater than what is actually being displayed. Also, the blackbars shows no difference whatsoever between the three.

Dev res: 360x640
testing device res: 1080x2280 (-112-144)

1. Width Based Resolution
1080x1920

2. Height Based Resolution (no nav)
1219x2168

3. Ideal Height Based Resolution (w/ nav)
1138.5x2024
 
Last edited:
Top