I wrote my own state machine tool in C and at this point I'm faced with two choices for specifying state machines.

  1. Crafting a little language and writing a interpreter.
  2. Writing a compiler for that language.

I know the advantages/disadvantages of each. I'd like to know what choices game programmers have made for their games. If you've used a state machine in your game in any form, I'd be interested in knowing how you did it.


1 Answer 1


I've always done it with function pointers and ints or enums for states. Granted, the state machines themselves are written in native code. Why do you want to make a language to specify your state machines?


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .