I like to see a Swift library of course, but also something in CSharp, to be used in unity…
Ali Moeeny
1

Hi Ali,

I actually made a gist couple of months ago, which shows how Behaviour Trees can be combined with Entitas-CSharp. I think I also wrote something on the gitter channel, but I am not sure any more.

Here is the gist:

It defines the node state as an enum, an interface for a node and implementation of Sequence and Selector nodes. As you can see I think that behaviour should operate on single entity. This way you can define a complex behaviour tree and call it from an Entitas system.

It is however the standard implementation of behaviour trees, as they are synchronous. But it is ok because ECS is a real time architecture.

As you can see in my hello world example:

With asynchronous behaviour tree, we can apply behaviour tree idea without ticking them along. The tree is walked through based on user interaction.

This makes the idea more feasible to typical application development, where the run loop is hidden and the logic is triggered through user actions.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.