George Clingerman
posts - 190 , comments - 1648 , trackbacks - 181 : Would you like my Input?


myinput I’ve created a new sample called “Would you like my Input” for This sample demonstrates a simple yet effective input wrapper to be used in your game. If your game requires input (and which game doesn’t?) then at some point you’re going to want to create an input wrapper. Hopefully this sample helps demonstrate how to go about that or at least gives you one that you can use in your own game.

I always appreciate feedback (even if it’s just a simple Thank you!) so don’t be bashful about emailing or leaving a comment.

Print | posted on Saturday, March 6, 2010 9:47 PM |



# re: : Would you like my Input?

Nice :)

One minor thing I noticed in the last sample code block: Where's the ActionJump coming from? I assume it is just a simple 'const string ActionJump = "Jump";' somewhere in the full code but it is nowhere to be found on the page :)
3/7/2010 6:17 AM | Björn

# re: : Would you like my Input?

Input seems to be all the rage these days :)

After reading Jims blog post on XNA Short Term Memory loss, I coded a sample showing how to wrap input into a service to contain those lastState variables, update the state only once per frame and make it available everywhere through the Game.Services container. Support for defining abstract actions rather than polling buttons like you did is something I'd really like to add though, so thanks for the idea!

In case you're interested, the sample is the 4th one down here: snippets

3/9/2010 8:55 AM | Rim

# re: : Would you like my Input?

I reviewed the code directory, but I do not dominate the structure of a code layout. so I can not comment on the system and work.
4/12/2010 10:28 PM | diyet

# re: : Would you like my Input?

Great for handling buttons press and general movement, only small complaint is the thumbsticks, they are treated as buttons, so up is moved, they don't take into consideration the value of up. Thus make it hard to create a deadzone.

Trying to work on a solution for this using this class, if i get it i'll post it.
7/1/2010 6:55 AM | Kyle Hatch

# re: : Would you like my Input?

I really enjoyed this post,
10/17/2011 10:00 PM | LED strip light

# re: : Would you like my Input?

Really clean code. Thanks for the post.
10/5/2012 6:47 PM | Love game programming
Post A Comment

Powered by: