Jump to content
  • Advertisement


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


Game Interface using DirectDraw

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

Hello, I am creating an RPG and would like to know the best way to create the game interface (i.e. messages for dialog, shops, etc). Should I simply create new windows for them, or is there an easier way to do it? Thank you :-D

Share this post

Link to post
Share on other sites
This is the kind of question that really has no answer. Unless you are using the Win32 GUI routines with your DDraw game, then there will be quite a bit of effort involved. And I don''t recommend you use Win32 GUI routines in your DDraw window. All sorts of issues could crop up with that, performance issues being one of them. If the DDraw window is a child window, then it''s a different story. You could use edit boxes, labels or whatever to layout around the DDraw window.

However, if whe you say ''windows'' in your post you mean your own custom UI, then there is no ''easy'' way. The ''easiest'' way would be to draw filled rectangles and blit the text on top of that at a fixed line length, one line at a time. Get more complext and add line-wrapping, or word-wrapping to the text output. Allow your ''windows'' to use bitmaps. Make several custom controls... it can be as complex or as not-so-complex as you have the desire/time for it to be.

You could of course forgoe windows alltogether and just draw the text of conversations over a characters head. Or just have one corner of the screen real-estate set aside for all text output. Regardless, you will need to code up the text output functions, load in fonts (several ways to do that), handle mouse/keyboard input for your custom windowing system if you make it, yadda, yadda.

Is there an easier way? Yeah. Use a RAD tool like Delphi or VB to build your interface and output your text, with the game action in a child window. I doubt that''s what you want There''s an article here in the resource archives by Mason McKusky (sp?) on designing a C++ GUI system using DDraw. Might want to give that a look through.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!