Q: That FPS measurement could well be the maximum that that game can actually produce. If I remember the maximum that Quake3 can push out is somewhere around 500.
I just looked at the source quickly, and unless I missed something, the only checks exist to not exist a user-set maximum (com_maxfps). Perhaps a limitation of windows?
...aha, i see it. The engine doesn't keep an actual FPS counter, rather, the screen drawing code takes the current time (since starting the game) each frame. After it gets 4 times, it averages them together and displays it. The equation is 1000*4/(number of frames), I guess that somehow works out to 4/8, thus it only displays up to 500, even if the game is actually running faster.
Players can set a maximum number of frames to render per second, and that's the only hard FPS limit in Q3.
Wouldn't it be easier to just make it "4000/n" ?
Possibly, but the way the code works doesn't quite allow that. Plus there's no parentheses, so the intended order of operations is a bit harder to figure out. Presumably PEMDAS holds true but I'm too lazy to investigate.
Comments
I always thought there was .
-Q
...aha, i see it. The engine doesn't keep an actual FPS counter, rather, the screen drawing code takes the current time (since starting the game) each frame. After it gets 4 times, it averages them together and displays it. The equation is 1000*4/(number of frames), I guess that somehow works out to 4/8, thus it only displays up to 500, even if the game is actually running faster.
I can't parse that...
Wouldn't it be easier to just make it "4000/n" ?
-Q
Possibly, but the way the code works doesn't quite allow that. Plus there's no parentheses, so the intended order of operations is a bit harder to figure out. Presumably PEMDAS holds true but I'm too lazy to investigate.