Gamestates
Posted: Mon Dec 19, 2011 10:20 pm
Can someone explain the basics of gamestates for me please? I have read some people suggesting stuff like hump and other libraries, but i want to try and build it myself first.
I don't quite understand it, like how you "wrap" the, let's say game code, and separate it from the menu code?
Do you just take all the game code and throw it into a function, then run that function when the user presses "Start" on the menu? (which itself is a menu function?)
Thanks!
I don't quite understand it, like how you "wrap" the, let's say game code, and separate it from the menu code?
Do you just take all the game code and throw it into a function, then run that function when the user presses "Start" on the menu? (which itself is a menu function?)
Thanks!