KEEPING THE GAME LOOP’S FRAME RATE…
WIth the incredible processing rates of the new computers, one must make sure a program sticks to a set frame rate.
NOTE: There are many books out there by Robert Dunlop, Andre LaMothe etc, that covers this in greater detail but I just want to make you aware of how to go about “designing” a frame-rate system…
It basically goes along the lines of first checking to see if 1/30th of a second has elapsed - if so, let the game loop do its business. If not, wait until it has…
The functions for obtaining the current system time varys from language-to-language, but by creating the following set of variables…
1) Current_Time
2) Last_Time
3) Elapsed_Time
4) Execute_game_loop
5) Frames_Per_Second
…we can keep track of the nessecary information that we need. The variables speak for themselves, except “Last-time”…
When you actually execute a frame, whatever the current time is, you place it into “Last_Time”. This way, you can subtract it from “Current_Time” to determine if 1/30th of a second has elapsed…
. It’ll be interesting to see how Microsoft handles OpenGL 2.0 when it comes out. If they spit on it and ignore new specifications as they have done in the past, it’s dead in the water.

