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

Pixel Perfect and "Pixel Snapped" GUI

C

cauehsf

Guest
Hi guys, I need to make my GUI layer "pixel-perfect", and found no clue around here..

The blue cube is being drawn in the "Draw GUI" event
The white cube is being drawn in the "Draw" event

GML:
//I want the blue cube to behavior like the white one while rotating.
//But found nothing like this for GUI layer:
surface_resize(application_surface, 240, 240);

//Just a quick edit, I already did this, and had no progress:
display_set_gui_size(240, 240);
Anyway of doing that? Thank you for reading!

GUIPixelPerfect.gif
 

FoxyOfJungle

Kazan Games
Where are you calling these functions from?
If you used display_set_gui_size(), it would be mandatory to change it. Are you reversing the size somewhere in the code after using this function?
 

TrunX

Member
Oh is it still a thing? I think I reported a bug in GameMaker Studio 1 times that using the draw_[shape]() functions on a GUI layer ignores the GUI resolution and is always drawn sharp in the monitor resolution.

My workaround was to use the post-draw event instead and never checked if it got solved. But maybe its smth. different in this case.
 
C

cauehsf

Guest
Where are you calling these functions from?
If you used display_set_gui_size(), it would be mandatory to change it. Are you reversing the size somewhere in the code after using this function?
Nope, no changes at all, I'm calling this function on the "Create Event" of my "objCamera", and never calling it again.
 
C

cauehsf

Guest
Oh is it still a thing? I think I reported a bug in GameMaker Studio 1 times that using the draw_[shape]() functions on a GUI layer ignores the GUI resolution and is always drawn sharp in the monitor resolution.

My workaround was to use the post-draw event instead and never checked if it got solved. But maybe its smth. different in this case.
Seems like a great solution, but one thing bother me, do you need to sum every single position with your camera's x and y? I don't see this as a good thing, though it's a great workaround..
 
Top