COMP 160 Lab 4: GamePad Input in C#

This tutorial covers:


Assignment

This lab is like the previous lab, except for that you will use the XBox 360 controller for input. The following controls should have the following actions:

In order to understand how to access and use the controller state, look at the various items in the Microsoft.Xna.Framework.Input namespace. One thing that might not be immediately obvious from the documentation is that GamePadDeadZone.WHATEVER is used as an optional parameter to GamePad.GetState().

Although not required, you are encouraged to embellish the controls above. Also, while a ship image is provided, feel free to substitute your own. Presumably, you'll just use the same ship and shield images you used in the previous lab.

The framework can be downloaded here. Once again, we suggest that you simply modify the XboxGame.cs and Ship.cs files. Note that World.cs provides code for matrix operations, that you may use for translations and such.