Jump to content
  • Advertisement
Sign in to follow this  
Crims0nSamurai

Windows Forms and User Controls

This topic is 2775 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 to One and All,

I'm currently trying to tackle the problem of text input-heavy game using DirectX. I have two main theories as to how to go about this.
1: Make a User Control that pops up or stays tacked to the screen throughout the game.

2: Make a buffer that detects what a user is typing the entire time and simultaneously print that to the screen and take the numbers I need and process them in my game loop.

My question is this: Which method should I persue? I don't want to look into CLR and find out I can't use any of what I had learned, but if the DirectX method is slower/less effective, I'd like to know that as well.

Many Thanks,

The Samurai

Share this post


Link to post
Share on other sites
Advertisement
Hi,

The DirectX approach will be as slow as you implement it, since all the responsibility of handling text input and actually defining your "controls" falls on you.

Winforms is comparable to crap, almost. Pardon me any developers in MS but I had tons of experience with it and its not only bloated, its slow as hell.

Plus, don't expect it to play nicely with DX, as DX doesn't play nicely with any UI toolkit (for good reasons!). We've tried that in our company too - we have a rendering engine that uses DX and we needed to place user controls (Winforms) which was a nightmare in some respects.


There's a reason every serious game engine has a UI infrastructure built from (almost) the group up. You can't really use anything "normal" for games.

Heck, Winforms is even slower than Swing (Java), and I say that as a Java lover that admits Swing can be really slow unless you absolutely know what you're doing and an expert at that.

Share this post


Link to post
Share on other sites
Would you consider a GUI toolkit? Crazy Eddie GUI seems pretty decent:

http://www.cegui.org.uk/wiki/index.php/Main_Page

Torchlight uses it:

http://www.cegui.org.uk/wiki/index.php/Projects_Using_CEGUI

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!