I'm seriously considering removing the software mouse code from my engine. Advantage 1 is that I can have a simpler input code path with only one API to support. Advantage 2 is that I can construct a lot of reusable code for all input devices. Advantage 3 is that I would no longer have to write everything twice - once for DirectInput and once for software.
I'm interested in how many people really prefer to use software input. I know that there are some, with the main argument being that DirectInput sometimes feels slower, but I've already overcome that by adding an additional boost cvar. Reading MSDN it looks easy enough to also add mouse acceleration if required.
Another argument is that DirectInput may fail to start, but I don't really buy that. May have been valid in 1996 with version 3.0, but it's 2009 and version 8.0 these days. It's a robust, mature, proven-in-the-field API.
Last argument is that MS themselves no longer recommend use of DirectInput, but I'm wondering how much of that is coloured by their push towards the XNA platform.
OK, I'm one of those weird people that enjoys writing input code, and DirectInput is a spectacularly clean API that's just a pleasure to use, but I'm also genuinely interested here.
To DirectInput or not to DirectInput?
To DirectInput or not to DirectInput?
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-dinput is overwhelmingly popular among the experienced. I recently learned of an engine that actually uses it by default
I used to use the non-dinput way a few years ago, and then I did some experimentation and realized that with dinput the mouse control actually does what you do with the mouse movement.
It is very sad that Linux and OSX don't have a dinput equivalent.
I used to use the non-dinput way a few years ago, and then I did some experimentation and realized that with dinput the mouse control actually does what you do with the mouse movement.
It is very sad that Linux and OSX don't have a dinput equivalent.
But those are the same people that recommend you switch to VistaLast argument is that MS themselves no longer recommend use of DirectInput
OK, I've added mouse acceleration to DirectInput. Go check out Tutorials for the full dirt on the matter. It's a lousy gameplay experience, by the way.
I suppose SDL probably has something, but I seriously don't know enough about it.Baker wrote:It is very sad that Linux and OSX don't have a dinput equivalent.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
evdev.Baker wrote:It is very sad that Linux and OSX don't have a dinput equivalent.
vista warning: on my vista laptop, I get periodic input stalls when not using dinput/rawinput.
if you detect vista, you ought to avoid defaulting to detecting mouse movements. Framerates are fine, it just periodically stops receiving inputs.
rawinput (xp/vista but not 2k) will supposedly give lower latency, as well as more than 5 mouse buttons. dinput is now a legacy api.