Difference between revisions of "State Machine Frameworks"

From Headbone Creative
Jump to: navigation, search
(Initial page)
 
(Finite State Machine Framework: updated formatting)
Line 2: Line 2:
  
 
== Finite State Machine Framework ==
 
== Finite State Machine Framework ==
Many games use [http://en.wikipedia.org/wiki/Finite-state_machine Finite State Machines] to control the flow of the game. The Finite State Machine Framework consists of three main parts: first is a State object that contains some basic functionality, but has some abstract functions that must be implemented in order to truly be useful. Second is a System object that maintains a list of states and allows them to be accessed from a singular point. Third is a set of enums that define the states in the state machine and the transitions between the states. These enums allow the programmer to easily define in plain terms how the states interact with each other and how one state transitions to another state.  
+
Many games use [http://en.wikipedia.org/wiki/Finite-state_machine Finite State Machines] to control the flow of the game.  
  
For more detailed information, read these pages:
+
This Finite State Machine Framework for Unity consists of three main parts:  
 +
A set of enums that define the states in the state machine and the transitions between the states. These enums allow the programmer to easily define in plain terms how the states interact with each other and how one state transitions to another state.
 
*[[Transition and StateID enums]]
 
*[[Transition and StateID enums]]
 +
 +
A State object that contains some basic functionality, but has some abstract functions that must be implemented in order to truly be useful.
 
*[[FSMState]]
 
*[[FSMState]]
 +
 +
A System object that maintains a list of states and allows them to be accessed from a singular point.
 
*[[FSMSystem]]
 
*[[FSMSystem]]
 +
 +
An example of how this framework can be used to implement AI can be found here:
 
*[[PathEnemy Example]]
 
*[[PathEnemy Example]]
  

Revision as of 03:34, 11 April 2013

This is a set of scripts that work together to allow the programmer to easily setup and maintain a finite state machine for any purpose, with an integrated system for displaying different things (activating GameObjects) based upon the current state.

Finite State Machine Framework

Many games use Finite State Machines to control the flow of the game.

This Finite State Machine Framework for Unity consists of three main parts: A set of enums that define the states in the state machine and the transitions between the states. These enums allow the programmer to easily define in plain terms how the states interact with each other and how one state transitions to another state.

A State object that contains some basic functionality, but has some abstract functions that must be implemented in order to truly be useful.

A System object that maintains a list of states and allows them to be accessed from a singular point.

An example of how this framework can be used to implement AI can be found here:

Display State Framework

The display state framework is built to work with the Finite State Machine framework to allow the game designer to easily manage what is displayed on each state of the State Machine.

For more information, read these pages:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox