0
\$\begingroup\$

My behavior trees tick at 1Hz, while the rest of the game logic runs at 60Hz. This means even simple tasks can't be accurately managed by tree nodes. For example, "turnToFaceTarget" can set the rotation velocity, but by the next tick, it may well have overshot the target. Obviously, we can tick the behavior trees at higher frequencies, but this is overkill for most tasks, and hurts performance. Maybe tick frequency should be set per node...

Is there a "standard" way to solve this issue?

\$\endgroup\$
3
  • \$\begingroup\$ I'm not exactly sure how it's done, but I read somewhere that some nodes could be "asynchronous". As I understand it, they can "finish on their own" and wait for the next tick. \$\endgroup\$ Commented Jul 15, 2022 at 15:07
  • \$\begingroup\$ @Vaillancourt Hmm, I don't like the idea of completely asynchronous nodes... They can't be paused when the game is paused, and they run out of sync with the game loop, making things non-deterministic. \$\endgroup\$ Commented Jul 17, 2022 at 3:02
  • \$\begingroup\$ I understand and I totally agree. \$\endgroup\$ Commented Jul 17, 2022 at 5:41

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.