[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Of time scaling and FPS
Steve Baker wrote:
> "Miguel A. Osorio" wrote:
> > Anyway, on to the FPS problem. Using the method described above, I use
> > delta to scale my time-dependent variables, in order to get some smooth
> > animation. Thing is, I don't. The whole animation looks all jagged up,
> > without using time scaling it goes on fine; do note that, however, I
> > don't know why, the FPS mark keeps jumping about *all the time*, it
> > never settles on some average. Does anyone know a reason for this? Or am
> > I doing the whole time scaling calculation the wrong way?
> Probably - yes. It's easy to overlook some variable that needs to be
> scaled by the time-step.
> That doesn't explain why your rendering time is fluctuating so much though.
Yes, even though I *may* have overlooked some variable that would need
the delta scaling, which I don't believe is the case, since the whole
demo is just a very small program with just a few time dependent
variables, it still doesn't explain the heavy fluctuation. I notice that
some hard disk syncronizing mechanism in Linux kind of lags the whole
thing periodically, but aside from that, my frame rate is still too
I noticed I get smoother rates on running the demo on Windows, but I
still think there's something wrong lurking around somewhere. Oh, and
since we're talking strange here, how about this: another thing I
noticed was that the whole average frame rate (even with excessive
jittering) is different every time I run the damn thing! Crap! :)
> Start sticking gettimeofday calls all over your code and see what's
> varying. I find it useful to store tens of seconds of timings into
> a large buffer and to dump them out periodically in a format that
> gnuplot can understand - then you can draw pretty graphs to show
> how long each part is taking...that's really useful in the long term.
Good idea, will do :)
Miguel A. Osorio.