-
Notifications
You must be signed in to change notification settings - Fork 0
Home
hsm-statechart is a fast, lightweight, state machine implementation written in C, based on UML statecharts.
There are other statechart implementations out there, so what's so good about hsm-statechart?
- A liberal license for games and indie development.
- The creation of state machines directly in code.
- An easy to understand hierarchical engine, with low policy requirements on user code.
- It's written in C and ports easily between OSX, Win32, and mobile platforms.
In addition hsm-statechart supports:
- Zero dynamic memory allocation in its core API.
- Optional per state instance data in the extended API.
- A compact declarative interface.
- [Lua] [ completely optional ]
The Stop watch tutorial provides a good overview of the system for both C and LUA. Event handlers provides more information on creating event handlers in C, and the Lua page provides more information on the Lua implementation.
Hsm builder provides a declarative interface above the core of hsm-statechart
for more easily defining states.
The UML guide ( and Regions ) compares hsm-statechart
's implementation with the UML statechart specification, while Resources provides links to more information about state charts, and other great projects.
There's also some thoughts on Future Work and C++ extensions, as well as a short list of Changes from prior versions.
The project hasn't been updated in quite a while. It still works, though, and could provide a good solution or starting point for some folks.