
Flow Party is an expressive C# framework that simplifies the creation of a wide range of game behaviors. It’s faster than Coroutines, more powerful than HSMs, and more intuitive than Behavior Trees.Flow Party is independent of any render pipeline.In many ways, Flow Party feels similar to Coroutines, Hierarchical State Machines, and Behavior Trees. But there are some major differences. Let’s take a look.Flow Party vs. Coroutines🚀 Better Performance – Flows offers significant performance improvements over Coroutines, specially for complex behaviors.🧹 Zero Garbage During Execution – With over 30 flows available, none generate garbage during execution – except for the Switch flow.🤖 Full Control Over Updates – You can choose where to update your flows – whether in Update, FixedUpdate, or any custom function.💾 State Persistence – Unlike Coroutines, flows retain their execution state when their GameObject is deactivated.💾 Save and Restore State – By following simple design principles outlined in the Flow Party Guide (mostly avoiding closures), you can save and restore the execution state of your flows.🥇 Refined Execution Control – Running flows in parallel, sequentially, conditionally, for a set duration, repeatedly, or until another flow completes is simple and straightforward. Flows represent the state-of-the-art in execution control.Flow Party vs. Hierarchical State Machines😊 Simple & Straightforward – If you only need a simple State Machine, Flow Party can provide you with a simple and concise State Machine.🧠 Scalable Complexity – Need more power? You will be able to evolve your simple State Machine into a Hierarchical State Machine on steroids.🤝 Integration – FlowMachine is the full-fledged Hierarchical State Machine solution. Watch the "Flatland Player" video to see its elegance and how powerful it becomes when combined with other flows. FlowMachines are also flows, so they can be used and controlled within any other flow in the framework.Flow Party vs. Behavior Trees🎭 Expressive – Flow Party has a rich set of flows that are more intuitive and closer to how people think, compared to the nodes in Behavior Trees.🌲 MonoBehaviour Trees – Flows have only two states: running or not running. This simplicity enables Flow Party to treat MonoBehaviour scripts as flows. As a result, one flow can orchestrate the execution of multiple MonoBehaviour scripts, which in turn can control additional MonoBehaviours, effectively forming a MonoBehaviour Tree.With all of this in mind, it must be clear: Flow Party isn’t just another tool – it’s a foundational framework for creating a wide range of game behaviors. Here are a few examples of what you could do with it:Break down complex behaviors into simpler, more manageable behaviorsExecute actions with precise timingSequence audio events, camera movements, and cutscenesCreate intelligent NPC AI behaviorsStreamline quest and mission logicControl UI animations and transitionsImplement dynamic and responsive player controllersOrchestrate the entire game at the highest level of abstractionCompatibility – Flow Party requires Unity version 2022.3 or newer.Garbage Generation – Out of the 30+ flows in the framework, only the Switch flow will generate garbage after instantiation, and only when it starts running – not during execution. This garbage is caused by boxing of value types during case value comparisons. Overall, any garbage generated during flows execution will come from your own method implementations, not from the Flow Party framework itself.MonoBehaviour Trees – Classes directly derived from the MonoBehaviour class can be treated as flows by Flow Party without any additional modifications. However, for a MonoBehaviour to fully align with the flow philosophy, Flow Party provides two additional MonoBehaviour-derived classes for inheritance. This is exemplified and explained in the documentation.Flow Party & LLMs – Arguably, code that is more intuitive for humans is also easier for LLMs to understand and generate.Required programming skills – If you're comfortable with C#, you’ll be dancing and singing with Flow Party in no time. If you’re less familiar with C#, you’ll need to learn some basics to get started: how to create objects, call methods, write functions, and use delegates. For more advanced use of the framework, you’ll need to learn about out parameters and class inheritance.