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

GameMaker [SOLVED] black screen when using really low depth

R

RicardoVL

Guest
Hi All,

My objects have a depth = -y and when i walk down like 15000px my screen turns black.
Is there something to do about that?
If not, what is the max depth i can use?


ANSWER:

There is a minimum and maximum layer depth of -16000 to 16000.
 
Last edited by a moderator:
You could also try putting this code somewhere in your game:
layer_force_draw_depth(true,0);

Seems to work for me (I also use depth = -y)
 
From the documentation on instance_create_depth:

IMPORTANT! There is a minimum and maximum layer depth of -16000 to 16000. Anything placed on a layer outside that range will not be drawn although all events will still run as normal.
 
Top