Framerates?

Started by
3 comments, last by Psycho1 22 years, 5 months ago
Is their a function that can refresh at a certain rate? It seems that different size video cards (in memory), it always runs a lot faster... is it a pre set refresh rate?, as fast as the computer can handle it? and can I set it differently using a function?
Advertisement
well, if vsynch is turned on, then the framerate will at most be the refresh rate of the monitor, that is one way to limit the framerate. If vsynch is off, then the framerate will be as fast as the computer can update the frames. I would suggest not limmiting the framerate to a set value, but rather implementing timing routines to make sure that everything in the program runs at the same speed regardless of framerate. Then, no matter what the framerate is on a computer, everything will look the same, although a bit choppier on a slower machine.

j.w.

note. vsynch can be turned on and off (in windows anyway) via the display settings control panel. Usually under the advanced settings.
well, the problem i have is, say i have something that adds up each time the screen is refreshed, the problem in that is, it would go super fast on fast machines.
yep, don''t do that
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Do not time your game to the framerate of your computer. Use something like timeGetTime() or queryPerformanceCounter() / queryPerformanceFrequency, to calculate elapsed time. This way, your actions, animations, etc. will be independant irrespective of framerate. Ex: If you have a bullet travelling 1 meter per second, it will always go one meter per second, not 3 on one machine and .5 on another.

This topic is closed to new replies.

Advertisement