View Single Post
Old April 9th, 2007   #11 (permalink)
ChickenLiver
Plugin author
 
Join Date: Apr 2006
Location: Perdition
Posts: 588
TwinPad's implementation of mouse/analog stick mapping does work well for movement (On a random side note, just glanced at its code, and how it does it is really cool. Not something I would have come up with. Maybe I'll release my code at some point, though it's a complete mess)...I tend to be happiest moving with a keyboard. Don't think there's any way for me to do something too similar without doing something very hackish, as my direct input code, in particular, doesn't even know what a mouse is. My Direct Input code, by design, treats all axes identically. It doesn't know what an x- or y-axis is, or what a mouse wheel is. I simply enumerate all the axes for a device, and then treat them all the same, basically. The only place the mouse identifier affects anything is when it's deciding which devices it wants input from. This makes setting up bindings to toggle how to interpret a given axis on a given device rather nasty.

One thing I could do, and that I've been considering, however, is a "state lock" button. When you press it, it saves the current input state and acts like all buttons continue to be held down (Even when released), until state lock is pressed again. I could even get fancy and let you press more buttons in the meantime. Only problem with that is that analog pressure would be doubled when you enable it, until you release whatever's bound to analog devices. One nice thing about this is it fits in very well with my current architecture, so would be pretty simple to implement. Could also make a "direction lock" button that does the same thing, except it only applies to the d-pad and the analog sticks...Could be a handy feature. I take advantage of LilyPad locking input state when I unfocus the window on occasion, myself.

Edit: This wouldn't work nearly as well with a mouse as what TwinPad does, now that I think about it...more intended to be used when using the keyboard (or joystick) to move. Still could be useful, though.

Last edited by ChickenLiver; April 9th, 2007 at 15:45..
ChickenLiver is offline   Reply With Quote