willnationsdev / log

A log of my ongoing and planned development efforts.
MIT License
0 stars 0 forks source link

Godot-BrainTree: Redesign #1

Open willnationsdev opened 5 years ago

willnationsdev commented 5 years ago

Redesign the GodotBrainTree plugin so that it uses script classes for every node and relies on the Node-Scene system to construct the actual tree (similar to CSG nodes in Godot 3.1). This will allow users to develop AI algorithms that support scene nesting and inheritance, partial trees, etc.

fire commented 5 years ago

Thinking of using as guide: https://github.com/Xrayez/godot-anl/tree/visual-noise

Make a visual behaviour tree with BrainTree.

willnationsdev commented 5 years ago

@fire Sounds good! Unfortunately, I'm not going to be active for a while. Lots of work and home stuff going on. Should be back on the Godot scene at some point though. ;-)

fire commented 5 years ago

godot windows tools 64_2018-11-06_20-27-25

Resting for the night, but this is what I have.

willnationsdev commented 5 years ago

@fire Oh, the design for this Issue is to create a Node-based approach rather than a GraphNode-based approach. The existing plugin already does what you are showcasing:

Add a GodotBrainTree (from now on GBT) as a child node to the Node that you want to use it. (see Note_2) When you select the GBT node you will get a bottom panel button named BrainTree. Pushing this button will bring up the editor.

fire commented 5 years ago

This setup has a components node so you can attach it to itself or other nodes. It can get recursive.

willnationsdev commented 5 years ago

I guess I'm not understanding. I see the components button, but I don't actually see any nodes listed in the scene tree. Seems like there is a resource in the Inspector. Is the plan to have a hierarchy of nodes that reference these resources where the resources store "components" internally or something?

fire commented 5 years ago

My plan is to have something like an animation player. They take the behaviour tree resources. Does that work?

The components as of now can also reference other behaviour tree components, for divide and conquer organization.

fire commented 5 years ago

Do you actually think it's better to use node organization? I feel using this style is better suited for a graph node.

willnationsdev commented 5 years ago

@fire Well, the whole idea was to make a node approach because I felt that it was a better model of the data, and because people would be able to use the scene system to compose/inherit their Braintree and/or its parts. Afaik, the existing plugin already implements a visual GraphNode tool, so there's no additional work needed there.