We are making a game with a playing character that will have several different states. In most examples I see a switch statement in the controllable charactor based on the state. Is this the standard way that things are done for most games? Or is it better to create a set of states that handle the animation and logic of that state. It seems like the latter would create a lot of classes that may not be necessary but would have more flexibility. The case statements would make the code more messy but would have less overall files. I know that for AI type functions it would be better to use the state model. I guess what I am getting at, should i be making a state object for simple things as 'walkleft', 'walkright'? Or is there a better way to do things that i'm missing?
Thanks, hope this is clear enough.