andrew-gresyk/FFSM2

High-Performance Flat Finite State Machine Framework

C++

62

101 commits

updated Jun 27, 2026

See the code

README

License: MIT GitHub Release Date
CII Best Practices
GCC, Clang ARM GCC MS VS
Gitter Discord Twitter Follow


FFSM2

High-Performance Flat Finite State Machine

Header-only flat FSM framework in C++11, with fully statically-defined structure (no dynamic allocations), built with variadic templates.


Compiler Support

  • Visual Studio: 2015, 2017, 2019, 2022
  • GCC: 10, 11, 12, 13, 14, 15
  • GCC (ARM): 13
  • Clang: 13, 14, 15, 16, 17, 18
  • AppleClang (Intel): 17
  • AppleClang: 15, 17

Quick Start


See Also


Documentation


Feature Highlights

  • 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 polymorphism, no virtual methods are used
  • Type-safe transitions: FSM.changeTo<TargetState>() with optional payloads
  • Flexible configuration using FFSM2_ENABLE_* macros
  • Scalable, supports robust state re-use via state injections
  • Gamedev and embedded friendly
  • 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
  • Debug-assisted, includes automatic structure and activity visualization API
  • Built-in logging support

3rd Party Libraries


Get In Touch


Special Thanks

cpp
cpp11
embedded
embedded-systems
fsm
fsm-library
game-dev
game-development
header-only
mit-license
modern-cpp
state-machine
template-metaprogramming

Contributors

andrew-gresyk

93 commits

gitter-badger

1 commits

andrew-gresyk/FFSM2

High-Performance Flat Finite State Machine Framework

C++

62

101 commits

updated Jun 27, 2026

See the code

README

License: MIT GitHub Release Date
CII Best Practices
GCC, Clang ARM GCC MS VS
Gitter Discord Twitter Follow


FFSM2

High-Performance Flat Finite State Machine

Header-only flat FSM framework in C++11, with fully statically-defined structure (no dynamic allocations), built with variadic templates.


Compiler Support

  • Visual Studio: 2015, 2017, 2019, 2022
  • GCC: 10, 11, 12, 13, 14, 15
  • GCC (ARM): 13
  • Clang: 13, 14, 15, 16, 17, 18
  • AppleClang (Intel): 17
  • AppleClang: 15, 17

Quick Start


See Also


Documentation


Feature Highlights

  • 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 polymorphism, no virtual methods are used
  • Type-safe transitions: FSM.changeTo<TargetState>() with optional payloads
  • Flexible configuration using FFSM2_ENABLE_* macros
  • Scalable, supports robust state re-use via state injections
  • Gamedev and embedded friendly
  • 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
  • Debug-assisted, includes automatic structure and activity visualization API
  • Built-in logging support

3rd Party Libraries


Get In Touch


Special Thanks

cpp
cpp11
embedded
embedded-systems
fsm
fsm-library
game-dev
game-development
header-only
mit-license
modern-cpp
state-machine
template-metaprogramming

Contributors

andrew-gresyk

93 commits

gitter-badger

1 commits

Languages

C++

98.7%