Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualServant of the Lord

Posted 16 July 2013 - 06:33 PM

Is the main game same thing as the game loop?

 

No, the main menu, the gameplay itself (which can be broken into various forms even in a single game), the in-game menu, and everything else are all inside the game loop. The game loop contains everything show to the player visually, and everything done logically, aside from the very initial initialization and the very end freeing of resources.

 

It various from game to game, what is done before and after the main loop, but the main menu should occur inside the game loop. The main menu just a different "game state" within the loop. 'Combat' may be a different game state,  'Exploring' may be a different state, same with 'Shopping', 'NPC Dialog', 'Loading screen', 'main menu', 'in-game microtransaction store', and more.

 

Even though you might be using a different API, or perhaps even an entirely different language, this article explains game loops decently well, and this article explains game states, and it applies to most APIs and most languages - though some APIs hide the game loop from you, depending on how high-level they are.


#1Servant of the Lord

Posted 16 July 2013 - 06:31 PM

Is the main game same thing as the game loop?

 

No, the main menu, the main game, the in-game menu, and everything else are all inside the game loop. The game loop contains everything show to the player visually, and everything done logically, aside from the very initial initialization and the very end freeing of resources.

 

It various from game to game, what is done before and after the main loop, but the main menu should occur inside the game loop. The main menu just a different "game state" within the loop.

 

Even though you might be using a different API, or perhaps even an entirely different language, this article explains game loops decently well, and this article explains game states, and it applies to most APIs and most languages - though some APIs hide the game loop from you, depending on how high-level they are.


PARTNERS