Archived

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

Arsouille

Very simple GUI

Recommended Posts

I''m writing a Bomberman whith net support. (Another one ) The core is done, but i don''t know how can i make for the menu, the user will have to choose a player name, a number of player, a server name, ... I use directX for graphics. Can you give me link on resource which can help me or any clue to solve my problem. (Sorry for my english, feel free to correct me if you can understand me.) Ars

Share this post


Link to post
Share on other sites
i was looking at it the other day, but browse through the articles and resources section there is a series of articles on setting up a gui system for a game. doesnt go into specifics but theres alot of good ideas you can take away from it.

Get busy livin'' or get busy dyin''... - Shawshank Redemption
If a man is talking in the forest, and no woman is around to hear him, is he still wrong? - Unknown
Fulcrum

Share this post


Link to post
Share on other sites
Check this out:
http://www.gamedev.net/reference/programming/features/gui/
It explains how to implement a gui for a game. It is very simple
imho. If you want completly something simple than just create a switch statement representing game states, something like this:


-- global section ---
#define MAIN_MENU 0
#define GAME_INPROGRES 1

int game_state = MAIN_MENU;

-- rederer section ---

switch(game_state)
{
case MAIN_MENU:
show_my_menu();
break;
case GAME_INPROGRES:
show_my_game();
break;
};

void show_my_menu(void)
{
if(mouse_coord == START_GAME)
{
setup_new_game();
game_state = GAME_INPROGRES;
}
if(mouse_coord == END_GAME)
{
quit_the_game();
}
}

void show_my_game(void)
{
if(ESC_is_pressed)
game_state = MAIN_MENU;
}


this is very simple but not flexible at all, although in any case you need game states.

Share this post


Link to post
Share on other sites