Time-based movement and animation
We have covered a lot so far in this chapter. We have been looking at the frame rate and refresh rate so we can understand how it relates to what is displayed on screen. However, the frame rate of a game has the chance to impact upon every engine of the game. It can even affect testing and debugging during development.
At the start of a game's development, the game logic isn't very complicated and the unit count is very low. For this reason, it is common to see thousands of frames per second. As development continues, this frame rate will slowly drop to hundreds and then (hopefully) settle around 60Â frames per second. Imagine if there was some game logic to spawn an enemy once every 10Â frames. Depending on where we are in the development cycle, we might be spawning six or sixty enemies every second. This makes the game very hard to test and debug because it is not consistent.
What makes this problem even more interesting is that, even within a single play...