2 ms·
One great example of state machines being used in the wild is in video games, e.g. playable and non-playable characters; for a simple 2D game, a player could be
by Cthulhu_ 4y ago
One great example of state machines being used in the wild is in video games, e.g. playable and non-playable characters; for a simple 2D game, a player could be in a state "moving left", "right", "jumping", "falling", etc. Although it might quickly become a case where two states can be active (jumping & shooting), or there's different states for different things (e.g. animation state separate from movement state).