Free City Park Environment Collection now available

Stack-Based Hierarchical Finite State Machine (C++ & Blueprint)

Ali El Saleh - Jan 14, 2020

A Finite State Machine allows you to create clean, maintainable 'non-spaghettified' code. With a stack-based hierarchical implementation, you are able to stack multiple states and remember what state you were in while having greater control in each state.

  • Supported Platforms
  • Supported Engine Versions
    4.22 - 4.25
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

Declutter your Blueprint and C++ code with a stack-based finite state machine!


FSM is the base class for components that define a reusable Finite State Machine behaviour for all types of Actors.

It is an abstract machine that is more complex than a regular state machine and can only be in one state at any given time.

This FSM can change from one state to another using the pushdown automaton (Push and Pop) system. An added benefit for remembering what state the machine was in.


You can also get access to the private source code repository on GitHub after purchasing this plugin! Just send me an email of the receipt that you purchased this plugin and your GitHub username to elsaleh78@gmail.com, then I'll add you to the repo and give you access!


Networking features implemented by: Arkanoid


Support Discord Server: https://discord.gg/jVw7YAr


Demo video: https://youtu.be/bhlBp_fCYbw

Demo build: https://drive.google.com/open?id=10xsqqChdPLzcT2K5b7cNlv_g8sbkV8Bb

Offline Docs: https://drive.google.com/file/d/1gKNLq0ZsHzgIyDBqQ5CdOiGGUszkluVF/view?usp=sharing

Technical Details

Features:

  • States are extendable through blueprints
  • History States
  • Automata-based hierarchical implementation of a Finite State Machine.
  • Input handling for each state object
  • Enable/Disable the update event for each state object
  • Enable/Disable input handling for each state object
  • 5 blueprint native events per state object: Init, Enter, Exit, Update and Handle Input
  • Ability to debug the state machine at runtime
  • Error handling to prevent crashes (To tell you what is happening at runtime!)


Code Modules:

  •  StackBasedFSM [Runtime]


Number of Blueprints: 0

Number of C++ Classes: 2

Network Replicated: Yes

Supported Development & Target Build Platforms: Win64, Win32, MacOS, Linux, Android, IOS, PS4, XboxOne, Switch

Documentation: alielsaleh.com/ue4-plugins/stack-based-fsm-docs

Guide: alielsaleh.com/ue4-plugins/stack-based-fsm-guide


Important/Additional Notes:

  • If you don't have the latest engine installed, you may not have the latest plugin version.
  • Updates are pushed out for the 2 latest engine releases only.