I’m creating a mobile game that that has two parts. The first is slow, the second is fast. The second executes after the first has been satisfied.
I was thinking of running the game in a game loop and separating the two stages in the loop:
MainGameLoop:
while (running) {
while (!FirstStage.isDone) {
FirstStage.run();
}
while (!SecondStage.isDone) {
SecondStage.run();
}
}
Is this the correct paradigm? Are there any established game programming paradigm/patterns I can consult?
A good way to go with games is using “State Machines”. Very easy to work with and to extend.