I'm one of those strange people that enjoys writing input code. Stop laughing at the back; it's a cliché but input is certainly one of the most important and overlooked aspects of any game. I've had many great games ruined on me by having awkward controls and no (or limited) configuration options available. If I had €5 for every time I've snarled "if only that button were there instead of here", I guess I'd have enough to bribe the programmers to go back and rewrite it different.
A while back I started learning the DirectInput API. Now, I know that DirectInput is virtually deprecated, that the recommendation is to use standard messaging instead, and that there will be a push to the new XInput API, but DirectInput is a very very nice API. Easy and quick to get started with, but lots of power under the bonnet. Plus it's been around for long enough to have become a standard, and no matter how weird or wacky a device is, it's most likely going to be supported.
So I'm moving all of the input code to DirectInput, for a number of reasons. As I said, I like the API a lot, but also because it means that I can handle input in a very consistent manner for all devices, which makes my job easier, and which means I have more time to work on the good stuff.
The only exception is the XBox 360 Controller which uses XInput, as it's capabilities are crippled under DirectInput.
Me, I'm a keyboard and mouse person, I could never get the hang of using a controller or joystick, but it's important to be able to support how other people like to run the game.
Tuesday, December 16, 2008
On DirectInput
Posted by
mhquake
at
7:26 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment