PDA

View Full Version : Frames per second



08-29-2002, 07:40 AM
hi,

I don't understand why the game animation doesn't running faster if it has more FPS? 25 FPS it's a normal film speed, but if I have 50 FPS? it should run 2 times faster!

For example I'm making two steps per second in 25 FPS and 4 steps in 50 FPS?!?? That's not normal...

Gavin
08-29-2002, 08:08 AM
I am a bit lost to what you are saying. Are you asking why your game/animation does or doesn;t run faster? You are walking steps per second not per frame so you will move the same speed, just more smoothly. If you are walking steps per frame well thats a different matter!

dabeav
08-29-2002, 08:12 AM
In the world of film, everything runs at 22 frames per second, NO MATTER WHAT. So there IS no need to worry about how many frames it takes, because its standard. And they can get away with 22 frames per second because of a little thing called MOTION BLUR. Basicaly the frames are (partialy expossed) for a length of time, so there is a blur in the motion, creating a more realistic movement in fewer frames.

Now to get on with the Game Graphics. In GAMES the above donst aply, so FORGET IT. There is no motion blur in games (well there are some cool effects of motion blur but in frame by frame this isnt realy feasable). So instead of "faking" alot of motion with blurring. We "fake" alot of motion, with ALOT of frames. This has to be done because the computer CANT take a snap shot over time, because the objects are where there are each frame, during the ACTUAL drawing process there stationary, (not moving).

Now to answer your question, NO moving twice as fast with twice as many frames is NOT normal, there are 2 ways to fix this. The first and probly the easiest is Frame Suppresion. Basicaly, you only call to draw a frame once every 16milliseconds. I do this in my programs with a call to glutTimerFunc(); And inside of the timer function i simply call glutPostRedisplay() causing the game TO ONLY draw the scene once every 16 milliseconds. This is a very easy method, but probly not the best since your actualy hindering speed. The other way, is to simply run ALL animations based on time. This is much harder, and I cant get into it now, but basicaly you call a clock timer in intervals, and update your animations as such. I prefer the first method, but you can do what you like. Does this help>?>?

nexusone
08-29-2002, 10:06 AM
First you should not base you animation on the FPS, since a faster computer will produce more then a slower. FPS(Frames per second) is more for guaging preformance, in how fast the computer and video card can render a scene.

All animation and movement should be based on time. Let's say you have a 3D scene that changes once every second. Depending on the coputer being used, it may render that one scene 30 times a second on a fast computer, but only 15 times a second on a slow computer. But since the scene only changes once a second, the amimation looks normal on both machines.
Problems happen on slower machines when the scene needs to be updates once a second, but the computer can only do it once every two seconds. That's where you get jurky motion in a animation.


Originally posted by beginner27334:
hi,

I don't understand why the game animation doesn't running faster if it has more FPS? 25 FPS it's a normal film speed, but if I have 50 FPS? it should run 2 times faster!

For example I'm making two steps per second in 25 FPS and 4 steps in 50 FPS?!?? That's not normal...





[This message has been edited by nexusone (edited 08-29-2002).]