• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Question/Suggestion: Is Depth Static Now? Can you change an instance's depth after creation?

Is depth now static, or can it still be changed in a single instance after instance creation? I'm glad there's a layer system now, and that things appear mostly as they do in the room editor depth wise. However dynamic depth is necessary for some isometric, 2.5d games, and scaling objects that might be behind something, and then later in front of it. Especially in games with scaling it's not feasible to change it to another object each time it's depth needs to change. There's a way to alter depth on an instance level after the room starts if the game requires it, right? If not, that's my suggestion.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Depth is still there specifically for things like 2.5d or isometric. Look at the function instance_create_depth() in the manual... :)
 

mMcFab

Member
Is depth now static, or can it still be changed in a single instance after instance creation? I'm glad there's a layer system now, and that things appear mostly as they do in the room editor depth wise. However dynamic depth is necessary for some isometric, 2.5d games, and scaling objects that might be behind something, and then later in front of it. Especially in games with scaling it's not feasible to change it to another object each time it's depth needs to change. There's a way to alter depth on an instance level after the room starts if the game requires it, right? If not, that's my suggestion.
Just to add, for isometric/2.5d games, I'd advise you to take a look at order tables in the YoYoDungeon demo (OT_* scripts), use priority lists or the faster "BinaryLists" proposed by user @Ariak. These allow you to sort objects within layers without using depth (which can cause objects to cross layers if you aren't expecting it).
 
Top