FUNDAMENTALS OF GAME DESIGN, SECOND EDITION
Two-Dimensional Input Devices
Two-dimensional input devices allow the player to send two data values to the game at one time from a single device.
Directional pads (D-pads) are the most familiar form of directional control mechanism on game machines and are still offered by many smaller handheld machines as the only two-dimensional input device. Console and PC controllers often supply a D-pad in addition to a joystick to provide backward compatibility with older software.
A D-pad is a circular or cross-shaped input device on a game controller constructed with binary switches at the top, bottom, left, and right edges. The D-pad rocks slightly about its central point and, when pressed at any edge, turns on either one switch or, if the player presses between two adjacent switches, two. It can, therefore, send directional information to the game in eight possible directions: up, down, left, and right with each of the individual sensors, and upper-left, upper-right, lower-left, and lower-right when the player triggers two sensors together. (In Figure 8.2, the cross-shaped device on the upper-left face of the controller is a D-pad.)
The D-pad gives the player a crude level of control over a vehicle or avatar; she is able to make the vehicle move in any of the eight major directions but not in any other. You should use D-pads for directional control only if you have no better device available. D-pads do remain useful alongside a joystick; you can assign functions to the D-pad that require less subtle control, such as scrolling the main view window in one of the eight directions, which leaves the joystick free for such tasks as avatar navigation control.
A joystick is a single vertical stick anchored at the bottom that can be tilted a limited amount in any direction. The joystick is spring-loaded and returns to its central position if the player lets go of it. When the game software checks the position of the joystick, it returns two absolute data: an X-value indicating tilt to the left or right, and a Y-value indicating the tilt forward or back.
A joystick offers a finer degree of control than a D-pad does. The Sony SIXAXIS controller in Figure 8.2 features two small joysticks (the circular objects at the bottom) as well as a D-pad.
Joysticks make ideal steering controls for vehicles. To return to a default activity— flying straight and level, for instance—the player only has to allow the joystick to return to the neutral position. Since joysticks may travel only a limited amount in any direction, they allow the player to set a direction and a rate of movement. The UI interprets the degree of tilt as indicating the rate. For instance, moving a joy
stick to the left causes an airplane to roll to the left; moving it farther left causes the airplane to roll faster.
Joysticks don't work well for precise pointing because when the player lets go, the joystick returns to center, which naturally causes it to point somewhere else. To allow the player to point a cursor at an object and leave it there while she does something else, use a mouse. Efforts to port mouse-based games to console machines, substituting a joystick for the mouse, have an extremely poor success rate.
We're all familiar with mice from our experiences with personal computers. A mouse returns two data values that consist of X - and Y-values, but these are relative data, indicating how far the player moved the mouse relative to its previous location. A mouse offers more precise positioning than a joystick and unlimited travel in any direction on the two-dimensional plane in which it operates. This unlimited relative movement makes a mouse ideal for controlling things that can rotate indefinitely in place, so first-person PC games virtually always use mice to control the direction in which the avatar looks. Because it stays where it is put, a mouse is invaluable for interfaces in which the player needs to let go of the pointing device to do something else.
Note that when a mouse is used specifically to control a cursor on the screen, its driver software converts the mouse's native relative data into absolute data for the cursor position. This choice of either absolute or relative modes lends the mouse great flexibility.
A mouse wheel constitutes a separate knob with unlimited movement that also functions as a controller button when pressed. Not all mice come with mouse wheels, however, so you cannot count on players having them. If you support the mouse wheel, supply alternative controls.
The mouse's lack of a neutral position makes it weak as a steering mechanism for vehicles that need a default behavior—driving straight or flying straight and level. The player must find the vehicle's straight or level position herself rather than allowing the device to snap back into neutral. You may want to designate an extra controller button that returns the vehicle to its default state if the mouse will be your primary control option.
Designers find that mice are generally more flexible input devices than joysticks, but players find them more tiring to use for long periods.
PDAs, the Nintendo DS machine, and the Apple iPhone offer the player a touch - sensitive screen, and laptop personal computers usually come with a touch pad below the keyboard. These devices return absolute analog X and Y positions to indicate where they are touched, as a mouse cursor does. Unlike a mouse, you can
make a touch-sensitive device's cursor return to a neutral position whenever you detect that the player has stopped touching the device. Touch-sensitive screens may be manipulated by the fingers or a stylus; touch pads usually cannot detect a stylus, and must be touched with the fingers, which tends to make fingers sore after long use.
Early touch-sensitive screens could only detect one touch at a time, but the Apple iPhone has perfected the multi-touch interface, which allows the user to touch it in several locations at once. This is likely to become increasingly common on new handheld devices. The problem of sore fingers after extended play remains.