behavior3-chief
Manage and run behavior trees for your subjects in your game
Last updated 4 years ago by fredyc .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install behavior3-chief 
SYNC missed versions from official npm registry.

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
		}
	})

Current Tags

  • 0.7.1                                ...           latest (4 years ago)

18 Versions

  • 0.7.1                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.6.2                                ...           4 years ago
  • 0.6.1                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.4                                ...           4 years ago
  • 0.3.3                                ...           4 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |