Finite State Machine / Behavior Tree
Personal Project (Program Control)
Finite State Machine:
During the development of Arbor Vitae it became clear that a flag-based FSM was not practical for the
complexity of the project. Although the competition version featured the flag-based FSM, a later version was converted to use a
Hierarchical State Machine. This later version was able to replicate several months worth of
Flag-Based dedicated coding in a few weeks of casual programming. This code uses C# Delegates to call behavior functions. One of the
major focuses of this code is to create a series of creation functions and properties to allow programmers to easily change the FSM during runtime,
or to possibly use a scripting engine to allow FSM creation from a text file.
Behavior Tree
A C++ version of the Finite State Machine was created with additional functionality. It addressed some oversights in the original FSM.
The primary addition were Sequence Nodes, which allow the Behavior Tree to dynamically react to return codes from the states it calls.
The Behavior Tree is used to manage game states and AI in Chomp: Sharks of the Seven Seas.
DEVELOPMENT STATUS:
Completed 2008
VITAL STATS:
Language: C++ & C#
Platform: PC
Dev Time: ~5 weeks
Designer: Tim Turner
NOTEABLE FEATURES:
*Hierarchial State Machine
*Easy-to-use design paradigm
*Behavior Tree functionality
DEMOS AND CONTENT:
Behavior Tree Implementation: |
FSM Implementation: |
Source Code Sample: |