How do I properly size a window for android games?

0 favourites
  • 3 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • I have done 2 tests to try and learn how mobile screen sizing works, but I'm still very confused.

    Here is a picture of what the test layout looks like. Note that both the outer blue layout and inner rectangle are 9:16 aspect ratio:

    I built and loaded this onto my android phone twice, only changing the window size. My intention was that the tan-ish inner 9:16 rectangle would act as the game "safe zone" (EDIT: it won't let me post the video, but it's the one from Ed about safe zones and window sizes), while the outer blue area would simply show additional background for devices not matching the 9:16 aspect ratio.

    For the first test, the window size was set to the size of the inner rectangle- I wanted to see my 9:16 screen filled with the 9:16 tan rectangle (I made the window scroll to the center of the layout). Specifically, the layout size (blue rectangle) is 1280 x 720, and the inner rectangle is 640 x 360. Unfortunately, here is how it looks on my phone:

    ... there are still black bars. Why doesn't the tan inner rectangle fill the entire screen? Or at least display the outer blue instead of black bars? Maybe this is due to the Letterbox Integer Scale (which I am using because I would like to make a retro-styled game), but that doesn't explain the next bit.

    I changed the window size to match the blue rectangle, 1280 x 720. Now, I was expecting that the Letterbox Integer Scale would scale the window, leaving the black bars like it had on the first build, and I would see the entire layout in the same size as the rectangle of the first build. HOWEVER, I got THIS:

    Why did it shrink the window even though window size was increased? Is there any way I can still do a retro game, but eliminate the black bars shown around the window?

    Any help would be greatly, greatly appreciated. I have read just about every tutorial and am starting to get frustrated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Seems like the scrolling isn't working..

    What project size are you using, what layout size?

    Do you use unbounded scrolling?

    I tend to test on pc, changing the size of my browserwindow to see how the layout reacts to different screen-sizes..

  • Hey LittleStain, thanks for the idea of testing in browser! I'll definitely do that from now on. And the images above are, for some reason, cut off halfway. Scrolling is not the issue, just zoom. I THINK I've fixed this by using scroll outer (so it shows the yellow "game" zone and any extra is the blue "safe" zone), but I'm getting issues on rotating the android device. Thanks again for your help though

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