Game Development Reference
time environments. This means that although you set the polling rate at once a second,
this guarantees only that the data will be delivered no sooner than once a second. If
something distracts the operating system, such as the arrival of packets on the network,
the signal you get from the accelerometer may be delayed.
The way in which MEMS measure accelerometers is more basic in principle than you
may think. The major accomplishment is miniaturizing the technology until it can fit
inside a computer chip! To clearly illustrate the basic principle, we will first show you
the mechanics of it in the macro-scale version of a known mass and spring. Let's say
you build something like the contraption shown in Figure 21-1 and take it on an elevator
in an area where there is no gravity. We'll worry about the effects of gravity in a minute.
Figure 21-1. Simple accelerometer in absence of acceleration