Draw things on top each other - Depth sorting [Game Maker | Basics]

Channel:
Subscribers:
11,800
Published on ● Video Link: https://www.youtube.com/watch?v=igp2Ac_X_Jo



Category:
Tutorial
Duration: 5:07
1,882 views
66


This basics video tutorial shows you how to depth sort (depth system) in GameMaker.

Things feel natural if they are being draw correctly. Image a stack of cards and it is obvious that the top card would be visible to you. So what we do is to check where the instances are and sort them to their own depth (or their own layer so to say) according to their y position in the room. We cluster all the instances into a parent object and swap their current depth to their -y value. We do that with the "with" statement that allows use to go through all the instances and swap their own depth. That's it!

Advanced version of controlling depth:
https://www.youtube.com/watch?v=8QCgN2RDA9I


(Free) Art shown in the project and in video thumbnail:
Ansimuz CC0
https://opengameart.org/content/tiny-rpg-forest


👑 Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie

Follow me on:
📸 Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
💬 Discord: https://discord.gg/gvr98nb
📜 Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)


CHAPTERS
-------------------------------------------------------------------------------------------------------
0:00 What we will do
0:59 Subscribe
1:11 Theory of depth and how things are being draw
2:03 Depth sorting
2:37 Grouping instances into a parent object to sort
3:44 Pitfalls of this depth sorting







Tags:
game maker tutorial
game maker studio tutorial
gamemaker studio 2 tutorial
gamemaker depth sorting tutorial
gamemaker depth sorting video
gamemaker depth sorting video tutorial
gamemaker studio depth sorting
gamemaker studio depth sorting tutorial
gamemaker depth sorting
gamemaker draw instances on top of another
how to draw instances on top of each other gamemaker
gamemaker studio depth system
gamemaker depth system tutorial
gamemaker depth system