Hey Friends, thanks for watching! As a tip, I commented as much as I could with the inline documentation techniques within the Godot 4 Editor, so if you grab the code from the Github link, you can search the documentation for each of the custom classes! And a bunch of the export vars should have tooltips when you hover over the values. Honestly, this saves so much time trying to remember what some random vars do on your 400th shrub scene.
This was a great tutorial to learn about composition. I'm still a beginner in how to code in general so I was a bit confused trying to see where all the code comes together so I had to rewind a lot.
Interesting that you don't use any custom Resources. Have you considered how they may work with a compositional system like this? I have recently started using Resources and they seem quite powerful for compositional systems.
Hey man, love the vid but i got a problem with the Velocity module, im using the latest version of godot, I get the error : " Cannot call non-static function "is_on_floor()" on the class "CharacterBody2D" directly. Make an instance instead. " Any idea on how to fix it? Thx for the vid btw
Hey, thanks for the comment! This tutorial was done in 4.2, so maybe something broke with 4.3? Can't recall off the top of my head what my syntax was, but I'd guess instantiate() the CharacterBody2D and then use is_on_floor() on the var that was instanced. Lmk if that's a non-start also!
@@jacobfoxe4691 Yo! Wasnt expecting an answer really. Somewhat fixed the issue? Now the error is "Cannot call method "is_on_floor" on a null value" on the handleVelocity, i also get a error on the player script with velocityNode.handleVelocity(delta). This is my first time looking at composition and its kinda hard lol
personally, i'd set the individual node export var to automatically choose the parent characterbody IF the variable is null. Otherwise, I do like the idea of being able to set up the parent node manually, i usually just set it to get_parent().get_parent() lmao
Honestly, I do really like this method, as well! It's waaaay easier/cleaner (sometimes) to have children "register themselves" with their parents. I do like what I did in the video because it yells at me if I try to run the project without things set up, but it's a LOT of clicking for sure.
damn the glowing border around the sub button ar 1:44 was awesome. first time i saw that. was that something u needed to code yourself or a new feature from yt?
question abt naming: u name a few funcs differently, e. g. checkMailInput() and deliver_mail(), same with vars: mailBag, mail_target, etc. Is there any reason / tie to ur architecture logic why switch between these naming conventions? edit: another question, u mentioned that module containers can be modules too, how would u enforce that? just add an export group in that module container for the required modules?
Just a mix of habits accrued over years in different industries and languages, honestly! I've been trying to standardize my coding style for future tutorials, but I'm a work in progress! Here's the Godot Style link in case anyone's curious: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html Per the module containers, yeah, that'd be one way to do it! At least, it'd be a good way of keeping track of which nodes are where.
I always diagram out a project before starting, but I'm historically TERRIBLE at showing that in videos! It's something I'm actively working on incorporating into future tutorials and demos!
@@ScumlordStudio I'm not sure, I've been playing MapleStory since 2005 until now, I would recognize it haha. I think it's this OST from Stardew Valley (I've also played Stardew Valley) th-cam.com/video/7WuKj7a3ces/w-d-xo.html play the link from min 1:22
Your manner of speaking while you explain things feels insulting since I am not a child (and I'd probably still be miffed even then), but this is still a good tutorial. I've been trying to find a tutorial that was more than "here's my composition nodes. Look, I can put this health component on this NPC _and_ this player. WoOooOOo~." without ever actually explaining how it works. Most of it was pretty obvious, but the part that had always escaped me before was connecting things once you added them. My OOP addled brain would always try to connect them in the parent class making the system _mostly_ redundant. At least then the change wouldn't necessitate modifying everything that used that component if I decided to add or remove one from an entity. So I essentially had just adapted the modularization to OOP principles without actually taking full benefit of the composition's strengths. So you and Godotoneer's videos were the only ones that were helpful (but the latter is long and takes me a few days to actually watch through with how dry it is despite it being _very_ informative). So thank you for making this tutorial, and I'll _try_ sitting through more of your tuts in the future since it's quite clear that you know what you're doing unlike people who regurgitate the bare minimum and only specifically as it applies to their system.
Hey Friends, thanks for watching!
As a tip, I commented as much as I could with the inline documentation techniques within the Godot 4 Editor, so if you grab the code from the Github link, you can search the documentation for each of the custom classes!
And a bunch of the export vars should have tooltips when you hover over the values. Honestly, this saves so much time trying to remember what some random vars do on your 400th shrub scene.
This was a great tutorial to learn about composition. I'm still a beginner in how to code in general so I was a bit confused trying to see where all the code comes together so I had to rewind a lot.
Please don't stop posting tutorial/guides videos.
Where's the third video???
Amazing lesson. Subscribed hoping that you'll release the next part!
Interesting that you don't use any custom Resources. Have you considered how they may work with a compositional system like this? I have recently started using Resources and they seem quite powerful for compositional systems.
This was very helpful, thank you
Hey man, love the vid but i got a problem with the Velocity module, im using the latest version of godot,
I get the error :
" Cannot call non-static function "is_on_floor()" on the class "CharacterBody2D" directly. Make an instance instead. "
Any idea on how to fix it?
Thx for the vid btw
Hey, thanks for the comment! This tutorial was done in 4.2, so maybe something broke with 4.3? Can't recall off the top of my head what my syntax was, but I'd guess instantiate() the CharacterBody2D and then use is_on_floor() on the var that was instanced. Lmk if that's a non-start also!
@@jacobfoxe4691 Yo! Wasnt expecting an answer really.
Somewhat fixed the issue? Now the error is "Cannot call method "is_on_floor" on a null value" on the handleVelocity, i also get a error on the player script with velocityNode.handleVelocity(delta).
This is my first time looking at composition and its kinda hard lol
personally, i'd set the individual node export var to automatically choose the parent characterbody IF the variable is null. Otherwise, I do like the idea of being able to set up the parent node manually, i usually just set it to get_parent().get_parent() lmao
Honestly, I do really like this method, as well! It's waaaay easier/cleaner (sometimes) to have children "register themselves" with their parents. I do like what I did in the video because it yells at me if I try to run the project without things set up, but it's a LOT of clicking for sure.
Thank you for this video.
you forgot to link the previous episode in the description
damn the glowing border around the sub button ar 1:44 was awesome. first time i saw that. was that something u needed to code yourself or a new feature from yt?
haha that surprised me as well! Must be a YT feature because I definitely didn't do anything!
Yeah it’s a new TH-cam feature. I’ve been seeing it for a very long time on a bunch of channels
question abt naming: u name a few funcs differently, e. g. checkMailInput() and deliver_mail(), same with vars: mailBag, mail_target, etc. Is there any reason / tie to ur architecture logic why switch between these naming conventions?
edit: another question, u mentioned that module containers can be modules too, how would u enforce that? just add an export group in that module container for the required modules?
Just a mix of habits accrued over years in different industries and languages, honestly! I've been trying to standardize my coding style for future tutorials, but I'm a work in progress! Here's the Godot Style link in case anyone's curious: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
Per the module containers, yeah, that'd be one way to do it! At least, it'd be a good way of keeping track of which nodes are where.
Do you just remember everything or are you using a diagram to follow how everything is connected?
I always diagram out a project before starting, but I'm historically TERRIBLE at showing that in videos! It's something I'm actively working on incorporating into future tutorials and demos!
Did anyone have a trouble with Y sort enabled when implementing workflow like he did?
5:00 maplestory music :)
I think is stardew valley music xd
@@elpatatas2561 nope at 5 minutes this is 100% maplestory
@@ScumlordStudio I'm not sure, I've been playing MapleStory since 2005 until now, I would recognize it haha. I think it's this OST from Stardew Valley (I've also played Stardew Valley)
th-cam.com/video/7WuKj7a3ces/w-d-xo.html
play the link from min 1:22
@@ScumlordStudio It's Stardew Valley, more specifically "Spring (Wild Horseradish Jam)"
📝📝📝📝📝
me frantically writing code for part 3
Your manner of speaking while you explain things feels insulting since I am not a child (and I'd probably still be miffed even then), but this is still a good tutorial.
I've been trying to find a tutorial that was more than "here's my composition nodes. Look, I can put this health component on this NPC _and_ this player. WoOooOOo~." without ever actually explaining how it works. Most of it was pretty obvious, but the part that had always escaped me before was connecting things once you added them. My OOP addled brain would always try to connect them in the parent class making the system _mostly_ redundant. At least then the change wouldn't necessitate modifying everything that used that component if I decided to add or remove one from an entity. So I essentially had just adapted the modularization to OOP principles without actually taking full benefit of the composition's strengths.
So you and Godotoneer's videos were the only ones that were helpful (but the latter is long and takes me a few days to actually watch through with how dry it is despite it being _very_ informative).
So thank you for making this tutorial, and I'll _try_ sitting through more of your tuts in the future since it's quite clear that you know what you're doing unlike people who regurgitate the bare minimum and only specifically as it applies to their system.
Thanks for the feedback! I appreciate the perspective and I'm glad you found the tutorial helpful!