Game Menus?

BlitzMax Forums/BlitzMax Beginners Area/Game Menus?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

how much game programming experience do you have? have you ever programmed a game without menus?

the menu is like a program with in a game that stores information globally for the game and for itself. It runs alternatively or as part of the actual aplication main
loop:
 
.game
.
.
.
.mainloop
...if gamestart then 
......game cycle routine........'note this is not a continous loop
...else
......menu cycle routine........'note this is not a continous loop
...endif
.
.
.
.end mainloop
end game

use a global variable such as gamestart to jump from the game loop to the menu loop and visa versa. When the program starts have the variable start as 0 so that it can start at the menu. if game start is selected from the menu then have the variable switched to 1. This will prevent the menu from being displayed and will jump right in to the game. When you are killed have the variable set to 0 again so that if goes back to the menu.
this is not necessarily the best way of doing it but I found it works for me.