FlowTask documentation
FlowTask is a C# library for writing game progression (screen transitions, dialogs, character behavior, cutscenes, tutorials) step by step with async/await. The structure of your code (scopes) decides how long a flow lives, how it is canceled, which game time it runs on, and how its failures are handled. The same core works on .NET, Unity, and Godot.
async FlowTask OpenShop(Shop shop){ using var window = shop.Open(); // closed when this flow ends, however it ends var r = await FlowTask.Race(window.Purchased.Next(), window.Closed.Next()); if (r.TryGet0(out var item)) await Purchase(item);}Getting started
Section titled “Getting started”- What is FlowTask?: the problems it solves, where it fits, and what it leaves to other mechanisms
- Installation: .NET, Unity, Godot
- Your first flow: build a small flow and see the basics in action
- Flows and the World
- Scopes and cancellation
- Composition: Race and WhenAll
- Time and Clocks
- Signals
- Handling failures
- Threads
Engines
Section titled “Engines”- Unity: Setup, GameObject lifetime, Bridges, Samples
- Godot: Setup, Node lifetime, Signals, Physics frames, Samples
Integrations
Section titled “Integrations”- Task and ValueTask
- UniTask (including migrating from UniTask)
- R3