Code Monkey home page Code Monkey logo

behavior3editor's Introduction

BEHAVIOR3EDITOR

interface preview

Behavior3 Editor is the official visual editor for the Behavior3 libraries. It can be accessed online or you can download it to have handle local projects.

Why Behavior3 Editor?

Why should you use b3editor? What is different from other editors? Can it compete against commercial alternatives? - Well, check it out some characteristics of Behavior3 Editor:

  • Open Source Software: under MIT license, you can use this software freely, adapt it to your need and even use a specialized internal version in your company. You can also contribute with bug fixes, suggestions and patches to make it better.

  • Open Format: b3editor can export the modeled trees to JSON files, following an open format. If there is no official reader on your favorite language yet, you can develop your own library and use the trees created here.

  • Formality: the editor works above the basis created by Behavior3JS, which in turn is based on formal description of behavior trees. Thus, the editor provides a stable solution to model agents for your games or other applications such as robotics and simulations in general.

  • Focus on Usability: intuitiveness is the key word of b3editor. We focus on providing an easy, clean, and intuitive tool for programmers and non-programmers. If there is something obscure or too difficult to use, report it immediately!

  • Minimalist, but Functional: b3editor follows a minimalist style, trying to reduce the amount of non-essential information presented on the screen. We focus on the important things: designing Behavior Trees.

  • Customizable: create your own node types and customize nodes instances individually. Create several projects and trees, change titles and add properties.

  • Big Projects Ahead: we are working towards a collaborative tool in order to provide an awesome editor for big projects involving several designers working together.

  • Does not depends on other tools/editors/engines.

Main features

  • Custom Nodes: you can create your own node types inside one of the four basic categories - composite, decorator, action or condition.
  • Individual Node Properties: you can modify node titles, description and custom properties.
  • Manual and Auto Organization: organize by dragging nodes around or just type "a" to auto organize the whole tree.
  • Create and Manage Multiple Trees: you can create and manage an unlimited number of trees.
  • Import and Export to JSON: export your project, tree or nodes to JSON format. Import them back. Use JSON on your own custom library or tool. You decide.

Limitations

Nothing is perfect =( . Behavior3 Editor focus on Chrome (thus, working pretty well on Opera too), so it have some incompatibilities with Firefox, such as the image preview lag when dragging to create a node for the first time, and the ugly scroll bar inside the panels. Not tested on IE!

Looking for Behavior Tree Libraries?

behavior3editor's People

Contributors

renatopp 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  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

behavior3editor's Issues

Cut with problems

There is some problems with the CUT feature. It seems to ignore some nodes, and even on nodes that were cut, the paste remove connections.

Shortcuts redefinition

I would like to discuss the redefinition of shortcuts and general usability of the editor. I think the shortcuts could be better distributed, so I'm listing all commands and their respective shortcuts. Proposed new shortcuts will override old shortcuts.

This is not a priority, but it must be discussed for the next editor UI refactor, so I would like to hear the community opinion.

Current commands Shortcut
Close project ctrl+q
Save project ctrl+s
Undo ctrl+z
Redo ctrl+shift+z
Copy ctrl+c
Cut ctrl+x
Paste ctrl+v
Duplicate ctrl+d
Remove delete
Select left_button
Select multiple 1 left_button drag
(de)Select multiple 2 ctrl+left_button
Select all ctrl+a
Deselect all shift+ctrl+a
Invert selection ctrl+i
Select subtree alt+left_button
Deselect subtree alt+shift+left_button
(de)Select multiple subtrees alt+ctrl+left_button
Auto organize a
Zoom in (keys) ctrl+up
Zoom out (keys) ctrl+down
Zoom in (mouse) ctrl+wheel_up wheel_up
Zoom out (mouse) ctrl+wheel_down wheel_down
Scroll (keys) up, right, left and down
Scroll (mouse) middle_button right_button
Unassigned commands Shortcut
All projects
Settings
Export *
Import *
New tree
New node
Remove all conns
Remove all in-conns
Remove all out-conns

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27362657-shortcuts-redefinition?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Adding additional base attribute

I add an additional base attribute with a default value on Node.js - I can see that the value here is applied to all the node. However, when I update value inside the code of each node, the value doesn't update (for example, in And.js, I change the value of this new attribute, but when I show the value on properties panel or when I export JSON, I see the default value from Node.js)

What am I missing here?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

How to run behavior3editor in web

I build the editor and put it to web container like apache, nginx, but it looks like has error when access the web page from another computer,

The home page show below:

Behavior3 Editor
Starting application... Have Fun!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38324637-how-to-run-behavior3editor-in-web?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Feature Request: Import custom nodes

It would help a lot if one could import a custom nodes file (instead of re-adding it all the time). Sure you may add your custom nodes on a clean project and use this as a template for all your b3 files, but what if we need to add more custom nodes - you have to add them to all of your existing files. With a "Import custom nodes" option this would handle it. Another more elegant option would be a separate custom nodes file.

JSON export format - inconsistent

When exporting the tree or project as json, whilst the custom nodes is output as an array (which makes sense) all the contents of 'nodes' is flattened into attributes under respective ids.

Whether or not the json format were updated to reflect the tree structure (i.e. children within parents), it would be helpful to have the nodes reflected again as an array. At the moment it seems like it needlessly makes it more difficult for the export to be parsed?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Add bower to node dependencies?

I just had to install bower myself while in the process of installing locally.

I think thats confusing to non-dev end users, since if they run npm install + bower install they are gonna get an error on the latter.

Why not adding bower in package.json?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Vertical view for editor.

Top/Left to Bottom/Right. Similar to UE design. Not the features but the layout as an alternative to to the horizontal one.

merge forks please!

Instead of forking the repo at https://github.com/renatopp/behavior3editor this repo just dumped code. That's a problem, because history was lost. Oh well. No use crying over split milk. However, this move leaves behind 3 or 4 unmerged forks:

https://github.com/Healthire/behavior3editor
https://github.com/knowrob/behavior3editor
https://github.com/benjycook/behavior3editor

all of which look like they've received significant development work, but are now orphaned. These need to be reviewed and either merged or cherry-picked as appropriate.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27952575-merge-forks-please?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Getting this working with nw.js

I downloaded the editor source and tried to get it to work with node-webkit but I get an error in index.html on the app.initialize() saying "Cannot read property 'initialize' of undefined.

At the top you have:

var loader, app;

But I can't see where app is created anywhere. The loader variables is of type createjs.LoadQueue() but 'app' doesn't get assigned anywhere.

Any help on getting this to work on nw.js would be huge! I'm trying to use this for the Leadwerks game engine for AI and I think having a desktop version of this editor would be nice and nw.js can help get that.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/36382314-getting-this-working-with-nw-js?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Broken build in NodeJS v13

fs.js:39
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:39:5
    at req_ (/home/ruben/dev/tools/behavior3editor/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/ruben/dev/tools/behavior3editor/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/ruben/dev/tools/behavior3editor/node_modules/graceful-fs/fs.js:1:37)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

New editor UI/UX

The current interface of the editor (not the dashboard, only the editor) is really annoying for any non-trivial project. So I would like to discuss what to do with it. Notice that I'm neither a designer or an UI/UX expert, thus, I would like to hear from people with more expertise on this.

I have some suggestions (they can -and should- be divided into other issues before implementing them):

  • The left panel could show a simpler list organized in hierarchies, similar to any code editor (e.g., sublime text), where we could click on some category (e.g., nodes, or trees, or composite) and show/hide its content.
  • The left panel MUST have a search field in order to filter the nodes and trees.
  • The right panel could be completely removed. User could double click onto a node (or Edit > Node properties) to open a modal screen. This would remove the live update of the node and simplify A LOT the undo/redo logic.
  • The right panel could be a small panel with fast shortcuts (pretty much like any vector or image editor like inkscape and photoshop). This would be a toolbar on the right side.
  • Creating a connection to an empty space or right clicking on the canvas could open a simple popup to select a node (would be an alternative to dragging the nodes from the left panel). This popup would have a search field. This feature is based on the Unreal Blueprint editor.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27362865-new-editor-ui-ux?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Migrating to React and make portable.

I was thinking of forking this and migrating it to use React instead.
The idea was to make this "portable" to the point where you could pop up a browser in any environment, feed it a behaviour tree and connect it to the gameplay for debugging purposes.

But before I start, I was hoping to get your take on it!

Unable to remove properties from nodes

It appears as though you can't remove properties from nodes once you've added them. After clicking the red "-" button, although the property disappears, if you deselect the node in question and reselect it, the property is still there.

The only way I've found to permanently remove the property is to manually edit the project file, which is a bit of a pain. The problem appears to be within the BlockManager, specifically the update function. I'd try and trace it further but I'm not that familiar with Angular so I can't currently pinpoint the source of the problem.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Dynamic properties on node instances are really necessary?

So, there is a real need for dynamic properties on node instances? (i.e., user should be able to add or remove properties of any given node instance?). Seems irrelevant to me, if you want to add a property, just add onto the node definition. The same is valid for removing a property.

This would simplify a lot the properties panel.

Notice that, this is related to issue #6, so it is a high priority.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27362699-dynamic-properties-on-node-instances-are-really-necessary?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Json schema of the behavior tree format

First of all, congrats for this project. Looks very promising.

I am writing a BT library in Java and I would like to use behavior3editor as the graphical editor for the trees. However, I have not found any reference to a formal specification of the tree format. Is there any?

Thank you very much


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Documentation

This is actually related to all behavior3 projects.

My idea is to create a new repository (maybe behavior3/behavior3docs) with all documentation in markdown, so we could access it from the documentation (from web and desktop versions), keeping always updated, even when changing releases (specially for desktop).

This repository would have:

  • Tutorials about behavior tree in general;
  • Usability and interface guide for the editor;
  • Reference about the JSON formats used in the B3;
  • Reference about how to implement a client library in another language;
  • Api and user guide for the client libraries, in special for the b3js;
  • Application examples of behavior trees using the client libraries;

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27363205-documentation?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Feature request: Hierarchical (custom) nodes [$10]

If you have a lot of custom nodes, the editor view gets messy with a plain list of custom nodes.
How about adding a "Parent" property to the (ui)-basenode, which would make it possible to have a (custom) nodes tree in the left pane of the editor:

Nodes

Actions
|-Default
| |-Failer
| |-Succeeder
|-Custom
| |-Player
| | |- Combat
| | | |- UseSword
| | | |- UseKnife
.....
with the option of folding/unfolding those trees..


There is a $10 open bounty on this issue. Add to the bounty at Bountysource.

Undo/Redo is having problems with properties

Steps to reproduce:

  1. Select a node.
  2. Edit its title.
  3. Select another node.
  4. Click at the title field.
  5. Press ctrl+z.

The same happens with other fields, but the title is more critical.

New visual for blocks and canvas

In some future release, I want to change the overall visual of the blocks and canvas. This issue is only for discussion until then, when I will break it into several small issues.

new_editor

Using the figure above as reference:

  • Block shapes: all blocks are homogeneous, categories are differentiated by color and an icon on the top-right side. This modification is useful for the addition of more complete block information and make things more readable;
  • Block information: a block contains its title (with emphasis), its name (which is very important to show, and the current editor does not do), its description as tool tip; and all its properties; Blocks without properties (e.g., the root block) do not show the properties body;
  • Selection Highlight: currently, the selection highlight is made by creating a shadow around the block, which is pretty heavy (try to select and move a hundred blocks). In the new visual, the highlight is a simple box behind the block;
  • Grouping Notes: based on the unreal engine blueprint, would be cool to have some "group" feature. In this case, you can select the nodes you want and create a group, which will resize automatically with new rearranges;

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26108726-new-visual-for-blocks-and-canvas?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Unable to open project with nested trees

If I have a project where a tree references another tree that is below it in the list on the left of the editor, I save the project, and then attempt to reopen it, the editor fails with an error message.

After taking a bit of a look at the source, this appears to be because the trees in the serialised JSON are stored in an array, and if a tree refers to a nested tree which exists after it in said array, it won't have added it within the NodeManager, and hence will fail.

I would either suggest changing the JSON format so that the trees are stored as key-value pairs (much like the nodes), or having an additional processing phase before attempting to load the tree, so that the node manager is aware of all the nodes that exist within the project file. The latter approach wouldn't invalidate existing projects files, and is probably the preferred one from my point of view.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

White background when dragging nodes (linux)

I could not test in other computers or distributions, but when we drag a node from the left panel to the canvas, the node preview have a white background. This is happening on chrome/ubuntu 14.04.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27362916-white-background-when-dragging-nodes-linux?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

How to handle Multiple Trees

This thread discuss how to handle multiple trees in the editor and the client libraries.

Motivation

You can use multiple trees in some different ways:

  • You may use one or more independent trees (they don't have tree nodes).
  • You may want to create a main tree which calls other trees as util functions. For example, a SoldierTree that uses CombatUtilTree, HealingUtilTree and CoverUtilTree.
  • You also may want to create several "main" tress that calls other trees as util functions. For example, CommanderTree and SoldierTree using the same utility subtrees.
  • In a worse scenario, you may want to use two trees recursively. For example, tree A calls B and tree B calls A (I don't know any case where this would be useful, but I don't see why and how to avoid it).
  • Worse yet, you may use the same tree recursively, e.g., tree A calls tree A.

Given that you may use the same subtree several times and the case where you use the trees recursively, I want to create a single object instance for each tree.

So, I'm thinking in something like that:

var behaviorCollection = b3.load(behavior3_data);

var soldierTree = behaviorCollection['SoldierTree'];
var commanderTree = behaviorCollection['CommanderTree'];

and then you use the trees as usual.

Editor

If we follow this behavior collection thing we:

  • can't allow trees with the same name.
  • could change the JSON format to make easier to read these trees (maybe similar to how nodes work). This also would help with #5.

Client

In the client libraries we can create an empty BehaviorTree for each tree in the JSON, and then create their nodes (we can't create nodes together with the trees because nodes can have reference some tree).

Moreover, we need to update how BehaviorTree.tick method works, maybe breaking it in several internal methods. To understand that, consider the following situation:

  • a SoldierTree have two differences references to CombatTree (let's say C1 and C2);
  • in the client we only have two objects, one for SoldierTree and other for the CombatTree (for both C1 and C2);
  • if the SoldierTree calls C1 and then C2, everything will explode right away because both C1 and C2 are the same object, thus sharing the same IDs, nodes and node IDs (i.e., blackboards uses trees and nodes IDS to store information).

The same would occur if the CombatTree were referred by SoldierTree and CommanderTree.

So, before calling the subtree, we need to change temporarily its ID.


I'm not sure if this issue is barely understandable by anyone but me. I've been thinking a lot about this feature lately, so the description may lack some more contextualization.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27127836-how-to-handle-multiple-trees?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Finishing the mofications for the next release

I want to finally (officially) release a new version of Behavior3. Which I think it could be the 1.0.0, since it has been through a lot of changes since 0.1.0. To accomplish this, there are some important bugs that must be fixed and some features that weren't finished yet.

So this is my TODO list to the next release:

Of course, we need to update the site and the client libraries, but the editor is the most important right now.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27363104-finishing-the-mofications-for-the-next-release?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331319&utm_medium=issues&utm_source=github).

Building for desktops

There are some issues with the desktop buildings:

  • Saving/Loading files must be better tested;
  • Must work at least in windows and linux (I couldn't test it yet);
  • We must have a better distribution process in gulp.
  • We could test electron instead of node webkit.

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.