Skip to main content
removed crud
Source Link
brice
  • 1.4k
  • 8
  • 18

DISCLAIMER: I have no idea what I'm talking about...

I have the feeling that FSM are really better suited for AI than for handling the mechanics of game menus. (Or rather, that that's what they're conventionally used for.) If you really need a FSM to represent the complexity of your menus, your players may find it pretty hard to navigate.

As I understand it, the major difference between hierarchical state machines and stacked FSMs (HFSM and SFSM from now on) is that in an HFSM transitions away from a low level state can be specified directly, whereas in a SFSM, states in the subgroups cannot have specific exit conditions that leave the subgroup.

Probably best with an example:

This is a HFSM:

Hierarchical state machine

This is a SFSM (or nested FSM):

Nested state machine

Essentially, the SFSM is "context free", in that a lower subgraph does not need to know about the implementation of the greater machine, while in a HFSM, the lower subgraphs will transition out to specific states in the greater machine. SFSM have clear benefits in that the lower subgraphs can be modified without knowledge of the complete machine.

There are some decent resources online that cover this topic too.

Images from http://aigamedev.com/open/article/hierarchical-or-nested-fsm/ (2012-03-20)

DISCLAIMER: I have no idea what I'm talking about...

I have the feeling that FSM are really better suited for AI than for handling the mechanics of game menus. (Or rather, that that's what they're conventionally used for.) If you really need a FSM to represent the complexity of your menus, your players may find it pretty hard to navigate.

As I understand it, the major difference between hierarchical state machines and stacked FSMs (HFSM and SFSM from now on) is that in an HFSM transitions away from a low level state can be specified directly, whereas in a SFSM, states in the subgroups cannot have specific exit conditions that leave the subgroup.

Probably best with an example:

This is a HFSM:

Hierarchical state machine

This is a SFSM (or nested FSM):

Nested state machine

Essentially, the SFSM is "context free", in that a lower subgraph does not need to know about the implementation of the greater machine, while in a HFSM, the lower subgraphs will transition out to specific states in the greater machine. SFSM have clear benefits in that the lower subgraphs can be modified without knowledge of the complete machine.

There are some decent resources online that cover this topic too.

Images from http://aigamedev.com/open/article/hierarchical-or-nested-fsm/ (2012-03-20)

As I understand it, the major difference between hierarchical state machines and stacked FSMs (HFSM and SFSM from now on) is that in an HFSM transitions away from a low level state can be specified directly, whereas in a SFSM, states in the subgroups cannot have specific exit conditions that leave the subgroup.

Probably best with an example:

This is a HFSM:

Hierarchical state machine

This is a SFSM (or nested FSM):

Nested state machine

Essentially, the SFSM is "context free", in that a lower subgraph does not need to know about the implementation of the greater machine, while in a HFSM, the lower subgraphs will transition out to specific states in the greater machine. SFSM have clear benefits in that the lower subgraphs can be modified without knowledge of the complete machine.

There are some decent resources online that cover this topic too.

Images from http://aigamedev.com/open/article/hierarchical-or-nested-fsm/ (2012-03-20)

Source Link
brice
  • 1.4k
  • 8
  • 18

DISCLAIMER: I have no idea what I'm talking about...

I have the feeling that FSM are really better suited for AI than for handling the mechanics of game menus. (Or rather, that that's what they're conventionally used for.) If you really need a FSM to represent the complexity of your menus, your players may find it pretty hard to navigate.

As I understand it, the major difference between hierarchical state machines and stacked FSMs (HFSM and SFSM from now on) is that in an HFSM transitions away from a low level state can be specified directly, whereas in a SFSM, states in the subgroups cannot have specific exit conditions that leave the subgroup.

Probably best with an example:

This is a HFSM:

Hierarchical state machine

This is a SFSM (or nested FSM):

Nested state machine

Essentially, the SFSM is "context free", in that a lower subgraph does not need to know about the implementation of the greater machine, while in a HFSM, the lower subgraphs will transition out to specific states in the greater machine. SFSM have clear benefits in that the lower subgraphs can be modified without knowledge of the complete machine.

There are some decent resources online that cover this topic too.

Images from http://aigamedev.com/open/article/hierarchical-or-nested-fsm/ (2012-03-20)