{"repo":"Calamari/BehaviorTree.js","free":true,"listed":false,"github":"https://github.com/Calamari/BehaviorTree.js","clone":"git clone https://github.com/Calamari/BehaviorTree.js.git","description":"An JavaScript implementation of Behavior Trees.","language":"JavaScript","stars":339,"topics":["javascript","behaviortree","artificial-intelligence","gamedev","library","tool"],"license":null,"category":"game-templates","readme_excerpt":"BehaviorTree.js A JavaScript implementation of Behavior Trees. They are useful for implementing AIs. If you need more information about Behavior Trees, look on GameDevAIPro, there is a nice article on Behavior Trees from Alex Champandard and Philip Dunstan. TypeScript support? If you need TypeScript support, please check out the typescript branch which will be the upcoming 3.0 release and if you have some questions and comments please make them known. Features - The needed: Sequences, Selectors, Tasks - The extended: Decorators Installation If you use npm: or using yarn: Dependencies? This package has no own dependencies. How to use First, I should mention that it is possible to use this library also in common-js environment like node v8. For this to work, you should switch all import statements with require() statements. So instead of just use I use the new ES modules syntax, because I think it is very readable. So all the code is written like this. To see working examples of both versions visit/clone the examples’ repo. Creating a simple Task A task is a simple Node (to be precise a leaf node), which takes care of all the dirty work in it's run method, which returns either true , false , or \"running\" . For clarity, and to be flexible, please use the provided exported constants for those return values ( SUCCESS , FAILURE , RUNNING ). Each method of your task receives the blackboard, which you assign when instantiating the BehaviorTree. A blackboard is basically a object, whi","default_branch":null,"files":null,"tree":[],"storefront":"/r/Calamari","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Calamari/BehaviorTree.js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}