![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Oct 2009
Posts: 11
|
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 |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Oct 2007
Posts: 471
|
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. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Oct 2009
Posts: 11
|
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. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|