Today I am officially releasing Stately, a C# system for creating state machines to structure your game code.

I developed this project because I was frustrated with the lack of structure I saw behind the scenes in a lot of game code. It's flexible, facilitates readable code, and is simple enough that even novice programmers should be able to use it.

It's open-source, unit tested and licensed under GNU LGPLv3. Check it out!

The project includes an example for Unity, but the code is engine-agnostic and will work with any engine that uses C# scripting.

It's even being used in production on a small VR project:

@thatcosmonaut Oooo I’ll check this out!! I did up my own state machine stuff for player interaction in a project, but this is probably more robust!


yea i feel like people usually end up rolling their own solutions for stuff like this, i'm tired of us reinventing the wheel constantly as game programmers! that's why i released this open-source

@thatcosmonaut This looks cool. I wish I did C# dev so I could check it out

@thatcosmonaut this is sweet; one suggestion you might find interesting, that I did for my own C# state machine system, is auto-detecting function signatures and mapping them to named states. Can be useful to limit 'setup' code and keep code cleaner and more organized overall. Reflection is awesome.

Sign in to participate in the conversation is Fast and Stable instance.
This instance isn't focused on any theme or subject, feel free to talk about whatever you want. Although the main languages are English and Japanese, We accept every single language and country.
Everyone is welcome as long as you follow our code of conduct!