• Advertisement
Sign in to follow this  

Menu / Game Levels

This topic is 4437 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Im trying to get back into programming. I have a quick question. I wanted to make a simple 2d opengl game. What am wondering about is how to go about rendering different parts of a game. Like do you have a "gamestatus" variable and have it like: 0 = main menu, 1 = level one, etc then put it in the render loop? Just wondering how you would do something like that ?

Share this post


Link to post
Share on other sites
Advertisement
Try having an Object or Class as a Menu and create an array of them, one for each menu screen and draw them when the gamestatus variable equals the menu number or simply have gamestatus be the index value in the menu array.


lpMenus[gamestatus].Draw();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement