Giter Club home page Giter Club logo

b3-chief's Introduction

Behavior3 Chief

Manage and run behavior trees for your subjects in your game

GitHub license Travis Coverage Status Code Climate David

Chief is full features JavaScript library for creating, maintaining and executing behavior trees.

A behaviour tree is a tree of hierarchical nodes that control the flow of decision making of an AI entity. At the extents of the tree, the leaves, are the actual commands that control the AI entity, and forming the branches are various types of utility nodes that control the AI’s walk down the trees to reach the sequences of commands best suited to the situation.

Quoted from the article

Subject is an invention of the Chief. It represents a single entity that runs a single behavior tree. It has memory for sharing data between other nodes and trees.

Features

Installation

NPM

For use in browser directly: UNPKG

Usage

Chief exports single factory function to create instance of its API object.

	import Chief from 'behavior3-chief'
	const chief = Chief.create()

Behaviors

Behavior is used contain actual logic behind tree execution. Chief contains several native behaviors. New behaviors can be added easily.

Using EcmaScript2015+

Generally there is no limitation to write definition of behaviors using ES2015 (or later) specification of JavaScript language. Actually it's recommended as it was designed that way (eg. destructuring feature).

Since behavior defininitions are compiled on the fly, you need to either make sure that target environment can run such code or you can supply transpiler to Chief. Including Babel is surely overkill, luckily there is a very promising project called Bublé.

	import { transform } from 'buble'
	const chief = Chief.create({
		transpiler(code) {
			return transform(code).code
		}
	})

b3-chief's People

Contributors

bfred-it avatar danielkcz avatar efueger avatar fredyc avatar greenkeeper[bot] avatar greenkeeperio-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

b3-chief's Issues

An in-range update of rollup is breaking the build 🚨

Version 0.41.2 of rollup just got published.

Branch Build failing 🚨
Dependency rollup
Current Version 0.41.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As rollup is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 9 commits .

  • e2d9b6b -> v0.41.2
  • 2a01a99 Merge pull request #1241 from kzc/0_41_0_changelog_addition
  • c038cda Merge pull request #1240 from rollup/gh-841-updated
  • 61528b7 change log addition for 0.41.0
  • 82b284d optimize ns["foo"] (#841)
  • 40a0ed5 Merge pull request #1239 from rollup/gh-1213
  • bc0f791 suppress warnings with --silent (closes #1213)
  • 6384b6c Merge pull request #1238 from rollup/gh-797
  • 101ad28 use options.indent for UMD block - fixes #797

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Refactor Execution slightly

When I was implementing execution of subtrees, I had use rather ugly approach of mutating shared object of subject toolbox to pass function executeTree (source) down to make it accessible in createSubtreeExecutionTick (source).

As a side effect it makes this function also available on all executionContext objects thus theoretically it's possible to execute another tree from other node lifecycle methods, eg. onEnter.

I should make ExecutionToolbox bit more robust allowing to contain tools merged into executionContext and alongside have it as storage for other arbitrary data, eg. executeTree.

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.