-
Notifications
You must be signed in to change notification settings - Fork 1
Behaviour Trees
Behaviour trees are used to program AI in the game. Anything autonomous from NPCs to enemies are controlled by behaviour trees.
Conceptually, there are three types of nodes in our behaviour tree model:
- Input Node
- Input nodes take data from the world and store them in the behaviour tree. Example: Finding the player entity.
- Processing Node
- Processing nodes take stored data and interpret and change that data. These are the core of behaviour trees. Example: Taking the already retrieved player and getting its position.
- Action Node
- Action nodes use the data from the input & processing nodes to take certain actions. Example: Moving towards the player's position.
Name | Type | Function |
---|---|---|
FindActorByTagNode | Input | Finds an actor via the given tag. |
GetActorPositionNode | Processing | Gets the position of a stored actor. |
GetRandomPositionNode | Processing | Generates a random position within a certain radius from a stored origin. |
HasPropertyNode | Processing | Returns success if the agent has the specified property. |
NotNode | Processing | Succeeds if its children fail, and fails if its children succeed. |
RangeCheckNode | Processing | Succeeds if the agent is within the specified distance of a stored position; else fails. |
SelectorNode | Processing | Executes children until one doesn't fail. |
SequenceNode | Processing | Executes children until one doesn't succeed. |
SimpleMoveNode | Action | Moves the agent toward a stored position ignoring physics and without pathfinding. |
SuccessNode | Processing | Always succeeds. |
Behaviour tree nodes must inherit the IBehaviourTreeNode
interface, which comes with two methods:
void Init(Behaviour behaviour)
The init method is used to create and initialize methods on this node.
NodeStatus Tick(Tree<Behaviour>.Node self, BehaviourObject obj)
Tick is called once per frame when this node is running. This is where a node will process data and do what it needs to do during runtime.
The VGDC rpg is currently in early development stages. All the information in this wiki is subject to change.
Join us on Discord to get involved.
> Home
> Our Team
> Milestone 1: αω plasmashark
Setup
> Merge Conflicts
> Using GitHub
Tools
> Behaviour Trees
Character
> Level Progression
> Alignment
> Inventory
Gameplay
> Gameplay Loop
> Combat
> Quests
> Items
> Dialogue
Art
> Art Style
> Thematic Decisions
> UI
Music + Sound
> Inspiration Board
Story
> Prologue