Difference between revisions of "State Machine Frameworks"

From Headbone Creative
Jump to: navigation, search
(Finite State Machine Framework: updated formatting)
(Display State Framework: Added links, updated info)
 
(2 intermediate revisions by one user not shown)
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.  
+
Many games use [http://en.wikipedia.org/wiki/Finite-state_machine Finite State Machines] to control the flow of the game. This particular framework is based upon work from the [http://wiki.unity3d.com/index.php?title=Finite_State_Machine Unity Wiki], but has been modified in such a way to allow the base functionality to be re-used over and over again. This part of the Toolbox is released under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution Share Alike] license.  
  
This Finite State Machine Framework for Unity consists of three main parts:
+
This page explains all of the details of the FSM framework, and how to use it in your own game:
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.
+
*[[Finite State Machine]]
*[[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.
+
== Display State Framework ==
*[[FSMState]]
+
The display state framework allows you to easily change what is displayed on the screen depending upon a certain State, which is really just a string identifier.  
  
A System object that maintains a list of states and allows them to be accessed from a singular point.
+
Download the [[:Category:Integration Scripts|Integration package]] to get the DisplayState, which 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.
*[[FSMSystem]]
+
 
+
An example of how this framework can be used to implement AI can be found here:
+
*[[PathEnemy Example]]
+
 
+
== 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:
 
For more information, read these pages:
Line 24: Line 16:
 
*[[DisplayStateListener]]
 
*[[DisplayStateListener]]
 
*[[DisplayStateActivateOnChanged]]
 
*[[DisplayStateActivateOnChanged]]
 +
*[[DisplayState]]
  
 
[[Category:State Machines]]
 
[[Category:State Machines]]

Latest revision as of 02:23, 23 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.

[edit] Finite State Machine Framework

Many games use Finite State Machines to control the flow of the game. This particular framework is based upon work from the Unity Wiki, but has been modified in such a way to allow the base functionality to be re-used over and over again. This part of the Toolbox is released under the Creative Commons Attribution Share Alike license.

This page explains all of the details of the FSM framework, and how to use it in your own game:

[edit] Display State Framework

The display state framework allows you to easily change what is displayed on the screen depending upon a certain State, which is really just a string identifier.

Download the Integration package to get the DisplayState, which 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