Giter Site home page Giter Site logo

delacrowa / com.bananaparty.behaviortree Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forcepusher/com.bananaparty.behaviortree

0.0 0.0 0.0 71 KB

Unity package. Fully cross-platform Behavior Tree.

Home Page: https://forcepusher.tumblr.com/about

License: MIT License

C# 100.00%

com.bananaparty.behaviortree's Introduction

com.bananaparty.behaviortree

Unity package. Fully cross-platform Behavior Tree.
Does not reference Unity Engine, so it could be used in a regular C# project.

Make sure you have standalone Git installed first. Reboot after installation.
In Unity, open "Window" -> "Package Manager".
Click the "+" sign on top left corner -> "Add package from git URL..."
Paste this: https://github.com/forcepusher/com.bananaparty.behaviortree.git#5.2.0
See minimum required Unity version in the package.json file.

Key differences from BehaviorTree in UnrealEngine, BehaviorDesigner, and NodeCanvas:

  1. Strict OOP architecture and minimalism.
    • Trees are built by using nested constructors. Beware, it's all code.
  2. There are only 2 node callbacks, OnExecute and OnReset.
    • Determining whether a node just started executing in OnExecute or being interrupted in OnReset is accomplished by comparing the current BehaviorNode.Status.
  3. Reactive Evaluation/Conditional Aborts/Observer Aborts are implemented similarly to how it's done in NodeCanvas rather than in BehaviorDeisgner or UnrealEngine.
    • It's as simple as all nodes being reevaluated every frame in ReactiveSequenceNode and ReactiveSelectorNode.
  4. No separation between Actions and Conditions.
    • In case of multiple Actions in a self-interrupting Sequence (ReactiveSequenceNode), you would need to group them togehter into an additional Sequence, so Actions aren't starting from the beginning every frame.
  5. No such concept as a Blackboard.
    • Inject the classes (or their interfaces) you need to mutate via constructor. However, you can still write a DTO and use it as a Blackboard.
  6. Text-based visualization.
    • Execution status of an entire tree could be viewed in a build.
  7. Designed with Prediction-Rollback network code in mind.
    • You can write RollbackNodes utilizing the Memento pattern.

The library assumes that you're familiar with OOP and BehaviorTrees.
There are no Samples yet, refer to the Tests folder instead.

com.bananaparty.behaviortree's People

Contributors

forcepusher avatar nilpunch avatar

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.