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

[SOLVED] Game not stretching properly even though I'm scaling by x2

M

mb10

Guest
Hey everyone,

So i have a pixel game, the view is set to 360x640 (9:16) in the room and the port on screen is set to 720x1280 so I'm basically stretching/scaling it by x2, but somehow the pixels are getting distorted making it look really ugly and i can't seem to find a way to fix it.

here is how it looks:





and here is how that sprite is supposed to look:




If anyone is wondering why I'm using windowed mode instead of full screen, its because Game Maker automatically stretches my game to 607.5x1080 which makes the problem even worse (so if there is a way to make it full screen but with borders on the top and bottom that would be a plus!).

Thanks!
 

TsukaYuriko

☄️
Forum Staff
Moderator
If you require anything but the standard handling of fullscreen drawing, you will have to implement scaling yourself. For further reference: How to properly scale your game

That aside, ensure that you're drawing your sprites at integer coordinates (round the values while drawing). Drawing at float coordinates may cause distortions.
 
M

mb10

Guest
If you require anything but the standard handling of fullscreen drawing, you will have to implement scaling yourself. For further reference: How to properly scale your game

That aside, ensure that you're drawing your sprites at integer coordinates (round the values while drawing). Drawing at float coordinates may cause distortions.
I'm already rounding the coordinates and still i'm having this problem.

I'm honestly surprised as to why this is hapening since all im doing is stretching it by x2 :/ ?!
 

TsukaYuriko

☄️
Forum Staff
Moderator
Depending on exactly how your GPU handles upscaling, results like these may or may not have to be expected when you're using the default scaling method provided by a view's port on screen property or the default fullscreen toggle. If you wish to manually control this behavior, you will have to take over scaling yourself, as mentioned before.
 
M

mb10

Guest
Depending on exactly how your GPU handles upscaling, results like these may or may not have to be expected when you're using the default scaling method provided by a view's port on screen property or the default fullscreen toggle. If you wish to manually control this behavior, you will have to take over scaling yourself, as mentioned before.
I already tried doing the scaling manually by scaling the surface and i still get the same results.
 

RangerX

Member
Are you sure about the phone resolution?
Wasn't there a thing where on mobile the "display get" family of functions could return a wrong size? ***possibility of bad memory here

One thing is for certain. Your image there is not scaled by 2. The image is actual proof. Something is going on.
 

TsukaYuriko

☄️
Forum Staff
Moderator
One thing is for certain. Your image there is not scaled by 2. The image is actual proof. Something is going on.
... good catch, I wouldn't even have noticed that. :p

According to the screenshot in the opening post, your screen's resolution (1080 pixels high) isn't even as big as the resolution you're trying to scale things to (1280 pixels high)... that is, unless a vertical portion of the screen is cut off from the screenshot.
 

Electros

Member
Hey everyone,

So i have a pixel game, the view is set to 360x640 (9:16) in the room and the port on screen is set to 720x1280 so I'm basically stretching/scaling it by x2, but somehow the pixels are getting distorted making it look really ugly and i can't seem to find a way to fix it.

here is how it looks:





and here is how that sprite is supposed to look:




If anyone is wondering why I'm using windowed mode instead of full screen, its because Game Maker automatically stretches my game to 607.5x1080 which makes the problem even worse (so if there is a way to make it full screen but with borders on the top and bottom that would be a plus!).

Thanks!
Perhaps drop a shot of your windows graphics setup in case there is an issue there with your scaling setup or other?

Graphics_Setup.png
 
S

Shatter

Guest
What's the vertical resolution of your monitor?

If it is less than 1280 the window will be reduced in size, which will cause this issue also.

Even if your monitor is exactly 1280 high, you are running in windowed mode so the client area will be reduced. You'd have to be running a screen which is around 1400 pixels vertical, which would be very unusual.
 
M

mb10

Guest
Are you sure about the phone resolution?
Wasn't there a thing where on mobile the "display get" family of functions could return a wrong size? ***possibility of bad memory here

One thing is for certain. Your image there is not scaled by 2. The image is actual proof. Something is going on.
... good catch, I wouldn't even have noticed that. :p

According to the screenshot in the opening post, your screen's resolution (1080 pixels high) isn't even as big as the resolution you're trying to scale things to (1280 pixels high)... that is, unless a vertical portion of the screen is cut off from the screenshot.
What's the vertical resolution of your monitor?

If it is less than 1280 the window will be reduced in size, which will cause this issue also.

Even if your monitor is exactly 1280 high, you are running in windowed mode so the client area will be reduced. You'd have to be running a screen which is around 1400 pixels vertical, which would be very unusual.

I solved the problem yesterday (i just forgot to update this thread) and yes you guys are right, the window wasn't extending to 1280px, it was only extending to the windows task bar (somehow i didn't notice that at first even though the task bar is transparent), the whole reason i was using windowed mode instead of full screen was because i thought the window would extend beyond my display limit, turns out it wasn't a very smart assumption.

Thank you everyone. :D
 
Top