0
\$\begingroup\$

Assume we are using Finite State Machine, what is the best way to organize states?

Given I have current StateComponent, all states are here.

MOVEMENT (Parallel) - Can be for player and non player
        [stand, walk, run]
        [forward, backward]
        [left, right]
        [jump, attack]
BEHAVIOR - For non player only
       [patrol, follow, chase, evade] 
\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

It seems like the BEHAVIOR should control the MOVEMENT state, belonging to a different component. The MOVEMENT part I tend to call a Controllable which can be assigned to a Player, or have a Brain (BEHAVIOUR) component added to the same node, which then sets the controls in a Think function.

\$\endgroup\$

You must log in to answer this question.

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