#[SOLVED] Game draws stuff outside of its boundaries!

1 messages · Page 1 of 1 (latest)

lucid star
#

Hello,

i've been having this problem for a long time now but since im polishing everything in my game to prepare for a test build for my game testers i've decided to finally fix this.

I own an 21:9 monitor but my game doesnt support that resolution and im too far in to just "add it". Afaik i've never made any changes to this, but im able to draw beyond these borders. The game itself renders correctly.

the 0,0 point is also correctly set. with it being the top left if it were a 16:9 monitor.

i've added two pictures of how it looks right now and how it should be.

thanks in advance :D

deep bear
#

if you are drawing anything in the post draw event or the pre draw event, they are bound to the window size not gui size

lucid star
#

Nope-- all done within Draw GUI

deep bear
#

are you using display set gui maximised

lucid star
#

as far as i can see, nope

deep bear
#

you dont set your gui size anywhere?

lucid star
#

Never thought i needed to do that. But adding display_set_gui_size(1920, 1080) sadly doesnt fix the problem

lucid star
#

huh... interesting... so i made a new project real quick and drew something outside the Intended area and it even happens there... interesting

deep bear
#

are you drawing it to a negative position?

lucid star
#

yes

deep bear
#

well, yeah, haha that would do it

lucid star
#

haha, but wouldnt game maker make these black bars so nothing could get drawn there? 🤔

deep bear
#

those black bars are under the gui, and to the sides othe application surface

lucid star
#

ooooooooooh

deep bear
#

they are still within the view frustum, just with negative world coordinates

#

tbh i kinda had a feeling thats what you were doing i should i have asked first lol

lucid star
#

hahaha no worries. So i guess the best solution is to make the black bars for the GUI myself?

deep bear
#

i think it would be better to just not draw anything to negative positions

lucid star
#

yea i know. but for instance the Background of my Main Menu is zoomed in at launch which causes it to extend outside

deep bear
#

ah gotcha yeah

#

then a couple of draw rectangles in draw gui end event prolly do ya good

lucid star
#

exactly what i was thinkin'

#

Alrighty then! Thank you!