Archived

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

Interfaces for games

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

Was wondering if someone in a few short words could explain how interfaces for games are made/implemented. A friend and I are working on a RPG and I want a skill window that can be popped up and hidden so the player can buy new skills. Much like in diablo where you hit a button to bring up a skill window or a inventory window. Are those just specialized child windows in the main window. Ive looked through many books trying to find out how to do it but have had no luck. Any insight would be appreciated. BuddyLee

Share this post


Link to post
Share on other sites
As far as the OS is concerned, it''s all just one window. The skills window is just another image drawn on top of everything else. The buttons and tabs are more images drawn on top of that.

Share this post


Link to post
Share on other sites
Sounds like you want a windows-type GUI system. So you can either write your own (although you''ll probably need some OO skill), or use one that''s prebuilt (eg. MS has the MFC, Java has the AWT etc).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You want to draw a flat area with some stuff in it, on top of all the other stuff you''re drawing.

You already have a graphics system, don''t you? Just set the camera to orthographic mode, and draw whatever you want. I don''t see the problem.

Share this post


Link to post
Share on other sites
We are actually just starting production of the game I was just curious how it was done. Do you just draw like a rectangle for the window and put the text for the skills and what not in there and then the "button" of sorts would just be a image that if the mouse is clicked would have to be checked if it clicked on a skills button? Or are there built in controls for making buttons that will automatically respond to a mouse click? Im using Visual C++ 6.0 and DirectX.

Share this post


Link to post
Share on other sites
There are no built in controls in APIs, or methods within directX or OpenGL to handle a GUI. Well, you could use the windows operating system to draw you windows, buttons, and use callbacks, but most games have their own GUI to handle the controls, inputs and popup windows. And that involves checking mouse clicks, windows positions, drawing icons upon textures upon textures upon more textures, fonts, highlighting buttons, ect... It''s mostly done from scratch and it''s a royal pain in the butt to design one usually (if you want a very nice, reusable, very flexible GUI). And you''ve got the modal / modeless dialogs, ect.... OO design is a requirement, or you''ll get lost in no time. Ever tried coding with Win32? Now that''s a heap of junk.

Share this post


Link to post
Share on other sites