top of page

The Power of Flow Machines

Flow Machines are the most powerful flows in Flow Party. They derive their strength from being perfectly integrated with all the other flows in the framework.


This post shows a solid example of their usage: a 2D Player Controller with multiple states — Idle, Running, Jumping, Falling, Hurting, Dying, Spawning, Victory, Landing, Dashing, and BlowingUp. You could also easily add new states for actions like Shooting, Defending, Singing, Dancing, and so on — your creativity is the limit.


This is the "Flatland Player" example from the Unity Asset Store (if you've seen it).


Before diving into the flow scripts, let’s take a look at the Animator Controller for this example. If you're using 2D sprite animations, you can achieve a dead simple Animator Controller setup:



Zero transitions! This is the maximum joy you can ever get from an Animator Controller! XD


Okay, so here are the full script examples (click to expand):




All of these scripts form the Player2D class — it’s simply been split into multiple files (which has nothing to do with Flow Party itself).


As you might have noticed, the code is highly structured, with almost no variables to keep track of time or other states — nothing like the usual spaghetti code found in traditional MonoBehaviour scripts.


Now… consider that flows, like the ones in these examples, can easily orchestrate the execution of entire MonoBehaviour scripts — each encapsulating independently developed behaviors — and you'll begin to realize the sheer power of Flow Party. It offers unmatched flexibility in game development, making it possible to create everything from high-level AI to procedural animations and even music!



If the previous scripts felt like too much at once, just check out the Simple Flow Example post — your learning journey with Flow Party can start off much more gently!




*One last note: Flow Machines are simply flows. So you can nest one inside another, execute them in parallel, in sequence, or every 30 seconds for 5 seconds — whatever makes the most sense for the game mechanics you want to create.

February 16, 2025

bottom of page