339
8 Human Interface Devices (HID)
G
ames are interactive computer simulations, so the human player(s) need
some way of providing inputs to the game. All sorts of human interface
devices (HID) exist for gaming, including joysticks, joypads, keyboards and
mice, track balls, the Wii remote, and specialized input devices like steering
wheels, fi shing rods, dance pads, and even electric guitars. In this chapter,
we’ll investigate how game engines typically read, process, and utilize the
inputs from human interface devices. We’ll also have a look at how outputs
from these devices provide feedback to the human player.
8.1 Types of Human Interface Devices
A wide range of human interface devices are available for gaming purposes.
Consoles like the Xbox 360 and PS3 come equipped with joypad controllers, as
shown in Figure 8.1. Nintendo’s Wii console is well known for its unique and
innovative WiiMote controller, shown in Figure 8.2. PC games are generally
either controlled via a keyboard and the mouse, or via a joypad. (Microsoft
designed the Xbox 360 joypad so that it can be used both on the Xbox 360 and
on Windows/DirectX PC platforms.) As shown in Figure 8.3, arcade machines
have one or more built-in controllers, such as a joystick and various butt ons, or
a track ball, a steering wheel, etc. An arcade machine’s input device is usually