Legacy GM Changing resolution?

N

Navimaster

Guest
I have all of my buttons and layout drawn in Draw GUI.

I am trying to give the player the option to change the resolution of the game
in the "settings" menu, but I want to keep everything scaled properly.

Any suggestions?
 
Last edited by a moderator:

TehCupcakes

Member
Well you haven't given us a lot of details to go off of. Your sprite resolution, xscale, and yscale will be unaltered by a change in resolution. Your view height and width settings let you adjust the "resolution", whereas the view port settings let you adjust the scaling. If you're just looking to upscale (or downscale, as the case may be), I would just modify the view port settings... But this only really looks good if all settings have the same aspect ratio.

You really need to provide more information about what you are seeing as opposed to what you expect to see.
 
N

Navimaster

Guest
Sorry for the lack of detail.

This is my first room
Width: 3000
Height: 1530

View
Width: 3000
Height: 1530

View Port
Width: 1920
Height: 1080

As you can see the view and the size of the room are the same. Only difference being the port.

I've been drawing large png's with draw_sprite(); for my buttons and layout in the GUI layer.

Then I've been using window_set_size(); and display_set_gui_size(); to change the size of the screen and the GUI.

All I want is for the player to be able to set whether they want 1920x1080 or 1280x720

So far everything but draw_text(); has been scaled down proportionally to fit with their place on the screen. I think.

I just need to know if there is a better way to approach this or if I'm doing it right.

Here's a gif of me using those two functions to "change the resolution".
 
Last edited by a moderator:

RangerX

Member
A couple of things:

- With your port smaller than your view, you squish 3000 pixel into 1920 pixels. Basically there's a graphic loss. Is is something you want?
- Saying your change the resolution is misleading (as much for us here or the player), you cant change the resolution with gamemaker you can only SCALE your game to different sizes.
- The application surface and GUI layer are 2 independant layers --- don't forget to resize both the same with you scale up/down
- General note: scaling down always give graphic loss and scaling up by a float value instead of an integer will always cause graphical damage too. (unless you have vector based graphics, 3D, etc)
 
N

Navimaster

Guest
Okay, so I should make the port and room the same size?
I just want to give players the option of changing window size.
That way people with lower resolutions can still enjoy my game.
I was under the impressiong that larger, high-quality PNG graphics would be sufficient for scaling down.
But I guess that's not the way to go?
Still new to this so I apologize for the newbieness.

What is then the preferred way to scale down everything in a game?

Thanks for the feedback by the way.
 

RangerX

Member
Depends what you want. If you want zero graphical damage you scale up, not down. And when you scale up, you might want to scale up on by integer values so there's no graphical deformation.
If you really want your game optimised for 1920x1080, make your graphics with that in mind. That they appear 1:1 scale in 1920x1080. If you go that route and scale down for lower resolution, be aware that there's still alot of people running games in 1366x768.
 
Top