How do I properly size a window for android games?

Get help using Construct 2

Post » Fri Dec 04, 2015 5:17 pm

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: Image

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: Image... 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: Image

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.
B
7
Posts: 24
Reputation: 320

Post » Fri Dec 04, 2015 8:56 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Dec 04, 2015 10:03 pm

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 :)
B
7
Posts: 24
Reputation: 320


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests