A look at Frame Rates and Game Loop History

Posted by jimi on December 24th, 2008 filed in Game Comentary, Game Programming, Tech Support Snippit

There’s going to be a lot of Wikipedia links in this post, as none of this will make sense without knowledge of some of these technical terms.  So I apologise for the excessive links, but I’m trying to write my posts so that anyone can follow them, not just technical people.

I like to play my games at 60 Frames Per Second (fps).  I also hate frame tearing, so I use vsync a lot.  There’s been a few games that have had some major issues with vsync/frame rate, and I’m having a rant on them.  

1. Dead Space - On pc, Dead Space looks awesome, and runs really well on older pc’s.  It ran so well on my pc without vsync that it was hitting 120-150 fps.  This was giving me some nasty frame tearing, especially in sections where lights were flickering very quickly.  So my natural response was to turn on vsync.  Turning vsync on in game limits the frame rate to 30 fps.  

Hang on a minute, I was at 120 fps a second ago, and my refresh rate on my monitor is 60Hz, why am I capped to 30 fps?  

Looks like the game has an override setting, and decides when vsync is on, that it should be 30 fps.  This could be there for many reasons, but my assumption would be that this has been left in because it is frame limited in the console versions of the game.  

Bad EA, very bad.

So after a bit of searching with my friend google, I discovered that I can still force vsync on at the driver level, and turn it off in game, and all of a sudden, I have 60 fps.  Looks brilliant, and it only took about 20 minutes to work out.  Mind you, less technical minded people would probably not be aware of the problem, and wouldn’t know how to fix it.  I’m sure a simple setting change would have been possible in the game engine, but we can’t have everything now can we.

2. Command and Conquer : Red Alert 3 - OK, so apparently this series has been using different versions of the “SAGEgame engine.  I understand that, work with a proven engine, avoid development problems.

But wait, there is a pretty major problem with this engine, which is going to get worse as time goes on.  This problem stops the game from rendering faster than 30 fps.  Why would you limit a game to 30 fps, when it could quite easily be rendered at 60, or even more fps on modern computers?  It has to do with the synchronization of each client in a multi-player instance of the game, linking events not to a particular time stamp, but to a frame number.

Now why is this a bad idea?  It means that in a multi-player game, the game runs at the speed of the slowest computer.  

This problem stems from a time when computer power wasn’t quite as varied as it is today.  Back when the difference between the top end and low end computer processors was a matter of a couple of hundred MHz, the performance between these computers was not that different.  So the norm was to make your update loop dependent on your fps.  This wasn’t a real issue, because the highest frame rates you could get from these computers was not much more than 30 fps.

As time went on computers got more powerful (see Moore’s Law) and older games became so fast on newer computers that they were unplayable.  Programs like Mo’Slo started popping up, so that people could play their games at a reasonable speed.  Yes that’s right, we had to slow down the computer to play games properly.

Some games however decided to just limit the speed their game could play at, which is what the SAGE engine seems to do.  While this fixes the issue of the game running too fast, it doesn’t solve the fact that the game will actually run slower on less powerful machines.  There are far better techniques available these days, and I feel like it’s almost a crime to not make your game actually utilise the hardware that is available.  In my (somewhat limited) experience, I have to say that using a time based update loop is a far better option.  This has it’s own set of problems for slower pc’s, but using the right methods here won’t slow everyone in a multi-player game down to a snail’s pace.

If my “average gaming computer” can run Crysis, medium - high settings, at a playable frame rate, I don’t see why a game, nowhere near as technical, is coded in a way that it can’t run any higher than 30 fps.

Jimi says Bye.

If you enjoyed this post, make sure you subscribe to my RSS feed!

One Response to “A look at Frame Rates and Game Loop History”

  1. Aditya Says:

    Now this is something new for me.
    i figured old games would run very well on the new machines. and the only issue would be to down the resolution a bit to match its requirements.

    ima gonna check up on vsync.

    nice to know

Leave a Comment