Adding Menu Interface to my game

Started by
1 comment, last by VisualB4BigD 22 years ago
Ok so I have made a game that can load levels and stuff. I don''t have any kind of interface for it though. When you click the exe it opens and you are directly in the game. I want to make an interface so I can open levels and change options and stuff. Is it to far in the game to do this or is there somehow I can just add it into the current code. Like by makeing a seperate exe or something. Any comments? I sure hope this world isn''t one big joke, because I don''t get it.
Advertisement
Well im not sure what you''re programming this game in but ill assume c or c++. In the game im working on i did what you are trying to do. Someone in the beginning of your main function you''ll call a function that sets the video mode, for example the 256 color vga mode. If you create the menu interface prior to calling this function, everything you do will be in regular text mode. For example in my game...
main()
{
int a, b, c, mapnum, loop, q;
int kx = 1;
int ky = 1;
char direction;
int a2, b2, c2, t;
int playerxposition = 7;
int playeryposition = 5;
mapnum = 0;
/* put your text interface here, before the set mode function */
set_mode(VGA_256_COLOR_MODE); <---this line sets graphics mode



This might not help at all if you''re programming somthing for windows, but for a simple dos game, this will work.
...and that's where I saw the leprechaun...he told me to burn things.
The obvious choice is not to write your game for DOS. You should probably use the D3DX text functions to print the text on the screen. You could have some hardcoded vertex positions for the buttons in the menu, and just check if the mouse pointer was in there when it was clicked. To save the settings you could just use a text file. The fstream classes are the easiest way to do this.

Proceeding on a brutal rampage is the obvious choice.
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)

This topic is closed to new replies.

Advertisement