• 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 GMS2 Help with scaling for mobile

emicarra

Member
Hello, i'm trying to scale the view port to be the biggest possible without changing camera size and while keeping the aspect ratio. And then bring the view port to the top of the screen, so i have enough room on the bottom of the screen to add buttons, which i know i can achieve by using gui_maximize.

I tried using the built in option Keep Aspect Ratio, but the problem with this is that it doesn't make it pixel perfect, i can notice distorted pixels. So i tried coding it by myself reading the manual, but i can't understand why it doesn't work, changing the view port size with 'view_set_wport' doesn't have any effect, so how can i get the view port to its maximum size on the screen without changing the camera size?

This is my desired result:

screen.png
 

emicarra

Member
This is how it looks with built in Keep Aspect Ratio on mobile.
(On windows looks fine because it's on a window, i guess it would look distorted if you switched to fullscreen)
Screenshot_2019-08-07-15-19-56.png
 
Top