Archived

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

RageMatrix

DirectDraw graphical menu or full-screen dialog?

Recommended Posts

Hi all! I have got to the stage in my game now where I need to implement a menu system on the title screen to get information to the program like network settings, no of players, etc. My question is, how have other people here implemented a menu system in fullscreen? Its a pretty simple menu that I want to implement: - New Game - Single-Player - No of Bots - Arena - Multi-Player - Host Game - IP Address - No of Bots - Arena - Join Game - IP Address Quit Any ideas on how to implement this? Should menu item be a Sprite and the selector sprite move up and down to certain XY co-ords that relate to each menu item? Would it look really bad just to implement a full-screen dialog as in the DX8 DirectDraw SDK example? Any suggesstions would be gratefully received. Thanks RM -=Kicking Butt and Writing Code=-

Share this post


Link to post
Share on other sites
I haven''t seen the code example you''re talking about, but I''m thinking that a fullscreen dialog wouldn''t look very good. If you were creating a game that ran in windowed mode instead of fullscreen, and used lots of Windows dialogs for options settings and everything, then I could see using a dialog. But for something like this, you''ll probably want a menu that looks more consistent with the overall appearance and atmosphere of your game.

What you were talking about sounds fine, using a selector sprite like an arrow or something to simply point to the current option. Or you could write the current option in a different color text so that it''s highlighted. That''s what I usually do, and I''ll have the highlighted option changing in brightness, getting a bit darker, then a bit brighter, cycling like that, so it looks like it''s glowing (like this). That''s not an animated picture so you don''t see the color change, but you probably know what I''m talking about.

-Ironblayde
 Aeon Software

Down with Tiberia!
"All your women are belong to me." - Nekrophidius

Share this post


Link to post
Share on other sites
G''day!

Often I use Windows dialogs at first, just because you can throw them together really quickly, but you don''t want your game shipping with them.

Windows dialogs are great for getting a prototype running, but other than that I can''t recommend them. Expecially since they no longer work in fullscreen mode with DX8.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Both Half-Life and Age of empires 2 uses a fullscreen dialog
and they don''t look too bad, even though the team-arena menus rock =)

Share this post


Link to post
Share on other sites

Okay....its nice to know that I''m on the right track, at least. So, if I was to implement a DirectDraw graphical menu, would it be something like this?

Create a bitmap of the menu items and place on the screen at specific co-ords. Store these co-ords as structs in an array, in order of position, either up or down. Have another sprite as a selector, and if the up or down keys are pressed, cycle through the array and draw selector sprite at the appropriate menu item bitmap. If selection key is pressed, find out which menu item was selected by comparing selectors current position co-ords to that of the menu items.
The problem, as I see it, is that I would then have to implement my own graphical text boxes to input data to the program. I have no idea how to do this. Do I use GDI to display and input text?

Does anyone have any examples or source code for this kind of thing? (preferably not MFC) Full-screen dialogs have their own text boxes and radio buttons and the like. I''m not really sure how to implement this stuff on my own.

Thanks for any info..

RM

-=Kicking Butt and Writing Code=-

Share this post


Link to post
Share on other sites
Well, I wrote something like that, but the implementation is kinda weird and depends on the rest of my DirectX-stuff. But it''s not all that hard to do... I used textfiles to describe the menus, so I could just load those. Every Element (like a Textbox and so on) was a child object of CElement, so that I could just create them, put them in a linked list and redraw them anytime they needed to be redrawn.
The CMenu-class has a surface on which all the elements are rendered, and i just put this surface on the screen every frame. It is a bit of work, although the worst imo is the handling of the incoming events (like Clicks and so on).

There is also a series of Tutorials here on Gamedev which you might want to read to get some ideas.

All this does take a lot of time to do, at least if you want to do it good, but I would say it''s worth it as you can reuse it later on (at least if you do it well )

Share this post


Link to post
Share on other sites