Sign in to follow this  
howie_007

Game config interface screens

Recommended Posts

I'm just looking for some general direction.

Within most games, you can set key bindings, change resolution, and other game configuration needs. What I'm trying to wrap my head around is how to manage this 2D interface while the engine is rendering in 3D? Having a consistent look in different resolutions, wide screen or not.

I could render a flat polygon, that covers the whole screen, right next to the near z plane but this sounds clugy to me. I know DirectX has 3D interfaces for buttons and such but do they scale so that in high resolutions, everything isn't very small.

I'm just not sure how to proceed.

[Edited by - howie_007 on December 13, 2010 10:50:50 AM]

Share this post


Link to post
Share on other sites
If your looking for stretchy interfaces, that scale with resolution you need to come up with an intermediary form of coordinates(I use 0->1 on x and y axis). much like uv's these will allow you to stretch your UI goods to what ever resolution you would like.

In my current system I have classes for each of the UI goodies i use, buttons, textinputs, etc They can be read from a textfile, and the intermediary coordinates are mapped into clip space(with the above example that would equate to x = 2(intermediary.x) - 1. A vertex buffer is created using pre-transformed positions. On each render, the world is rendered, then I disable ztesting and render all of the UI. During mouse events, I test against the gui's root element(it's a tree of UIElements), it recursively tests each of it's children(bubbling).

Share this post


Link to post
Share on other sites
Quote:
I know DirectX has 3D interfaces for buttons..

Do you mean DXUT? That's an interface for DirectX, not a part of DirectX itself.

It's a bit more common to suspend the game as a kindness when the user selects the game config menu. That can also simplify life a bit rendering the menu, getting user keyboard and mouse inputs, etc. It may also simplify changing resolutions, etc.

In any case, as Burnt_Fyr mentions, designing your interface with scaling factors from the start is the way to go.

Share this post


Link to post
Share on other sites
I didn't know you could scale interface items. Thanks for that. I believe we are talking about the CustomUI?
Quote:
Original post by Buckeye
Do you mean DXUT? That's an interface for DirectX, not a part of DirectX itself.

Do you need to use DXUT? Are there DirectX calls for creating these CustomUI interface items?

Share this post


Link to post
Share on other sites
Quote:
Original post by Aqua Costa
You can also use CEGUI (google it).

That's funny. It stands for "Crazy Eddie's Gui System". You can't go wrong with anything named "Crazy Eddie".

Thank you everyone! All your help was the "point in the right direction" I was looking for.

Cheers!

Share this post


Link to post
Share on other sites
Quote:
Original post by howie_007
Quote:
Original post by Aqua Costa
You can also use CEGUI (google it).

That's funny. It stands for "Crazy Eddie's Gui System". You can't go wrong with anything named "Crazy Eddie".

Thank you everyone! All your help was the "point in the right direction" I was looking for.

Cheers!


It is not the best name for an API but it works really well. :D

Share this post


Link to post
Share on other sites

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