| ||||
Aliasing is a signal processing phenomenon that could come up if you work with sine waves. The best way to introduce this is by example. Imagine I gave you a sine wave with a frequency of one cycle per second (1Hz) and I asked you to tell me the frequency of that wave. You could give me accurate results if you sampled the wave at frequencies of 2Hz or greater. This is shown in Figure 2.11.
Now, imagine I gave you a 4Hz wave, but I limited your sampling rate to 2Hz. As Figure 2.12 shows, you'd mistakenly conclude that this new wave was a 2Hz signal.
Aliasing happens when your sampling frequency is less than twice the signal frequency. In signal processing, this is called the Nyquist frequency.
You may think that this would not apply to game development, but it could. Think back to the hockey player example. Using a sinusoidal function, the position of the player might be computed every frame. Therefore, the frame rate is your sampling frequency into that function. If the frame rate is too low, the results may be confusing. For instance, imagine you pick a frequency that looks good but was actually aliased. Later, you run your hockey game on a faster computer and suddenly the player is skating wildly back and forth. The code could be totally correct, but aliasing could have caused you to pick a bad frequency.
| ||||