George Clingerman

      XNADevelopment.com
posts - 190 , comments - 1648 , trackbacks - 181

My Links

News



Twitter












Tag Cloud

Article Categories

Archives

Post Categories

. XNADevelopment.com .

XNADevelopment.com : Would you like my Input?

 

myinput I’ve created a new sample called “Would you like my Input” for XNADevelopment.com. 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 |

Feedback

Gravatar

# re: XNADevelopment.com : 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
Gravatar

# re: XNADevelopment.com : 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:
http://www.xnainfo.com/resources.php?view=Code snippets

3/9/2010 8:55 AM | Rim
Gravatar

# re: XNADevelopment.com : 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
Gravatar

# re: XNADevelopment.com : 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
Gravatar

# re: XNADevelopment.com : Would you like my Input?

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

# re: XNADevelopment.com : Would you like my Input?

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

Powered by: