Game state management (Game, Menu, Titlescreen, etc)
- by munchor
Basically, in every single game I've made so far, I always have a variable like "current_state", which can be "game", "titlescreen", "gameoverscreen", etc.
And then on my Update function I have a huge:
if current_state == "game"
game stuf
...
else if current_state == "titlescreen"
...
However, I don't feel like this is a professional/clean way of handling states. Any ideas on how to do this in a better way? Or is this the standard way?