Friday, August 29, 2008

xbox 360 Controller

to play a game well, you will have to know the basic controls of the
game first. This section will show the default control settings for this game.
You can change the controls in the main menu or by pausing the game.





1. Left Trigger - Aim, Brake (Vehicle), Pop-out from cover

2. Right Trigger - Shoot, Powerup UV light, Accelerate, Throw (Grenades)

3. Left Bumper - Review current objectives, locate teammates, give out orders

4. Right Bumper - Reload weapons

5. Back - Nothing?

6. Start - Pause current game

7. Left Stick - Walk forward, Backstep, Strafe Left, Strafe Right, Move along
cover, Crouch (Click), Turn Left (In Vehicles Only), Turn Right
(In Vehicles only)

8. D-Pad - Switch between weapons

9. Right Stick - View up, down, left and right, Use Scope (Click)

10. A - Take Cover, Exit Cover, Roadie Run, Rollover, Attack Order

B - Melee, Rev-up Lancer's Chainsaw, Hold Order

X - Use, Exit, Kick, Swap Weapon, Pick Up Weapon, Pick Up Ammo

Y - View point of interests, View fallen teammates, Regroup Order,
view emergence holes


The requisite code to get this functionality in and working is about 50 lines long. I pretty much ripped the code as-is from the example and tossed a simple abstraction layer on it to help ease the pending cross-platform pains. I then plugged the debug output into my own print string display functionality and done! Adding XBox 360 Controller support never seemed so easy! :)

No comments: