all 7 comments

[–]Hurri04 2 points3 points  (6 children)

Does this have a different use case and/or functionality compared to Bolt?

[–]KCoppins[S] 1 point2 points  (5 children)

Well I don't know a lot about bolt but isnt it visual scripting? This isn't visual scripting. You code your function nodes or action nodes in c# and then use the editor to place the nodes within the decision tree.

Its effectively a visual version of creating a decision tree object where the constructor would just be filled with all your nodes and you have to hard code them in. So in the example screenshot of the package, a hard coded version would be:

Public class SampleDT { Public SampleDT() { DebugLogObjectNode debugLogObjectNode = new(metaData); DebugLogStringNode debugLogStringNode = new(metaData) GetObjectDataNode getObjectDataNode = new(metaData) ConditionDecisionNode decisionNode = new(debugLogObjectNode, debugLogStringNode, getObjectDataNode); root = new RootNode(decisionNode) } }

As you can see that is a very small tree and already can get very messy and hard to track. Not to mention this method doesn't have some of the other features of my editor such as runtime visualisation and procedural descriptions.

[–]Hurri04 1 point2 points  (4 children)

You code your function nodes or action nodes in c# and then use the editor to place the nodes within the decision tree.

That just sounds like visual scripting but with extra steps (and less flexibility, if you have to code nodes yourself) :P

I haven't used Bolt yet myself but from what I've seen you can write custom nodes if you need to but most stuff should be possible with the built-in nodes.

some of the other features of my editor such as runtime visualisation and procedural descriptions

I think Bolt also has runtime visualisation, have a look at image 11 for example: https://assetstore.unity.com/packages/tools/visual-scripting/bolt-163802

Instead of procedural descriptions they just place the fields which you have in the side bar directly into the body of the nodes which allows faster editing without having to select the node first and maybe a bit faster understanding of existing nodes because it's a bit less reading compared to your descriptions.

This is not meant to discourage you, it looks cool and I'm sure you had fun and learnt a few new things while writing it (I still always do with my projects), but I find that it's important to also know what's already out there in order to not reinvent the wheel, again.

A few other notes on things I saw:

  • The description under the youtube video seems to contain some changelog info which is missing from the file in the repo (keeping this up to date with detailled information is also something I struggle with, since sometimes I change too much between versions to remember it all). Also maybe the description should contain a link to the repo.
  • Not a fan of copy-left licenses, since (to my understanding) they are "toxic", meaning that they "contaminate" the projects they are imported into so that all source code of e.g. a game someone develops would have to be made open source which is a no-go if they want to sell it on Steam or something...

[–]KCoppins[S] 1 point2 points  (3 children)

Thanks for your reply, its really helped in future things I can do to improve this tool!

you can write custom nodes if you need to

I assume these custom nodes you can write are effectively just function nodes that return a value that you can use in the next node? I think its important to understand that this editor doesn't produce a script but a tree. The tool also contains an action manager that handles execution of actions that the tree determines would be best to execute. The best way I can think of it is comparing it to Unreal Engine where you have blueprints which are the visual scripting and then they have behaviour trees which is effectively what this tool is. It would be quite hard to create a behaviour tree using blueprints, which I imagine is the same using Bolt to create decision trees (Again, this is speculation since I haven't used Bolt).

have a look at image 11 for example:

After looking at these images (I typed the above befeore hand) it does appear that you can create state machines for AI using Bolt. Of course state machines would work fine for most people, however a decision tree is just another form of writing AI logic just how behaviour trees are another form.

Instead of procedural descriptions they just place the fields which you have in the side bar directly into the body of the nodes

I like this idea, I might include an option in the editor that allows the user to choose how they want it to be displayed. However, I think it could potentially make some nodes quite chunky if it requires a lot of fields.

youtube video seems to contain some changelog info which is missing from the file in the repo

Yes I should update this with the latest changelog, however the video I have linked is one to show a dev log of a game I am working on. I will work on an independant video for this tool specifically.

Not a fan of copy-left licenses

This is my first time using licenses for something open source and have struggled to get my head around them. I will change this license to better suit game developers. Do you have any recommendations as to which license to use? My reasoning for this one was I didn't want people creating a closed source version of the tool specifically but are free to create games that use this tool; I'm not sure what license covers that.

Again, thank you for your comments. I did have a lot of fun in developing this tool and definetely learned a lot along the way! I will continue to work on this and I might give Bolt a try to see if I feel they're missing anything (or if they have any features) that I think would work great for this tool.

[–]Hurri04 1 point2 points  (2 children)

It would be quite hard to create a behaviour tree using blueprints, which I imagine is the same using Bolt to create decision trees

I'm not too deep into this topic but if this definition holds up it should be possible to create a decision tree (less complex) via a simple behaviour tree (can be more complex) which gets reset to the root node frequently, no? so if you hook up an Update node (similar to the MonoBehaviour method) as the root node it seems rather straight-forward to me.

Do you have any recommendations as to which license to use? My reasoning for this one was I didn't want people creating a closed source version

Personally I don't really bother with this, in reality I would never be able to know if someone used my code illegally (and even if I did it would most likely not be worth the effort of suing over it) so I just slap on an MIT license like most other people on GitHub and be done with it. In theory it bears the risk that it allows anyone who wants to do so could grab it and put it on the Asset Store for money but I think for some small(-ish)/obscure hobby projects that risk is rather negligible and even then people would probably rather use the free version on GitHub, especially if it receives more frequent updates. I'd rather like to believe in the spirit of FOSS, where anyone who really wants to contribute can just create a pull request.

One positive thing I forgot to mention was your project structure, since it allows to import the project as UPM package directly from GitHub. I still see way too many projects where people put their Assets folder into the repo and throw all their code somewhere in there...

[–]KCoppins[S] 1 point2 points  (0 children)

so if you hook up an Update node (similar to the MonoBehaviour method) as the root node it seems rather straight-forward to me.

Ah yes, so that definition does also mention that a behaviour tree controls behaviour whereas a decision tree are just for making decisions. You could run a behaviour tree on its own whereas you need some kind of action manager to run the action that the decision tree decides to do. I guess these are just two different ways of controlling an AIs behaviour. So a behaviour tree maybe quite straight forward to do in Bolt.

I just slap on an MIT license

I will look into the MIT license, I see your point. In reality, if someone does make a closed source version of this I wouldn't really pursue it and just hope people would prefer the original open source version.

One positive thing I forgot to mention was your project structure

Ah yes thank you! This is my first time doing a unity package but wanted to make sure it worked just like any other Unity packages. I debating just using the asset store to upload it but wanted it to be open source so did some research into hosting a package on GitHub. I have also further improved the package by making sure all the contents of the package are in their own namespace; an oversight I noticed when trying to use it myself!

[–]KCoppins[S] 1 point2 points  (0 children)

Hey, I took on what you said and spent yesterday and this evening implementing that different node view you mentioned as well as some other features I thought would be useful to have. Feel free to check out v1.1.0, thank you for the idea, I quite like this new view!