Sams Teach Yourself Game Programming in 24 Hours

Hour 7. Improving Input with Joysticks

From its inception, the joystick has been used chiefly as an input device for game systems. Admittedly, its name alone limits its usage to the entertainment industry, as I doubt too many accountants would purchase a "joystick" for crunching numbers in a spreadsheet. At any rate, joysticks and game pads both play an important role in modern video games of all kinds, including computer games. For this reason, it's important for you to have an understanding of how to interpret and respond to joystick input in your own games. This hour introduces you to joysticks and what makes them tick, along with providing you with the knowledge and source code to handle joystick input in games .

In this hour, you'll learn:

  • The basics of responding to joystick input in games

  • How to properly calibrate a joystick in Windows XP

  • How to add joystick support to the game engine

  • How to use the new and improved game engine to create interesting programs that respond to a joystick

Категории