View Full Version : Game State Machine
Isoprog
11-07-2009, 02:51 PM
Hi,
Can someone tell me about a good tutorial or site, with the help of which, I can make a good usable game state machine? It does't matter what game engine it uses.
regards
fireside
11-08-2009, 06:57 AM
I've never actually looked at someone else's code on that, but with any state machine it's usually just setting up some constants or enums and using a switch case. That would be in the main loop, so you change the game state and then it switches to main menu or level loops. Don't know what your programming level is, but you generally use the same idea for game entities. A door has an open or closed state. An enemy has idle, attack, etc. If it's more complicated then that, let me know.
Isoprog
11-08-2009, 09:52 AM
thanks, ok i have got some idea, and try to implement this. when i will stuck on something i will come back to ask further.
thanks
regards
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.