Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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