Return to site

Quantum Hierarchical State Machines

I really like Miro Samek's Quantum Hierarchical State Machines. They solve issues with regular state machines and treat state machines much more like classes. This helps prevent state machine explosion (and spaghetti code).

For a good C# implementation you can get the source code here: 

Also, there is a good GUI tool written in C# for editing the state machine and saving the code into XML format included in that code. Here's a screen shot of some Zombie A.I. I did in the editor and it worked pretty well inside Unity 3D.

broken image

Zombie AI: Hierarchical State Machine

The Zombie A.I. Stateproto file can be retrieved from here: ZombieAI.sm1