Giter Site home page Giter Site logo

pruttned / owl-bt Goto Github PK

View Code? Open in Web Editor NEW
174.0 16.0 28.0 2.75 MB

owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.

JavaScript 88.45% HTML 4.54% SCSS 7.01%
game behavior tree artificial-intelligence ai behavior-tree

owl-bt's People

Contributors

dauryg avatar dependabot[bot] avatar mok-sk avatar pruttned avatar rubenwardy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

owl-bt's Issues

Feedback

I've been playing around with this editor. Thanks for this!

Here is some feedback.

Main Criticism

  • Doesn't appear to be any way to copy/move nodes and subtrees. This should be possible using both standard keyboard shortcuts and mouse.
  • No way to change root node type
  • Disallow loading owl-bt.json file as a tree. I got confused between projects and trees
  • The way file loading and stuff was confusing to begin with - maybe only require users to open owlbt with a project dir, and allow creating tree files from within the web UI
  • Update font awesome, the first icon I found - running wasn't available in this editor

Minor suggestions

  • Nodes with no description don't align properly

    image

  • Split programmatic name and readable (ie: shown) labels for nodes. Ability to comment / give custom labels.

  • Logically, shouldn't decorators be above a node because they run before the node? They are like this in unreal

    image

  • Minor thing - when adding new nodes, maybe move camera with/relative to the parent to avoid this:

    image

    Ie: if the parent node moves 10 pixels, move the camera 10 pixels

The good stuff

  • It looks and feels great
  • owl-bt.json is a nice way to define nodes

Allow users to add comments/labels

Could be done by allowing the label of a node to be varied per node.

I'm wondering whether this would be better to be done by the user as a custom decorator

Minor bug: Inverted colors for decorators and services in the Item Palette panel.

This is a minor bug. Only affects display.

On the left-hand side panel, the colors for Services and Decorators are inverted.

The services have the color blue, but they should be green.
The decorators have the color green, but they should be blue.

When the node is placed in the workarea, the colors are displayed correctly: blue for decorators, green for services.

Add ability to change root type

This could either by done using a general way to change a node's type, or by allowing the a new node to be placed as the parent of the old root node

Enhancement: Multiple inheritance

Allow derived nodes to be created from multiple defined base nodes.

for example with these base nodes:

{
    "name": "BaseNodeA",
    "isAbstract" : true,
    "properties": [
      {
        "name": "prop-from-baseA-1",
        "type": "string"
      },
      {
        "name": "prop-from-baseA-2",
        "type": "number"
      }
    ]
},
{
    "name": "BaseNodeB",
    "isAbstract" : true,
    "properties": [
      {
        "name": "prop-from-baseB-1",
        "type": "string"
      },
      {
        "name": "prop-from-baseB-2",
        "type": "number"
      }
    ]
}

and derived node:

{
    "name": "DerivedNode",
    "base": ["BaseNodeA", "BaseNodeB"]
}

would produce node:

{
    "name": "DerivedNode",
    "properties": [
      {
        "name": "prop-from-baseA-1",
        "type": "string"
      },
      {
        "name": "prop-from-baseA-2",
        "type": "number"
      },
      {
        "name": "prop-from-baseB-1",
        "type": "string"
      },
      {
        "name": "prop-from-baseB-2",
        "type": "number"
      }
    ]
}

enhancement: temp disable tree nodes

I think it would be great to have a feature like disabling tree node and its sub nodes. (They may get greyed out). This would be very useful for testing AI's behavior for a specific part.

Do this project have a specific licence?

Hi, pruttned!
We want to use owl-bt project to generate bt structure and use it in our robotics project. So I wonder if there is a licence for this ?
And I have some advice while using it. It is not that convenient to edit the tree when the tree becomes large, as I can not use mouse to drug the tree. Maybe my interaction is wrong.
Hope to hear response from u ASAP.
Thanks!

Charles.

Error on npm install

I installed owl-bt from npm originally, and that worked fine.

Now, I'm attempting to get a development version running so I can make some simple pull requests.

I did the following

# installed ruby, ruby-sass, and bootstrap-sass systemwide
npm install

I get the following error:

 Warning: Error: File to import not found or unreadable: bootstrap-sass/assets/stylesheets/bootstrap.
           Load paths:
             /home/user/dev/owl-bt/src/client/bower_components
             /home/user/dev/owl-bt/src/client/app
             /home/user/dev/owl-bt/src/client/components
            on line 4 of src/client/app/app.scss

versions:

  • npm - 6.14.1
  • node - 13.9.0
  • ruby - 2.7
  • sass - 3.7.4
  • bootstrap-sass - 3.4.1

Update font awesome

Font awesome is out of date - at 4.7.0. The latest version is 5.12.1. I see that the version is limited to below 5 in the config, is this due to not having got around to fixing the breaking changes or some other reasons?

travis

integrate with travis

Add human-readable node type to node

Consider allowing node types to specify a human readable name which can be different to the actual name, and used in place of the programmatic name when rendering. This will aid in translations.

{
    "name": "MyNode",
    "label": "A {{ Arg }} node"
}

enhancement: user-defined types

On the 1.1 addition of user-define types.

A) When a property has a user-defined type, and then you set the value of that property to a bad value, the field will turn red -- that's good. However, if you click away from the node, the value for the field is lost. Instead, the value for the field should remain, and the color should remain red. Making a mistake with the value is penalized by losing the value, which is not optimal. Keeping the value in place will make it easier to fix the error.

B) If you put a bad value on a property with a user-defined type, and then go to save the file, it will not save. That's good. However, there is no message telling you that the file was not saved. There should be a message saying that the file was not saved because of a bad property value. Ideally, the message would mention the node type and the property name, so that it's easy to locate.

enhancement: function calls for nodes

Hello, I truely love this behavior tree editor! Thanks!
I find that it is not possible to make function calls for Action Nodes.
Like
var optionCheckPara:Parallel = new Parallel();
optionCheckPara.withPolicy(new PolicySequence());

Thanks in advance.

Typo in readme.md

The example given under "Open an existing tree" should probably be: "owlbt o path" and not "owlbt c path".

Latest updates?

This is, easily, the best BehaviorTree editor out on the internet that's not tied to a specific tool.
It would be really cool if you released whatever updates you have made since April 2017.

Many of us Indies have been fan of this tool for a while. Specially because we don't have the skill to create one like this. We're waiting your updates with excitement.

GitHub Sponsors?

Love the tool!
Ever thought about signing up for github sponsors to get some sponsorships on it?

enhacement: plugins

When I started playing around with the plugins, I realized how powerful they can be. They were a great addition to owl-bt.

At first, defining a plugin was a little confusing because of catching and because changes to plugin js files are not hot-loaded. Changes made to the plugin files didn't seem to affect existing tree files. Then I realized what's happening. Not that it's a bug; it's just that it could be confusing to a new user. You might want to mention it in the documentation:

  1. owl-bt will not remove existing fields in tree files. If a field is there when the tree file is loaded, it will be written when the file is saved. This confused me because I added a field via plugin, but then deleted the plugin code, but the field was still in the file whenever I saved it. I removed the field manually, restarted owl-bt, and then saved the file and the field was gone.
  2. For changes in owl-bt.js to take effect, owl-bt needs to be restarted. This, combined with 1, was making me think that the plugin wasn't working. Changes to other files are hot-loaded, so it caught me by surprise.

ENHANCEMENT REQUEST:

A) I'm guessing that if you didn't support hot-loading owl-bt.js was because of technical reasons. If this is possible, however, it would be a really nice to have.

B) There is an opportunity to make plugins also work as validators: make the return value of 'onTreeSave' and 'onTreeLoad' determine whether the file can be saved or loaded. Maybe something like this:

  • onTreeSave: If return value is true, file will be saved. If return value if false, file will not be saved, and there will be a generic error shown to the user that the file was not saved. If the return value is a string, then the file is not saved, and the error message shown to the user is the value of the string. This will allow plugins to be used as validator -- you can perform checks on the tree, according to your own logic, and if you find something funky, you'll get a message of what the validation error was. This would be really nice, because you can guarantee that the file saved is 100% valid, according to the user's particular requirements.

enhancement: add name tag for nodes

As the tree grows, it becomes harder to tell which node is which. It would be great if a name tag could get displayed in the Node's box in view. Something like "Sequence (chaseEnemy)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.