Sign in to follow this  

Custom GUI - DirectX - Gametype not decided

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

So I need to decide exactly how to do my GUI. I've already decided I want to use DirectX, but I'm at a loss of what quite exactly to do with it. I've implemented a basic relationship between parent, child windows and such and at the minute they are drawn through 1 large sprite. I plan in the future to have 1 sprite for the main window, 2 for minimise and maximise, and 1 for close window.

My question is this: Is using sprites (i.e textures that I have to manually make)
the best way to be doing this?

Furthermore, would using the classes D3DXFONT and ID3DXSPRITE be a bad idea?

D3DXFONT:
AFAIK, people complaining about speed drops were either doing it wrong, or the drop was mostly overhead and they could render 1 line of text and receive an x fps drop and then they could go and render 40 and still only receive an the drop in fps they had before plus a tiny margin.

ID3DXSPRITE:
I'm really not sure about this one. Seeing as I intend to draw most, if not all my controls using this method It needs to be fast If I want to be able to have many windows, with shiny animations (possibly billboards). Haven't particularly heard any gripes about this one but it remains to be seen.

I would really appreciate some detailed input from those of you who have wrote your own extensible GUI system or know about it. Any other tips you have will be welcome. Thanks.

Share this post


Link to post
Share on other sites
What is this for? Are you set on making your own gui from scratch, or do you just need a flexible gui for your game?

If you're open to using another tool, there's lots of flexible gui libraries out there that will take care of all this for you. I just started playing with CEGUI and it looks pretty good, looks like I can produce a good gui in a couple hours instead of the months it would take me to write this all myself. You can get some idea what you can achieve looking at some screenshots

Best of luck if this is something you want to take care of on your own, but if you're just trying to make games, I'm not sure if you really want to reinvent this particular wheel. There's a lot that goes into a good gui system.

Share this post


Link to post
Share on other sites
Quote:
Original post by karwosts
What is this for? Are you set on making your own gui from scratch, or do you just need a flexible gui for your game?

If you're open to using another tool, there's lots of flexible gui libraries out there that will take care of all this for you. I just started playing with CEGUI and it looks pretty good, looks like I can produce a good gui in a couple hours instead of the months it would take me to write this all myself. You can get some idea what you can achieve looking at some screenshots

Best of luck if this is something you want to take care of on your own, but if you're just trying to make games, I'm not sure if you really want to reinvent this particular wheel. There's a lot that goes into a good gui system.


Mostly I wish to gain experience. I haven't really done any difficult programming as such and I am trying to focus on being able to implement core principles and concepts myself. Does anyone have any further suggestions? I would really appreciate some more guidance :D What I don't want to do is write x thousand lines of code utilising and designing this system and then find a fatal flaw which ruins the entire system =/

Share this post


Link to post
Share on other sites
If you just want to challenge yourself, my recommendation is to start with the DXUT code, turn it into a library and add any other widgets or dialogs that you feel are necessary.

This is also pretty close to how most "real" programmers work, since very few people write stuff from scratch in a vacuum. So it will be great experience for you to take someone else's code, integrate it into your project and expand upon it.

You can find DXUT in the Microsoft DirectX samples (at least version 9 has it not sure about the other versions).

Share this post


Link to post
Share on other sites
Well, if you want to learn, you have to make some fatal flaws too IMHO.

What is a GUI basically? Some rendered stuff (just like any other rendered stuff), handling input. Just like anything else in a game. GUI is not magic.

I don't think making a GUI is hard. I think it's very complex and time consuming, but that's all. If you define the behaviour of the widgets/windows well and in detail and draw the textures (gimp/paint/whatever), then the GUI is almost done.

Share this post


Link to post
Share on other sites

This topic is 2631 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this