• 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!

Problem with scaling

Megax60

Member
i've followed a tutorial to set fullscreen and to have a good resolution, or scaling, wathever,

the problem is that its distortioned has showed in the image, HELP ME BEFORE I HAVE NIGHTMARES

(ignore X, he is just a placeholder)

here is the code i use to scale the game:

window_set_fullscreen(true);
global.MonitorW=display_get_width();
global.MonitorH=display_get_height();
{
surface_resize(application_surface,global.MonitorW,global.MonitorH)
global.Xoffset=(global.MonitorW);
global.Yoffset=(global.MonitorH);
}
 

Attachments

You are not respecting your aspect ratio when you scale. You are just setting the entire game to the aspect ratio of the screen and hoping everything will look okay.

For example, what's the resolution of your game? (The view or the room or however you are controlling resolution right now)
And what's the resolution of your monitor you are playing on?

Take both and divide the width by the height.

For example if your game is 640x480 your aspect ratio would be 1.33
If your monitor is 1920x1080 your aspect ratio would be 1.77

If those two numbers don't match, you will get distortion. You should check out my tutorial series on resolution and aspect ratio management to learn more.
https://forum.yoyogames.com/index.p...d-aspect-ratio-management-for-gms1-gms2.7106/
 
Top