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

how to prevent objects disappearing when they move outside of the room.

ok this is a question i asked in a different thread but thought deserved its own.

when an object moves outside of a room it stops being drawn, under normal circumstances this is perfectly normal but if you alter the prospective using d3d_set_projection_ext this will make it possible to see outside the normal 2d boundries and, as a result objects start randomly disappearing.

in the previous thread it mentioned to alter the view of the room, which i have attempted to do using view, border, and port, none of which have proven effective.

does anyone know a work around so that objects will remain visible even once they go off the edge of the screen?

thank you.
 

flerpyderp

Member
I don't know how to do what you're trying to achieve, but I'm curious about why your attempts at altering the view did not prove effective. The first thing I wanted to ask was why you need things to leave the room and not just the "edge of the screen".
 

TheouAegis

Member
Do the objects just not draw or are they actually getting set to invisible? Can you check that? LOL. In the Predraw event, set visible to !visible?

If there is a function in the manual, I don't know what criteria to search for. :(
 
You should be able to fix this by doing the following...

1) enable a view.
2) set the view (view, not port) size and position to fully encompass everything you want to be visible.
note: you won't actually be using the view to draw anything, because you will be setting a different view and projection using d3d_set_projection_ext.

Alternatively, you could draw your sprites with a 3d model or vertex buffer or by using d3d_draw_floor/wall. These things will not be auto-culled by gamemaker when you draw them outside of the (2d) view.
 
Last edited:
Top