-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multitick actions #19
Comments
I've actually a little more about behavior trees (while looking for Java implementations). It seems a better implementation would be to track the current node so that you skip parsing the entire tree every tick. I also didnt understand what the blackboard was intended for previously. This library needs some more love I think |
Sorry to say this, but without that feature this is a broken plugin. I think it should be removed from the asset store, because I am sure many like myself were looking for that feature in particular. I am not sure how to fix your code looking at it, because the documentation is not very good and the variable names are often cryptic. |
Looking closely the error in in your logic for _execute() in the bt_base.gd, only that specific node knows that it is busy and open, because of the way you have hidden the memory of blackboard down to the level of the specific executing leaf/action node. If "isOpen" was exposed in the root memory for blackboard and had a pointer to the last executing Node then I think you could fix this. |
It's not like there are many Godot / GDScript options available. One should probably understand behavior trees and how they work before trying to use. I didn't realize myself how this needs to be optimized until I started poking around implementations in Java. |
1 Understood from looking at the commits. |
@brandonlamb I come bearing gifts, will you please give me some early feedback? I would like to know if you feel this is a good implementation and if I should continue to expand it out to include the other Behavior Tree Types. A few notes about this implementation, it was designed with iteration in mind. In a deeper tree it will only travel a few nodes down, but composite trees will automatically open and and execute their children as this is a fairly inexpensive operation. Action Nodes can wait with ERR_BUSY and the rest of the tree is capable of state across multiple frames. The previous context stored in blackboard has been integrated into the root of the behavior tree to overall simplify the structures. This code includes rudimentary Integration testing, the test code is capable of much more and the Behavior Trees can handle a deeper trees than what is run in the test scene. To run the tests, just run the "TestRunnerScene.tscn" in the tests folder. |
Ping @brandonlamb . |
I was planning to try this plugin but you are saying it's not possible to use it for movement? |
Its possible to do movement and anything else thats expected from a behavior tree with this plugin, but there is room for improvement in the implementation @AnderRasoVazquez. |
Thanks for clarifying =) Now I have something to play with during this quarantine... Greetings from Spain. |
@brandonlamb @DagobertDev I have a solution for this that i'm using in my own project. I've mentioned it in #28 - I can submit a PR if there's interest. |
Dang, somehow i totally missed seeing updates to this, I'm coming back from a long hiatus myself and trying to do some updates to some of the addons in this org. I've updated the FSM and a new FSM with stack (pushdown automaton), so today I was wanting to do a total look over this behavior tree addon based on the new learnings I've had over the past year. I'll create a PR so we can look at the changed files |
@brandonlamb that's awesome, I'm interested in the pushdown FSM, I was going to implement it myself after this week's Godot Wild jam. I'll submit the PR to fix this issue once the jam is over. It's getting lots of testing in the jam and on my side project. |
Yea I remember reading on pushdown automaton way back when, but didnt really understand it at the time. I created an issue on the FSM repo to also add links to other FSM implementations that I've stumbled upon for Godot (there are like 5) |
@brandonlamb I misunderstood this issue so the solution I'm referring to isn't correct. |
How are action that take multiple ticks/frames (e.g. movement) supposed to be implemented? Running the whole tree for many actors each frame isnt performant enough.
The text was updated successfully, but these errors were encountered: