Search Unity

SimpleFSM: a Powerful (yet Simple) Finite State Machine Implementation

Discussion in 'Assets and Asset Store' started by coAdjoint, Dec 5, 2014.

  1. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    SimpleFSM

    Hi Guys,

    I've just released SimpleFSM, a finite state machine implementation for Unity. It's based off the following YouTube video:



    The asset is an example project demonstrating the system in action. The code is well commented, allowing you to use the system in your own scripts in minutes!

    Benefits:

    - No messy logic, switch statements or jumbled code in your Update: each state each has it's own method, keeping big FSM code manageable.
    - 'Fire and forget' long tasks: does your state's main code take more than a frame to complete? If you're code is running in the Update then this can be really difficult to implement. SimpleFSM makes this easy, allowing you to start and clean up these long running methods (such as hearing, patrol routes etc) without writing messy code.
    - Run custom code when exiting and entering states: very convenient for starting tasks that run in the background for the whole time AI is in a state.
    - No artefacts or leaks from previous states: SimpleFSM allows you to run coroutines in states and stop then when you enter a new state.
    - It's SUPER cheap!

    I've also included a free WYSIWYG patrol route editor for enemy AI and a patrol route system using the NavMesh. The editor allows you to create and editor patrol points without using game objects, meaning no messy code referencing patrol point transforms!

    LINK TO THE ASSET STORE:

    https://www.assetstore.unity3d.com/en/#!/content/25835

    Feedback, comments and questions very welcome!
     
    Last edited: Dec 11, 2014
  2. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    Hi Guys,

    Just wanted to thank anyone who's bought SimpleFSM so far, had an excellent response and we have a good rating on the Asset Store. Let me know if you're using it!

    Cheers,

    Tom