DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > General Development
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-07-2009, 03:51 PM   #1
Isoprog
New Member
 
Join Date: Oct 2009
Posts: 11
Post Game State Machine

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
Isoprog is offline   Reply With Quote
Old 11-08-2009, 07:57 AM   #2
fireside
Senior Member
 
Join Date: Oct 2007
Posts: 471
Default Re: Game State Machine

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.
___________________________________________
http://fireside7games.com/

Last edited by fireside : 11-08-2009 at 08:42 AM.
fireside is offline   Reply With Quote
Old 11-08-2009, 10:52 AM   #3
Isoprog
New Member
 
Join Date: Oct 2009
Posts: 11
Default Re: Game State Machine

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

Last edited by Isoprog : 11-08-2009 at 11:04 AM.
Isoprog is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 01:57 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.