#behavior-tree #beet #behavior #game-ai #beetmash #control-flow

nightly beet_ecs

A very flexible AI behavior library for games and robotics

5 releases

0.0.3 Jul 14, 2024
0.0.3-rc.2 Jul 13, 2024
0.0.2 Jul 7, 2024
0.0.1 Mar 3, 2024

#1953 in Game dev

26 downloads per month
Used in 6 crates (5 directly)

MIT/Apache

130KB
4K SLoC

beet

A modular behavior library for the Bevy Engine.

Crates.io version Download docs.rs docs

Guidebook | API Docs

Beet is behavior expressed as entity trees, using Observers for control flow. The entity-based approach is very flexible and allows for multiple behavior paradigms to be used together as needed.

Currently implemented paradigms:

Hello World

// A demonstration of Fallback control flow
world.spawn(FallbackFlow)
  .with_children(|parent| {
    parent.spawn((
      LogOnRun::("Hello"),
      EndOnRun::failure(),
    ));
    parent.spawn((
      LogOnRun::("World"),
      EndOnRun::success(),
    ));
  })

Examples

The examples for beet are scene-based, meaning each example provides a scene for a common base app. As Bevy scene workflows are a wip, there are a few Placeholder types used for not-yet-serializable types like cameras, asset handles etc.

Most examples rely on assets that can be downloaded with the following commands, or manually from here.

curl -o ./assets.tar.gz https://storage.googleapis.com/beet-misc/assets.tar.gz
tar -xzvf ./assets.tar.gz
rm ./assets.tar.gz

Bevy Versions

bevy beet
0.14 0.0.2
0.12 0.0.1

Dependencies

~42–82MB
~1.5M SLoC