This was a great video. The structure was incredibly easy to follow along with and seeing the practical applications visually really let it sink in for me. Keep up the good work!
thanks, great video. Layer and Mask is one of Godot features that much like Tileset is overwhelming at first glance, really take effort to grasp it but once you get used to it it all makes sense.
Thanks for putting together such an easy to follow tutorial. I enjoyed the way you presented the material and didn't make me feel like I was absolutely losing my mind trying to understand this topic. Subscribed!
I'm very new to game development and coding in general. I'd be very keen to see you tutorialize a project like you mentioned here, as you seem to do a good job at explaining what you're doing and why!
Hey, thanks so much! I've been trying to come up with a small project to take folks through start to finish (aside from my Snake tutorial from when I first started the channel) ruclips.net/video/c7HQwxs5y8w/видео.html Stay tuned. And good luck with your gamedev journey! If you get stuck, please come by the Discord and we'll do our best to help out.
Wow. I didn't know the Extra Credit differentiation between setting the layer on a crate, vice setting the mask on the crate, and the wildly different results from the collision with the player. Thanks for that...and your video as a whole.
i like the way you place the URL of the tutorial video in your guthub projects. ty! i also really like it when you put timestamps in your videos. ty ty !! AND I REALLY REALLY appreciate it when you separate you projects from version 1 and version 1.1+ ty ty ty !!!
my brain just refuses to absorb this stuff. (like i do it at start of project in a way i never have to really deal with again) so its good to have wee reference vids i can watch while having a coffee
Wonderful tutorial, helped me out a bunch! But just wondering whether you could do a tutorial on how to make pushable objects for a top down game like you did with the rock above the secret ladder.
Yep, I just remember that the top one is not for detection. It's odd sure but that's how I keep it in mind, I am super lazy about naming them though. >.
Is this a project you are working on or just something you threw together for this video? I have an idea for a 2D game and some of these concepts you showed would translate to my idea really well and was wondering if you had the project files available?
if you want to do the free travel thing but with multiple object how would yo do it? because idk if godot creates a different "script" per obj so Im not sure about changing the script in case it affects every instance
I would probably use composition. You’d create a node that can be dropped onto any object that might “care” about being in free travel. It probably wouldn’t do much more than handle that flag and allow you to read or write it. Then, whenever relevant, then you could check for whether an object is part of that system with has_method (one of many ways to check if an object adheres to some standard such as being a part of the “free travel” system you’ve written) and then act accordingly. Godot is full of ways (perhaps too many) to set up these kinds of systems. You could have a group that you apply to things that need to be part of free travel (and you can add/remove things from groups all the time), you could use metadata (I don’t recommend this, but sometimes it makes sense), you could even use inheritance to bubble up this property to anything you want as part of your “free travel” system. Godot is designed to allow you to mix inheritance and composition, but I feel like it favors composition more. You might find this video on composition v inheritance very helpful: ruclips.net/video/74y6zWZfQKk/видео.html
@J3ff_K1ng That’s the right answer! Nothing beats trying it yourself. Good luck! If you get stuck or want feedback, please come by the Discord (link in bio) and someone will give you a nudge :) Happy coding!
Hi there. I'm sure the issue you're trying to solve is more complex than you've shared here so it's going to be tough to give you an answer. Have a look at the "pickable" property. That may help.
@@baconandgames i solved my problem using button instade of area2d... however here is my problem in detail... terget: multiple playing_card instance with area2d, when mouse entered on that card that card should bounce a little to indicate you are on that card. problem: now every thing is working, but IF YOU HAS 2 CARD PARTIALLY ON TOP OF EACH OTHER, BOTH OF THEM ARE BOUNCING. where i wanted to mask out active area of down_card with top_card. like if visually you are not on top a card, that card should not do the bouncing. I hope, i am more or less successful to tell you the problem.
@godofdream9112 my guess is you have code on each card node that’s handing that bouncing you described. One way to solve this problem is not to let each card, which know nothing about out each other, manage that behavior. If you had a manager that all the cards reported into looking at “which one is being hovered” it to make sure that only the one you want shows the effect you’re after. So the cards would report information about how/when they’re being interacted with and the manager would have access to their properties and could decide for ALL cards how each cards behave. Think of it like a conductor in an orchestra being responsible for keeping time for everyone playing, rather than each musician having their own metronome.
I would but the change is negligible. Tilemaps have layers contained within them as a drop down. Tilemap layers are those layer drop downs exploded into individual nodes. That’s really the main difference. Everything else in this video applies to TilemapLayers.
@@baconandgames Okay I'm very new to this engine so I thought it was major change. I added a physic layer 0 to a couple of tiles but my character can still walk over them instead of being blocked. I made sure I added the necessary collision layers to the Tilemap and Player. Does your Hero node contain another component affecting collision?
I think they shouldnt have called it "mask". I think they were using the programming terms(since its a bitwise mask). Instead they should have called it something else I think
Great stuff, a lot of tutorials tend to forget that physics layers exist or never care to explain how it works.
Thanks!
Thank you for the vid! Too many times have randomly clicked on the layers and masks hoping stuff just "clicks together" lol
You’re welcome!
This was a great video. The structure was incredibly easy to follow along with and seeing the practical applications visually really let it sink in for me. Keep up the good work!
Oh gosh. Thank you so much. YT is a rough gig. I don’t know how much you realize comments like this mean. 🥹
Good and decently short video. I think it is great that a tutorial focuses on one single topic instead of trying to do too much. Thanks.
Thanks! I like the one topic format as well 🙂
really appreciate all the various examples of using collision layers and masks! awesome tutorial!
🤜🤛 I’m glad you found it helpful!
Great video, Bacon - really helpful! Would love to see the video about the interactions in code.
Thanks! I’ll add that to my list.
thanks, great video. Layer and Mask is one of Godot features that much like Tileset is overwhelming at first glance, really take effort to grasp it but once you get used to it it all makes sense.
You’re welcome! Thanks for watching and for the kind words. 🙏
wow you are seriously a fantastic teacher, you explained all of this better than 99% of the tutorials i have watched on here
🥹
👉👈
- thank you
Thanks for putting together such an easy to follow tutorial. I enjoyed the way you presented the material and didn't make me feel like I was absolutely losing my mind trying to understand this topic. Subscribed!
Thank you, thanks very kind of you to say!
I'm very new to game development and coding in general. I'd be very keen to see you tutorialize a project like you mentioned here, as you seem to do a good job at explaining what you're doing and why!
Hey, thanks so much! I've been trying to come up with a small project to take folks through start to finish (aside from my Snake tutorial from when I first started the channel) ruclips.net/video/c7HQwxs5y8w/видео.html
Stay tuned. And good luck with your gamedev journey! If you get stuck, please come by the Discord and we'll do our best to help out.
Wow. I didn't know the Extra Credit differentiation between setting the layer on a crate, vice setting the mask on the crate, and the wildly different results from the collision with the player. Thanks for that...and your video as a whole.
You're very kind. Thanks for watching and for the kind words. Good luck with your project!
I think you are probably one the best godot/gamedev teachers that I discover searching for these topics.
Keep up the great work!
Aw geez. Thank you. What a kind thing to say. 🥹
very useful video! it helped me understand quickly and easily the difference between the two and how to use them. thank you very much
I’m so glad! Good luck with your project 👏
This is so well put and easy to understand. Thank you. Fantastic video.
I appreciate that. Thank you 🙏
thanks for the video it helped me understand the physics layers and how to think about godot
Lovely! Thanks for the kind words!
Great explanation and examples! I needed that. Yes do another vid on the coding side of interactions please.
Right on, thanks! 🙏
Oh my god, you saved me! I for the love of god do not know what is collision layer and mask, so thank you!
I know that feeling (and I still struggle from time to time with it). I'm glad this helped! Good luck with your project!!!
i like the way you place the URL of the tutorial video in your guthub projects. ty!
i also really like it when you put timestamps in your videos. ty ty !!
AND I REALLY REALLY appreciate it when you separate you projects from version 1 and version 1.1+ ty ty ty !!!
You’re welcome you’re welcome ☺️
Sick video! This will be super handy for beginners learning about collisions
Aww. That’s the hope. Thanks so much for watching! 🙏
thank you! it helped me a lot
Glad it helped!
my brain just refuses to absorb this stuff. (like i do it at start of project in a way i never have to really deal with again)
so its good to have wee reference vids i can watch while having a coffee
I love that. I’m renaming the channel to Bacon and Games and Coffee 😀
Thank you! Very helpful :)
Thank you :) 🙏
Very cool and helpful
🙏
excellent tutorial!
Thank you 🥹
Wonderful tutorial, helped me out a bunch! But just wondering whether you could do a tutorial on how to make pushable objects for a top down game like you did with the rock above the secret ladder.
I think this video covers it but let me know if you get stuck:
ruclips.net/video/FSOh-yH2FyA/видео.html
great video!
❤️
thank you! earned a sub
Thank YOU ☺️
Too underated ❤❤
🙌
Yep, I just remember that the top one is not for detection. It's odd sure but that's how I keep it in mind, I am super lazy about naming them though. >.
Naming is a good practice to get into and it doesn’t take that long. Be kind to your future self. Name your layers and masks. 🌈
Is this a project you are working on or just something you threw together for this video? I have an idea for a 2D game and some of these concepts you showed would translate to my idea really well and was wondering if you had the project files available?
It’s a prototype I’m working on but I’m not very far along. I’ll give you a copy of the project if you want.
@@baconandgames I would love that!!
@DeadIndGames drop into my Discord and shoot me a DM. I’ll zip it up for you.
@@baconandgames okay when I get a chance to hop on I'll do that! Thanks!
@DeadIndGames 👍
if you want to do the free travel thing but with multiple object how would yo do it?
because idk if godot creates a different "script" per obj so Im not sure about changing the script in case it affects every instance
I would probably use composition. You’d create a node that can be dropped onto any object that might “care” about being in free travel. It probably wouldn’t do much more than handle that flag and allow you to read or write it. Then, whenever relevant, then you could check for whether an object is part of that system with has_method (one of many ways to check if an object adheres to some standard such as being a part of the “free travel” system you’ve written) and then act accordingly. Godot is full of ways (perhaps too many) to set up these kinds of systems. You could have a group that you apply to things that need to be part of free travel (and you can add/remove things from groups all the time), you could use metadata (I don’t recommend this, but sometimes it makes sense), you could even use inheritance to bubble up this property to anything you want as part of your “free travel” system. Godot is designed to allow you to mix inheritance and composition, but I feel like it favors composition more. You might find this video on composition v inheritance very helpful: ruclips.net/video/74y6zWZfQKk/видео.html
@baconandgames I think I get it, I'm gonna code it and see what happens
Thank you so much
@J3ff_K1ng That’s the right answer! Nothing beats trying it yourself. Good luck! If you get stuck or want feedback, please come by the Discord (link in bio) and someone will give you a nudge :) Happy coding!
how to ensures that the mouse input will not interact with the bottom Area2D when the top Area2D is overlapping. same node instances.
Hi there. I'm sure the issue you're trying to solve is more complex than you've shared here so it's going to be tough to give you an answer. Have a look at the "pickable" property. That may help.
@@baconandgames i solved my problem using button instade of area2d... however here is my problem in detail...
terget: multiple playing_card instance with area2d, when mouse entered on that card that card should bounce a little to indicate you are on that card.
problem: now every thing is working, but IF YOU HAS 2 CARD PARTIALLY ON TOP OF EACH OTHER, BOTH OF THEM ARE BOUNCING. where i wanted to mask out active area of down_card with top_card.
like if visually you are not on top a card, that card should not do the bouncing.
I hope, i am more or less successful to tell you the problem.
@godofdream9112 my guess is you have code on each card node that’s handing that bouncing you described. One way to solve this problem is not to let each card, which know nothing about out each other, manage that behavior. If you had a manager that all the cards reported into looking at “which one is being hovered” it to make sure that only the one you want shows the effect you’re after. So the cards would report information about how/when they’re being interacted with and the manager would have access to their properties and could decide for ALL cards how each cards behave. Think of it like a conductor in an orchestra being responsible for keeping time for everyone playing, rather than each musician having their own metronome.
Can you do one on Tilemap layers? Tilemap is deprecated.
I would but the change is negligible. Tilemaps have layers contained within them as a drop down. Tilemap layers are those layer drop downs exploded into individual nodes. That’s really the main difference. Everything else in this video applies to TilemapLayers.
@@baconandgames Okay I'm very new to this engine so I thought it was major change. I added a physic layer 0 to a couple of tiles but my character can still walk over them instead of being blocked. I made sure I added the necessary collision layers to the Tilemap and Player. Does your Hero node contain another component affecting collision?
@diotone5580 find me in my Discord channel. I’ll give you the project so you can see how I have it set up. 😃
@@baconandgames Will do, thanks!
I think they shouldnt have called it "mask". I think they were using the programming terms(since its a bitwise mask). Instead they should have called it something else I think
I suspect you are correct about that