1
\$\begingroup\$

Architecturally, what are the best practices for how these two concepts interact with each other?

For instance, say I have an asteroids like game where the AI player must dodge floating asteroids while at the same time collecting powerups. If we want him to perform well we can't just have two separate behaviors for dodge and collect, he should consider everything on the screen.

Should the behaviors in the tree modify the weights of the pathfinding graph nodes (assuming using a graph based approach here)? Is A* like path finding even the best approach for this scenario?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Should the behaviors in the tree modify the weights of the pathfinding graph nodes (assuming using a graph based approach here)?

That is an option, yes. A behavior mode that is trying to stay sneaky is likely to prefer A* nodes that have a high stealth value while a behavior that wants to get somewhere quickly will prefer A* nodes with the fastest traversal speed.

Is A* like path finding even the best approach for this scenario?

No, not really. For an asteroids-like game you almost certainly want steering behaviors as your primary movement, not path-finding. More complex games will typically use a combination of A* and steering for traversing the terrain.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .