• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Sony Xperia Z2 Scaling

T

Tomaato

Guest
Hi there!

For the game I am currently working on I use my Sony Xperia Z2 as Debug device.
As some of you might know the screen is 1920x1080, so it's a normal 16:9 ratio.

But the Xperia line (and I think the Nexus too) has a feature that is bugging me while debugging (pun not intended).
Unlike most Android phones, the Xperia does not have the home, back and menu buttons on the device itself.
Instead they cover the lower part of the phones screen as they have an overlay or disapear on most apps until je swipe them back up.
device-sony-xperia-z2.jpg
However, GameMaker for some reason makes them a solid black box on the bottom of the screen. This cuts into the screensize. GameMaker proceeds to scale the game to the new size (I don't even know the new scale, probably close to 1800x1080).
Does someone know how to change this? I really suck at scaling the game to fit any screen size, so that is not really an option (eventualy I will).

Thanks!
Tom Hodgson
 

RangerX

Member
There might be something about GMS resizing the application surface, window and all that versus that phone model that causes this.
I suppose that to get around this you would need to take the total control of what you display. And it doesn't matter if you suck because I just made a tutorial that's gonna be useful to you actually:

https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

By scaling the game yourself you will probably fix this problem. :)
 
T

Tomaato

Guest
There might be something about GMS resizing the application surface, window and all that versus that phone model that causes this.
I suppose that to get around this you would need to take the total control of what you display. And it doesn't matter if you suck because I just made a tutorial that's gonna be useful to you actually:

https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

By scaling the game yourself you will probably fix this problem. :)
Thanks! I'll take a look right now!

EDIT: I tried to follow the instuctions, and it may sound strange to people for whom this is a piece of cake, but when I got to the part about surfaces I lost it. I have no clue what to do or how to do it. And when trying to figure out surfaces, I got even more confused with directions for a backupcode because it said drawing a surface yourself is not always stable.

Maybe someone else has an easier way?
 
Last edited by a moderator:

Carnivius

Member
On my Xperia M4 Aqua those buttons get hidden and the game scales correctly. They have to be swiped back into view when needed (and they overlay onto that part of the game screen rather than have the game screen squish. I don't know if there's an option on the Xperia phones to toggle between how it works on my phone and how it works on yours though but certainly on mine there's no issue with Game Maker games.
 
Top