Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Adding Menu Interface to my game

This topic is 5866 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

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.

Share this post

Link to post
Share on other sites
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...
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.

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!