Can we get a part two/followup? I'm a bit confused on a few things that were explained too fast. Like, why do I need an inverter "HasNoTreeAvailable" with a "HasTreeAvailable" check after? Could you make some enemy AI examples using your addon too? Or could i look at more examples from your game
Thank you a lot for watching! Subscribe to my channel for more gamedev stuff and let me know in the comments what you want me to do next! ⚠ EDIT: as raised by Gareth Somers, at 5:45 we also have to wrap the condition inside a SelectorComposite as shown in the video (I forgot to mention it)
Thank you for your addon. It looks cool and promising. However, this tutorial doesn't help a lot in understanding the core functionality of behavior trees. it would be cool if there is a more detailed explanation of each step you've done. "Let's add SequenceStarComposite node..." - Why not simple SequenceComposite node? "Let's create similar setup for lumberjack" - *selects Selector node as a root, while in previous setup SequenceStarComposite was a root node* Why so? "...tree should be empty, except for the script..." - What exactly each line of the script does? "...tick the box for Access as Scene Unique names?" - Why? What does it actually do? And a lot of cursory staff about the topic. What's the point of making 10 min tutorial if the only thing it teaches is how to copy your actions to recreate the same scene you provided?
My tutorials are less about teaching but more "Stackoverflow style" solutions to problems. People can always research the theory behind stuff thenselves - there are literally thousands of great explanations out there how behaviour trees work in theory. The aim of this tutorial is to actually use them in a game.
I love it! Considering I started learning Godot one month ago and game development in general, I believe it will take me some time to completely understand how the code works, although I checked the code and have an inkling of an idea. But before that even happens, gotta practice a lot of mechanics. Either way, thank you for the video; I will come back to it when the time comes :D
This is the best behavior tree Godot tutorial, the other ones are really simple. Great job! =) Btw I've seen on the assetlib two BehaviorTree plugins, is there a reason why you decided to create your own?
Great question! I actually tried all available addons in the asset store and none of them were simple enough for me. Either, they were lacking the "selector star" functionality and important decorator nodes or they were visual only. Also, the documentation for them was rather lacking. My addon is directly based on the demo project from ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YHUQY2Kea9U.html - however, I have plans to introduce also a visual debugger for my addon and actively develop it for better debugability.
@@bitbraindev I see, I will use your addon then. I have been studying the code and it was very easy to understand. Do you have any plans to upload it to the assetlib?
3:14 WlakToClosestTree seems to be "closest in a straight line", but "closest by walking distance" (ie taking into account the path it can actually use) would probably be what the user expects. Of course, that's more expensive to calculate, but you can limit the calculation to the closest (in straight line) 10-20 trees for a good enough heuristic.
Can you explain why you made your own behavior tree instead of using one already in the plugins? I haven't explored behavior trees in Godot yet so I was wondering if what else is available is lacking.
This is a very intersting video, I always like AI stuff. In a past tutorial I made on my youtube I did something similar but in pure C#, and it was quite efficient. I am a programmer so I think I prefer having it in my text editor over being a node, but I guess for most people it would be the other way around. Either way a great tutorial
I also prefer it in text editor since I'm also not a standard game dev, but I think this way is preferred because Godot itself updates the changes if you move the files in the 'res://' folder. That way you don't have to update a lot of scripts if changing the organizing structure of the game.
Thank you for the tutorial and the lib, however you go too much fast... Quick tutorials are great to explain simple things, but honestly I watch this video many times and just wasnt sucessfull to understand the whole thing
Nice Tutorial~ It helps me alot! But I still have a problem in Beehave Version 1.2.0 , When I added a ConditionLeaf node or ActionLeaf node , There is a "Condition.gd" Script attached on them, I already know that I can add my own script by click "Extend script", but Is there any way to generate a script contains tick function and classname automatically?
I’d love to see complex enemy pathfinding in another video - my top down game often has enemies get stuck on corners when they chase the player and it can be kind of easy to cheese them.
I am actually planning to build exactly that as a separate tutorial soon! The pathfinding in this demo is rather poor because the NavigationAgent2D in the Godot 3.5 RC while recording the tutorial was incomplete. Now, they fully cherry-picked also the navigation mesh and collision stuff from Godot 4 which definitely makes things easier.
@@bitbraindev will that also show creating the various nodes for use in the tree? Love the addon but I’m having some trouble wrapping my head around it
(1) event driven behavior trees... How do they work? (2) backchaining... Is it just a way of building a behavior tree or is it a way of simulating a GOAP? (3) when is it appropriate to represent my behavior tree as a tree graph in code? (4) why do some behavior tree implementations combine actions and conditions (sometimes called an action's precondition)?
The name "Beehave" does not show up in the godot asset store when searching Behavior or Tree. Might want to adjust it a bit. eg: Beehave (Behavior Tree)
This is a very well done tutorial, thank you! One small improvement I'd make is to have nodes initialize themselves with relevant values (e.g. the stash_area), so the root does not need to know about what subnodes need. The way I'd do this in the _ready function of the root, it'd visit all subnodes and if they have for example an "initialize" method, it would call that with itself as param. Then, when a subnode's initialize is called, it could pick whatever relevant value (e.g. stash_area) and set it on itself.
Great thinking! Another idea I had was to follow the "signal up, call down" methodology more. And then using an event bus to communicate information from within the behaviour tree outwards.
Hj, can I use your tutorial as a base to create a portuguese version of this content? I won't do the same, but use it as a reference, adding my concernes and tips. And of course crediting your channel.
Yeah, this is a small video script issue that I only noticed after uploading! We have to wrap it into a selector condition to make the entire condition work properly and I forgot to mention it during the recording. I hope the video makes sense regardless! Thanks for raising this. I will add a small footnote on the pinned comment!
First of all, I want to thank you for this great tutorial. I have a question though, I think I might be misunderstanding how each node works, but the documentation explains that when a child of a sequence node returns "running" both sequencecomposite and sequencestarcomposite Tick Again. Looking at the code in the demo project I can see that the behavior is as explained in the video, but I think that is not reflected in the documentation. Can you clarify this point? Please.
Вы забыли добавить логику, что если мишень уже занята другим рабочим, то он не имеет права его трогать, иначе 10 лесорубов режет коноплю, это не хорошо, как и другое поведение, если лесоруб знает, что ящик полон, то не уничтожайте его, а сбрасывайте на пол и отправляйтесь отдыхать.
That makes sense! For anybody unaware: I haven't considered that certain trees might be "busy" already by other workers. Additionally, boxes should be dropped on the ground rather than being destroyed, when there is no more space available.
Hello, Tutorial system (trees) that fall when felling, with which the player plays the felling animation, when the number of times (felling) reaches the tree, it plays an animation that makes it fall and drop objects. Could you create a video tutorial, showing the entire procedure? please
This tool looks great, but I find the tutorial somewhat confusing, perhaps because it is so fast. Then again, I'm kind of a newbie, haha. An updated tutorial would be sweet though.
The tutorial certainly is not aimed at absolute beginners. I wish there was an easier way to highlight this. Perhaps I should start using terms such as 'Beginner' and 'Intermediate' in the video titles.
Hey there, bitbrain. Is there a tutorial about behaviour trees you would recommend for an absolute beginner? I've considering using behave for managing NPC conversations in my project, but I still feel I lack a good foundation about all of these nodes like selectors and decorators. Thank you so much!
Is there some way to always run a node at the end of the sequence? I was using a always succeed decorator, but that doesn't work when the node is running. I'm not sure if what I want is even possible or if I should check other approach
@@bitbraindev Oh cool! This feature highly interests me, once I finish the current PR I'll slowly look into that one, I think I can add some help there
is there a simple way to replace the grayscale assets from the project file with the color assets from your asset pack, or a guide for which ones to replace them with? the names don't seem to all match. also for the grayscale goblin anim sprite?
The assets are paid and cannot be stored on Github, so you'll have to buy them if you want the original ones: danieldiggle.itch.io/sunnyside I will try to use free assets for future tutorials.
@bitbraindev been studying and practicing your addon for developing enemy AI for a top-down shooter game. Has been boggling me why Godot 4 does not have such a system backed into it, but this has been a welcoming lesson. Still need to understand a few more things to make a better enemy AI behavior. Wishing you the best in the future!
Thanks a lot! If you have any ideas or feedback on the addon feel free to create a discussion or issue on Github: github.com/bitbrain/beehave/discussions/new?category=ideas
Works in 3.5 until the end. Lumberjack and Trader both have the proper .gd script but Forester does not have a gd script and uses behave root as default. The other two ai work as intended but the forester glitches out at front of his house. Not sure this is intended but otherwise good tutorial.
This is a really cool and helpful addon! Thank you for your hard work. How does this work in Godot 4? Do you already upgrade the addon to it or do you have a time planned?
little question: can I count on you that you maintain this plugin and I don't have to worry that it will be unusable at some point? Or rather, how likely is that. I understand that you probably won't give any guarantees :D
This plugin will be maintained long-term, as I am actively using it in my RPG which will be in development for many more years. Oh, and it also supports Godot 4 already!
Of course you could but it would make things less obvious. During debugging, to fully understand what is happening you'd need to check every node and see if it had the flag activated or not. The goal here is to make things explicit within the node tree view itself.
I'd love to see a rimworld style behavior tree setup, where there is a global list of things to do and each villager will attempt to do them in a specific order based on user set priorities. Is that even something this addon can handle?
I'd love to see an in-depth travelling NPC merchant/trader video. It's really something I'm struggling to find a good video on! I loved this one, thanks so much 😄
So I installed 3.5 RC 7, and everything works pretty well. But I'm totally tattling to the other commenters that there's 40 leftover warnings by the end. Mostly "The argument 'blackboard' is never used in the function 'tick'. If this is intended, prefix it with an underscore: '_blackboard'".