UML statechart has been considered, and ultimately rejected.
Instead, the decision has been made to create yet another state machine framework based on the actual needs of the project.
The C# framework supported:
- 2 types of regions:
- 3 kinds of transitions:
It has been used for most of the game objects, including:
- Animated player character (~50 states total)
- Game menus
After the release of VS 2013 (which debuted with C++ variadic templates), the first version of HFSM has been developed with the idea to exploit variadic teplates to generate the entire FSM structure at compile time.
At the end of September 2018, HFSM evolved into HFSM2. HFSM used a variation of the Robin Hood hash table to map
stateId(implemented using std::type_info) and state info. Starting with HFSM2, the
stateIdbecame a cumulative index of the state, which is known for every state at compile time.