This project will enable you to use any older gamepad controller with your game.
Included are wraper classes so that you do not have to worry what kind of controller user has; it will all just work for you.
Wraper classes suport Xbox controller, keyboard, and older gamepad controllers; and you can add your own!
There are two projects in the zip file:
- Configuration project - used to configure devices and save configs in an xml file
- Sample Game Project - uses saved xmls to correctly use devices.
Projects come in source files and with plenty of comments. It should be easy to modify for your own needs.
What is needed:
Visual Studio 2008
XNA 3.1
DirectX SDK
when you start new XNA project:
1)Open up Debug Menu and select Exceptions
2)Select Managed Debugging Assistants and find LoaderLock
3)Remove the selected value.
and
4)Add DirectX.DirectInput to your project references.
When packaging this for end user, be sure that you include both XNA redistributable and directX redistributable.
It is important that you place both game and configuration in the same folder, so that they can share Content folders since Configuration saves data there. The game loads configuration from the same folder.
This has been tested with:
wireless Xbox 360 controller, and recevier for PC
Standard Keyboard
Axis Pad, Gamepad
Logitech Dual Action, Gamepad
Logitech RumblePad, Gamepad
Tested on XP Pro, Win 7 (PwnanOBrien), assumed to work on Vista.
If you have any issues, pease post them here, so that we can continue to build upon this project.
If you test other devices, please post your results here.