HFSM2: High-Performance Hierarchical Finite State Machine Framework
Header-only heriarchical FSM framework in C++14, with fully statically-defined structure (no dynamic allocations), built with variadic templates.
- Visual Studio 14, 15, 16
- GCC 5, 6, 7, 8, 9
- Clang 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10
Old Wiki docs are being upgraded and moved to the New GitBook.
In-line comment-based docs is an on-going effort.
- Permissive MIT License
- Written in widely-supported modern(ish) C++11
- Convenient, minimal boilerplate
- Fully static, no dynamic allocations
- Uses inline-friendly compile-time pylymorphism, no virtual methods were harmed
- Type-safe transitions:
FSM.changeTo<TargetState>() with optional payloads
- 100% NoUML-compliant
- Hierarchical, with a selection of composite (sub-machine) and orthogonal regions
- Gamedev-friendly, supports explicit
- Also supports traditional event-based workflow with
- Inspect anything: previous and current transitions, state activation status, and more!
- Game AI-friendly with Dynamic planning support
- Utility theory support (max score and ranked weighted random)
- Scaleable, supports robust state re-use via state injections
- Serializable, with activity and transition history support
- Debug-assisted, includes automatic structure and activity visualization API with
- Built-in logging support
3rd Party Libraries
- Catch2 unit testing framework
- XoShiRo pseuto-random number generators
Get In Touch
Please share your comments and suggestions on: