Skip to content

daBlesr/jme-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jme-state-machine

jMonkeyEngine state machine helps to define complex behaviour using states. This way, one can avoid cluttered code with lots of if-else branches checking if the model is walking or running, then do x or y.. This way complicated physics/input handling that are tight to some states, need only there be implemented.

Implementation and architecture are based on the book "Game Programming Patterns", chapter State. In the examples directory, the code behind the video demo is listed.

The State Machine consists of four entities: ModelStateMachine, Layer, State, StateChange.

The Documentation explains jme-state-machine in the following chapters:

  1. Create a ModelStateMachine
  2. Create a State
  3. Change to a new State
  4. Layers
  5. Complex cases