• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

GMS 2 Game Not Scaling Correctly When in Fullscreen

I have a game where it's camera size is 640x360 and the viewport is 1280x720 and when the game is run in Windowed Mode, it displays fine (no pixel distortion). But, when I set it to full screen, (using a 1080p monitor) the pixels get stretched (even though it shows black bars and I have it set to keep aspect ratio).

How can I fix this so the black bars appear to keep it's aspect ratio? Here's the code I have in the o_camera Object:

GML:
// Create Code

/// @description Camera

target_ = Auto_Scroll;
width_ = camera_get_view_width(view_camera[0]);
height_ = camera_get_view_height(view_camera[0]);

// Begin Step

if instance_exists(target_) {
    x = target_.x;
    y = target_.y;
}

// End Step

if !instance_exists(target_) exit;
x = lerp(x, target_.x, 0.1);
y = lerp(y, target_.y, 0.1);
x = round_n(x, 1);
y = round_n(y, 1);
x = clamp(x, width_/2, room_width-width_/2);
y = clamp(y, height_/2, room_height-height_/2);
camera_set_view_pos(view_camera[0], x-width_/2, y-height_/2,);
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
Have you tried simply ticking the "Keep Aspect Ratio" option in the Graphics tab of the Game options for the target platform?
 

KiD_Rager

Member
Off the get-go, upscaling usually distorts the quality when going into full screen mode if your game is at a much smaller size.

It's also possible that GM is not keeping the aspect ratio the same when going full screen. There should be a Keep Aspect Ratio thing somewhere in your Options. See if that works.
 
Have you tried simply ticking the "Keep Aspect Ratio" option in the Graphics tab of the Game options for the target platform?
Off the get-go, upscaling usually distorts the quality when going into full screen mode if your game is at a much smaller size.

It's also possible that GM is not keeping the aspect ratio the same when going full screen. There should be a Keep Aspect Ratio thing somewhere in your Options. See if that works.
Thank you for the replies. Yes I have set it to "Keep Aspect Ratio" Here's what I have checked:

screenshot_options.png
Here's the difference between the windowed 720p and the full screen:

screenshot_fullscreen.png
 
Top