x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Multiple Behavior Trees for different types of bots?

Hi, I've working on a template which consists of 3 types of enemy bots, each with totally different behaviors for threat detection and attacking. At the moment, I'm using the Pawn Sensing component in each of their characters blueprints. However I want to try it out in Behavior Trees as well. But my concern is whether I should have different behavior trees for different types of bots or have a single behavior tree with condition based code. I will be adding atleast 4 other types of bots as well in the near future. So is it advisable to use multiple behavior trees as far as performance is concerned? Will it make much difference if I use just one complex behavior tree?

Product Version: Not Selected
Tags:
more ▼

asked May 07 '15 at 03:30 AM in Blueprint Scripting

avatar image

Stormrage256
1k 83 75 118

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

If the behaviour is actually different in terms of what they do I would use multiple trees. Using different behaviour trees should be much easier to manage and debug. The more behaviour types you add to one tree the more complex one tree will become until you rip your hair out and split them up anyway.

You can replicate a lot of functionality though tasks and services anyway as well as just copy and paste from one tree to another.

If the behaviour differs only in terms of parameters, sight distance, threat weighting etc then it is probably easier to just use one.

more ▼

answered May 07 '15 at 04:28 AM

avatar image

karltheawesome
203 11 14 27

avatar image MieszkoZ STAFF May 07 '15 at 03:34 PM

And a bunch of simpler BTs will always be better CPU-performance-wise than one big & complex BT. Also, having many BT assets is no problem at all in terms of memory, so I'd recommend going that route.

avatar image dzeligman May 07 '15 at 03:37 PM

Quick piggy back related question: Do you ever cache the up front allocation of new instances of different behavior tree assets to avoid any startup costs? I've noticed some slight hitches/slowdowns when I have 5 or so bots switch states to a a more complex/higher memoery cost behavior over a one to a few frames.

avatar image Stormrage256 May 08 '15 at 02:48 AM

Thanks a lot guys.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question