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] 

1 Answer 1


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.


You must log in to answer this question.

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