Geeks With Blogs
George Clingerman       XNADevelopment.com

 

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.

Posted on Saturday, March 6, 2010 9:47 PM | Back to top


Comments on this post: XNADevelopment.com : Would you like my Input?

# re: XNADevelopment.com : Would you like my Input?
Requesting Gravatar...
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 :)
Left by Björn on Mar 07, 2010 6:17 AM

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

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

Left by Rim on Mar 09, 2010 8:55 AM

# re: XNADevelopment.com : Would you like my Input?
Requesting Gravatar...
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.
Left by diyet on Apr 12, 2010 10:28 PM

# re: XNADevelopment.com : Would you like my Input?
Requesting Gravatar...
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.
Left by Kyle Hatch on Jul 01, 2010 6:55 AM

# re: XNADevelopment.com : Would you like my Input?
Requesting Gravatar...
I really enjoyed this post,
Left by LED strip light on Oct 17, 2011 10:00 PM

# re: XNADevelopment.com : Would you like my Input?
Requesting Gravatar...
Really clean code. Thanks for the post.
Left by Love game programming on Oct 05, 2012 6:47 PM

Your comment:
 (will show your gravatar)


Copyright © George Clingerman | Powered by: GeeksWithBlogs.net | Join free