[GameMaker] Simple Depth Sorting (Normalized)

preview_player
Показать описание
#gamemaker #indiedev #gamedev #programming

A quick video showing a method to use instead of "depth = -y" for simple depth sorting.

------------------------------------

Рекомендации по теме
Комментарии
Автор

This is a great solution, thanks! I was able to get it working, but had issues with my room backround layer depth values being smaller than the room height, which obscured instances in the room. Solution was to increase the background layer depth values quite a lot. Feels a little hacky but it works I guess.

For anyone with the same issue in the future, my room size is 2560x1440. I have multiple background layers. I set the depth of the nearest background layer to 3000, then 3001, etc. Depth at 3000 to leave space for more layers inbetween the instances and the nearest layer but also nearly double the room height (1440). My instances can also be seen outside the room from the camera, so I also accounted for that additional distance.

Also had issues with GMS2 changing the depth values that I had just set. Not sure if thats a bug or me doing something wrong but for now, it's working. I'll reply to this comment if things change later.

jamesbaconreid
Автор

Thank you for this incredible video, very incredible method helped me solve a problem, but now when I go very high up in my room the player disappears, do you know if there is a solution?

xiolight
Автор

Good job, thank you. I used depth = -bbox_bottom and it had been awful to manage

Bokaley
Автор

Question: what about tile sets? What if I have like areas of a room which are on a higher level, like some higher cliff? (edit: or like a building with multi-storey tilesets?)

SGTIvan
Автор

Great Insight, was struggling with -bbox_bottom and with what I had. Appreciate you sharing with the public!

ariessuggs
Автор

How do you make this work with objects inside a sequence?

RafaelEstrada