2
\$\begingroup\$

The Behaviour Tree Starter Kit (BTSK) on GameAI Pro suggests using a scheduler for an event driven behaviour tree.

To recap: A behaviour tree (BT) is traversed fully every time the root node is ticked which could be as often as every frame, whereas an event-driven BT (EDBT) is only traversed when an event happens, such as finishing a task or a change on the blackboard.

Specifically the BTSK mentions

simply to find previously active behaviors, why not maintain them in a list (of size one or more) for fast access? You can think of this list as a scheduler that keeps active behaviors and ticks the ones that need updating.

I am not sure what such a scheduler would look like and which nodes we would actually queue

Assume a tree like this one, where single letters just denote some tasks that may return "running" states and numbers represent conditionals that just return success or failure.

selector (root)
├── sequence
│   ├── 1
│   └── B
├── sequence
│   ├── 2
│   └── D
└── F

Before the first frame the scheduler is empty, what does it look like after the first traversal?

\$\endgroup\$

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.