Header-only flat FSM framework in C++11, 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
- HFSM2: High-Performance Hierarchical Finite State Machine
- GitBook: flatdoc.hfsm.dev (WIP)
- In-line comments
- Permissive MIT License
- Written in widely-supported modern(ish) C++11
- Header-only
- Convenient, minimal boilerplate
- Fully static, no dynamic allocations
- Uses inline-friendly compile-time pylymorphism, no virtual methods are used
- Type-safe transitions:
FSM.changeTo<TargetState>()
with optional payloads - Scaleable, supports robust state re-use via state injections
- Gamedev-friendly, supports explicit
State::update()
- Also supports traditional event-based workflow with
State::react()
- Inspect anything: previous and current transitions, state activation status, and more!
- Game AI-friendly with dynamic planning support
- Built-in logging support
- Catch2 unit testing framework
- Blog: gresyk.dev
- Twitter: @andrew_gresyk
- Discord: HFSM.dev
- Gitter: andrew-gresyk/FFSM2