Archived

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

GekkoCube

how to program the presentation (menu interface) of a game?

Recommended Posts

By "presentation" i mean the title, credits, menu''s...etc. Im wondering if a 3d game still uses the 3d engine for the presentation? for example, i would like to start on that on my game now. but i need to know if such menu''s are done with billboards/quads, or blitting? Honestly, I have no clue as to how the menu''s are done for a 3D game such as Super Mario World. Can somebody lead me or show me to the answer? thanks.

Share this post


Link to post
Share on other sites
Im not sure how this would be done in directX i have virtually no experience with it, but in opengl you could simply switch to ortho projection and draw textured quads for everything. Thats how I did my gui.

Basically a CWindowElement base class, then have everything else you want derive from that
CButton : public CGuiElement
CListBox : public CGuiElement
CTextBox : public CGuiElement

and so on....

each object overriding the Draw function and whatnot...

works good. and you can easily build your menu from a text file.

Share this post


Link to post
Share on other sites
quote:
Original post by dopeflow
Im not sure how this would be done in directX i have virtually no experience with it, but in opengl you could simply switch to ortho projection and draw textured quads for everything. Thats how I did my gui.

Basically a CWindowElement base class, then have everything else you want derive from that
CButton : public CGuiElement
CListBox : public CGuiElement
CTextBox : public CGuiElement

and so on....

each object overriding the Draw function and whatnot...

works good. and you can easily build your menu from a text file.


Looks very similar to mine...

ScrollBox_C : public baseObject_C
TextBox_C : public baseObject_C
Label_C : public baseObject_C
etc, etc

And, I also use virtual functions for my draw, mouse down/up, key down/up, so it seems our GUI''s have much in common (it''s also in gl).

All my objects can be set to call a function per frame, which is usefull for things like a clock, where each frame it''s function gets called, and that function can update it''s caption to display the current time. Also, command buttons has to be passed a function to be called when it''s clicked, so it can do something . I also simply use quads to display my windows + objects.

Share this post


Link to post
Share on other sites
You would use state based processing. This concept is explained and implemented exceptionally well in Jims Adams book "Programming RPGs with DirectX".

[edited by - Ethereal on May 7, 2003 12:44:04 PM]

Share this post


Link to post
Share on other sites