Original Post
I remember reading somewhere about a vector statemachine. It was really flexible and its just what i need but i cant remember all the details of how to implement it lol. If anyone could explain it better or show me an article that would be great
[font=verdana, arial, helvetica, sans-serif]basically, you pop on a state to the vector when you want that state to run ( it always runs the last state in the vector ) and if you need states to get information from another state you just stack them on top. Like a STATE_GAME would need information from STATE_SETTINGS, so they would be stacked. but STATE_GAME doesnt need information from STATE_MENU so STATE_MENU is deleted when its not being used.[/font]
[font=verdana, arial, helvetica, sans-serif]basically, you pop on a state to the vector when you want that state to run ( it always runs the last state in the vector ) and if you need states to get information from another state you just stack them on top. Like a STATE_GAME would need information from STATE_SETTINGS, so they would be stacked. but STATE_GAME doesnt need information from STATE_MENU so STATE_MENU is deleted when its not being used.[/font]