Read Part One and Part Two first. If you don't already own a copy of "Design Patterns" by the Gang of Four I would recommend checking it out, since it seems to be the definitive reference.

This entry will continue the discussion on the State Design Pattern. It will be broken up into two parts: a) Responses from feedback I've received on the previous two articles and b) Explanation of how we handle input events at the base State class while still providing flexibility for concrete states to implement their own input event handlers. Read the rest of this entry ...

§32 · February 3, 2005 · C++, Software, Technology · Comments Off on Matters of State – Part Three ·


Read Part One for a refresher first. We left that article with the hazy outline of how we can implement a state machine from an application's perspective by deferring state transitions and behavior to State subclass objects (which we still need to write) and have these objects swapped in/out depending on our requirements. We now get into some more detail on this and show a full (yet trivial) example. Read the rest of this entry ...

§24 · January 24, 2005 · C++, Software, Technology · Comments Off on Matters of State – Part Two ·


I mentioned earlier that I'm refactoring some game code to use a State Design Pattern, so I thought I'd write about what I've done in my blog. Read the rest of this entry ...

§22 · January 23, 2005 · C++, Software, Technology · Comments Off on Matters of State – Part One ·