Interfaces for games
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
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.
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).
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.
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.
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.
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.
I suggest in-game states.
- Rob Loach
Current Project: Upgrade to .NET and DirectX 9
Percent Complete: X%
- Rob Loach
Current Project: Upgrade to .NET and DirectX 9
Percent Complete: X%
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement