PDA

View Full Version : Smooth animation



jpummill
05-06-2002, 07:06 PM
Why is it that games like Quake3, or Unreal Tournament with thousands of polygons run without little hiccups but every simple GL demo that I write like a spinning cube have subsecond pauses where the cube stops and starts back up every couple of seconds. I have tried writing simple demos with GLUT and without but they always seem to have the same behavior (the pauses).

I did not include a code example but would be glad to add one if anyone is interested.

On a related note, do professional games and apps have the ability to turn off OS functionality that might cause performance problems.

I am running on a 600 MHz PIII with an 8 Meg ATI M1 (yeah, its a notebook but this chip seems to run UT, and half-life with no problems).

Thanks for any suggestions, or input.
jpummill

Shag
05-06-2002, 07:15 PM
Sounds like a background app is taking up CPU time. Do you run any 'chat' software. Some of them are extremely badly behaved when it comes to having the audacity to run other apps at the same time.

It could also be due to window messages being handled inappropriately. I don't know enough about glut to anwser that though.

Regards

JML
05-07-2002, 04:48 AM
Well, the simple demo's you are referring to usually are not doing things in 'real time' but in an assumed constant frame-rate. That means that any delay in drawing a frame will result in a perceived 'pause' of the demo.
Games usually know how much time has elapsed between 'now' and the previous frame and will advance all objects according to that actually elapsed time instead of an assumed 1/60th or 1/80th of a second.

HTH

Jean-Marc.

Furrage
05-07-2002, 07:12 AM
As far as I know games tend to disable some OS functionality to remove some hiccups. Typically this is in response to Idle Time events (where the computer detects that there has been no input for some time and tries to do some background task then).

Also as JML pointed out you have to scale game time to match real time otherwise you'll get jumpy movement when one of your frames is off. And as Shag pointed out other apps can cause problems. Occasionally I will get hiccups which I normally blame on my antivirus or disk utility software.