Jump to content
  • Advertisement

Archived

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

budipro

Question about RTS panel

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

Hi all, I want to visualize a control panel just like on most RTS games. (which usually on the bottom of the screen). What are the steps I should take (any technique or methods)? Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
You might want to look into screen-space vertices or orthogonal projection matrices (to draw the panel on the screen), and stencil buffers (so you don''t draw the 3d scene over or under the panel).

ToohrVyk

Share this post


Link to post
Share on other sites
Thanks for your answer, ToohrVyk.

Sorry for not making my question clear. I need the explanation from the very beginning. Starting with what is exactly the control panel made of? Is it a textured quad? Is it rendered on different viewport? Then after I create the control panel based on the answers of these questions, I will begin to think how to put the panel on the screen.

Thanks again.

Share this post


Link to post
Share on other sites
It''s one or more quads that are rendered to the screen. Usually, you want to do these with device-space coordinates or orthogonal projection, so you can accurately place them, and so they don''t move when the in game camera moves.

Once they are rendered, you may want to avoid drawing the terrain over them, so use a stencil buffer or write very very close values to the z-buffer for pixels that should not be drawn over.

Share this post


Link to post
Share on other sites
Thanks ToohrVyk.

Sorry, I''m still a newbie in game programming. Right now I''m using Direct3D.

What is device-space coordinates? Is it screen coordinates (x,y)?

Share this post


Link to post
Share on other sites
quote:
Original post by ToohrVyk
Once they are rendered, you may want to avoid drawing the terrain over them, so use a stencil buffer or write very very close values to the z-buffer for pixels that should not be drawn over.


Depending on what you''re drawing, and the order in which you''re doing it, you can either turn off depth testing (and order things correctly yourself), or clear the depth buffer first (nice if you need a per-pixel depth test, but slightly slower due to the clear operation) and use regular depth writing and testing.

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!