Jump to content
  • Advertisement
Sign in to follow this  
Seroja

DirectInput Alternatives

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

I use VB.Net and OpenGL, so I would prefer not to use DirectX as well. Is there any fast and reliable way to get input (at least mouse and keyboard, nevermind joysticks and other stuff)? WinForms events are really slow. I know there are a few functions in Win32 API, but is there another way? And what do other platforms use (Linux, Mac)? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
This is not exactly the answer you are looking for, but I would recommend using either SDL or Allegro. It seems like you simply want to using some multi-platform libraries, and both of these choices will satify that requirement.

Share this post


Link to post
Share on other sites
Is it possible to just use DI with something like openGL?
because for my next project I wish to see what DirectInput can do because soooo many people love working with it.

Share this post


Link to post
Share on other sites
Quote:
Original post by fooman_69
Is it possible to just use DI with something like openGL?
because for my next project I wish to see what DirectInput can do because soooo many people love working with it.


Yes

Share this post


Link to post
Share on other sites
I don't think SDL nor Allegro would be a good fit for a .Net application.

The Managed DirectX interface to DirectInput is probably the best method if you don't want to dig into the Win32 API.

Share this post


Link to post
Share on other sites
I don't mind digging into Win32 API, anyway I use it to setup OpenGL. The point is, is Win32 API fast enough for gaming? Or will it still be significantly slower than DirectInput?

Out of the APIs, there is GetAsyncKeyState, GetKeyboardState, GetKeyState and maybe even more. Which one is the most efficient?

And a question that has been posted on .Net forum and not answered, is there any straightforward way to obtain mouse delta (e.g. movement, and not the absolute position), even if the mouse reached the end of the screen?

Share this post


Link to post
Share on other sites
Quote:
Original post by Simian Man
(especially if you're using VB)[smile]

Come on, VB isn't that slow... The only time I had serious trouble about it's speed was actually when I wrote an ActiveX wrapper to DirectInput, and because of DirectInput being TOO fast the control didn't have enough time to fire events :P
Currently I can get 100FPS on 700Mhz & GeForce2 if I don't render too much stuff, so that's fast enough for me :)

Which of the functions to poll keyboard and mouse to use? And how it works on other platforms?

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.

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!