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.


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?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.