How can I make my games run at the same speed, no matter what the graphics card is?
At the moment I am developing a game on a PC with a Riva TNT card.
Once I tested the game on my friends ATI 9600, the game ran so
fast that I could almost not do anything! To FAST…
The rendering time may differ from machine to machine, that’s the reason why movement calculations should be based on the “time since the last frame”. IIRC, there are several examples doing this.
But wouldn’t it also work to make you main class extend the
FixedLogicrateGame class and then according to that also use the time
to update movement, etc.
FixedLogicrateGame implements a main-loop designed to acheive frame rate independence. The goal is to keep a consistent gameplay speed regardless of the framerate acheived by the visuals
Yes, but the movement calculation will still be based on speed = distance / time.
Which fixed rate do you plan to use? You will need to find the slowest possible machine and use the refresh rate which this machine is able to support.
If you do it using variable frame rate (a mechanism which most commercial engines use), you are freed from such considerations.