Skip to main content
3 votes
Accepted

How much logic should be in an individual behaviour tree node?

Handling conditions Let's say I have a condition node which has to spend a lot of time calculating something to finally return a bool to the behavior tree. But in the following action, we need ...
Theraot's user avatar
  • 27.2k
3 votes

How do I Invert a Guard in GDX-AI?

This can be achieved using decorators which can be read about here. I believe the syntax would be like this: (invert MyCondition). If that doesn't work you can ...
Charanor's user avatar
  • 7,870
3 votes
Accepted

How do I end a behavior tree's action early without evaluating the entire active branch?

That is not how you do do decisions in a behavior tree. If I understand correctly, your tree has this logic: ...
Theraot's user avatar
  • 27.2k
2 votes
Accepted

Ternary conditional in behaviour trees?

When you don't care about whether the whole subtree returns success of failure, then you could use the first version and wrap B in a Succeeder (a decorator which replaces the return value of its child ...
Philipp's user avatar
  • 120k
2 votes

Behavior Trees or GOAP for Rimworld-like game?

I'll only speak of Planning. Unity provides a planner: you may wish to check that first instead of jumping into some GOAP Plugin (as amazing as they can be :-), or embarking into developping your own. ...
TheAIHedgehog's user avatar
2 votes

Characters ai code organization

First of all, game AI with lots of actors with partially shared and partially unique behaviors is never a simple problem to solve. Especially considering that it's probably an area of your game you ...
Philipp's user avatar
  • 120k
2 votes
Accepted

Data in blackboards of behavior trees

When we have an NPC that follows the player, should it store the current location of the player or an entire reference/pointer to the player object? Not necessarily. You might want to store a ...
Theraot's user avatar
  • 27.2k
1 vote
Accepted

How should I share the states amongst all the executions of a Behaviour Tree triggered from all ticks?

As far as I understand, the blackboard is not a state but more a dumping ground for storing things that the AI should know. The blackboard is mutable: each behaviour can read from it and write to it, ...
Vaillancourt's user avatar
  • 16.3k
1 vote

Behaviour Trees: How to clean up when a sequence is interrupted?

Make the cleanup part of the "Flee" node. When it wants to make the actor flee, then it first needs to make sure that all the pre-conditions which are required for fleeing are fulfilled. ...
Philipp's user avatar
  • 120k
1 vote
Accepted

Behavior Trees or GOAP for Rimworld-like game?

In a Rimworld-like game you are dealing with NPCs who need to be able perform complex multi-step tasks (transport materials to workplace, craft item, transport crafted item to storage). And players ...
Philipp's user avatar
  • 120k
1 vote

Behavior Trees or GOAP for Rimworld-like game?

"In other words, I heard GOAP was better for projects where you have player made environment (or perhaps procedurally generated)." Please, who told you that "GOAP was better for ...&...
TheAIHedgehog's user avatar
1 vote
Accepted

Behavior tree: why?

Personally from going from a finite state machine to a behavior tree i find there are multiple advantages: Iteration time: With a behavior tree you have modules that are kind of like Lego-blocks, so ...
Angelo's user avatar
  • 38
1 vote

Behavior tree: why?

Taken from a reddit thread: "Most of the non-blackboard AI functions are really buggy anyways, and I was only able to get error tolerant AI using the behavior tree." this indicates that if ...
psznm's user avatar
  • 13
1 vote

Interrupt on behaviour tree

A solution that stays 'within' the language of Behaviour Trees, so to speak, would be to introduce a while node in your BT. Find a design that works for you, but ...
justkris's user avatar
  • 121
1 vote
Accepted

Interrupt on behaviour tree

If you are using C#, you can use interfaces. Implement an interface in the base method of all your nodes, then create a broadcaster class to invoke the method on the required node. If you are not ...
starikcetin's user avatar
  • 5,295

Only top scored, non community-wiki answers of a minimum length are eligible