Game Development Reference
In-Depth Information
If the ball were open to the sea, then the pressure would act equally on each side of the
steel boundary. Without a pressure differential, there would be no force to crush the
ball; however, there would still be compression of the steel shell itself.
Button Mashing
While the preceding example highlights some important concepts about pressure in
general, it is not usually the type of pressure used as input to a game. The most common
types of pressure sensors you'll experience in video games are pressure-sensitive buttons
that indirectly measure the amount of pressure the user is exerting on the button and
convert this to a relative value. Both Sony and Microsoft have incorporated pressure-
sensitive (also known as analog ) buttons into their controllers for the PlayStation and
Xbox series of consoles.
The method by which you can detect how hard a user is pressing a button varies from
very simple to very complex. We'll focus on Sony's method, which is very elegant. A
typical push button is just two contacts separated by an insulator, most commonly air.
When the button is pushed, the upper contact moves down and touches the lower
contact. This completes a circuit, causing a voltage spike, which the device interprets as
a button press. This is another example of a digital sensor—it is either on or off. The
buttons in Sony's controller work a bit differently. In State A in Figure 23-2 , we can see
that the button is not yet pressed and an air gap exists between the solid conductor and
the domed flexible conductor. In State B the button is depressed with minimal pressure,
and the dome just barely makes contact. The button is now activated. If the user con‐
tinues to press down harder on the button, the dome deflects and increases the area of
contact with the fixed conductor; the larger the contact area, the greater the conductivity
of the connection. This causes a rise in the current flowing in the circuit.
Search Nedrilad ::

Custom Search