BlackCoatDalov
Member
Hey all, got a potentially easy or very hard one here, depending on one's feelings on resolutions and scaling (I find it hard to figure out, hence why I'm here). Recently, we got pixel-perfect resolutions to work in our game, without using the scaling method most people recommend. However, we're now running into a problem where our GUI...well, here's a portion of our GUI at 1920x1080:
Pixel perfection. Well, maybe my icons aren't perfect in an aesthetic sense
Same portion at, say, 1440x900:
...yikes.
I've tried a couple things thus far:
- most of the solutions found at this blog post. they seem to have the same issue, or resize my GUI in odd ways, like being in the middle 1/3rd of the screen
-
this makes the GUI fit the screen, but leads to the degradation seen above. base_width is 480, base_height is 270 (base resolution as our game)
- the same method we used for our resolution scaling, simply applied to the gui layer. Either makes the GUI layer so large it can't display, or resizes it with each resolution, meaning it never fits.
also, this chunka code:
No dice there, GUI got so stretched and contorted, you could call it an Amigara Fault.
With all that in mind, I figure my options are:
-there's some pixel-perfect scaling trick I'm missing
-rewriting the GUI to use the gui width and height methods i just found (works fine for the resizing, but fonts may still be borked)
-finding a different font, along with a combo of the previous option (the smallest this font can go without being garbled is 6, all of the text in the screenshots that doesn't say "Lv. 1" is being transformed to a 0.5 scale)
Any suggestions or easy stuff I'm missing? Apologies for the wall of text, any help is appreciated!
Pixel perfection. Well, maybe my icons aren't perfect in an aesthetic sense
Same portion at, say, 1440x900:
...yikes.
I've tried a couple things thus far:
- most of the solutions found at this blog post. they seem to have the same issue, or resize my GUI in odd ways, like being in the middle 1/3rd of the screen
-
GML:
display_set_gui_maximise(window_get_width()/base_width, window_get_height()/base_height)
- the same method we used for our resolution scaling, simply applied to the gui layer. Either makes the GUI layer so large it can't display, or resizes it with each resolution, meaning it never fits.
also, this chunka code:
GML:
base_width = 480
base_height = 270
gui_x_scale = ceil(window_get_width() / base_width)
gui_y_scale = ceil(window_get_height() / base_height)
gui_scale = max(gui_x_scale, gui_y_scale)
display_set_gui_maximise((window_get_width()/base_width)*gui_scale, (window_get_height()/base_width)*gui_scale)
With all that in mind, I figure my options are:
-there's some pixel-perfect scaling trick I'm missing
-rewriting the GUI to use the gui width and height methods i just found (works fine for the resizing, but fonts may still be borked)
-finding a different font, along with a combo of the previous option (the smallest this font can go without being garbled is 6, all of the text in the screenshots that doesn't say "Lv. 1" is being transformed to a 0.5 scale)
Any suggestions or easy stuff I'm missing? Apologies for the wall of text, any help is appreciated!
Last edited: