[freespace2] unstable speed of game?

Christopher Thielen chris at luethy.net
Sun Mar 9 18:35:28 EST 2003


Hrm, USE_TIMING does appear to be debug, and a lot more code is involved
if used. timer.cpp seems to have two facilities in it, one appears to be
a general timer, much like SDL_GetTicks() (in fact it uses
SDL_GetTicks()), and that half is not affected by USE_TIMING.

The second half of the file might be debugging, as NDEBUG probably
suggests. There's more work invovled if USE_TIMING is on, and it appears
to be used for timer events, as opposed to a general,
periodically-checked timer. But with the NDEBUG evidence, and, on line
608, the timing printout, I suppose this is debug code.

So why does it ensure more accurate frame rates for Jacek?

On Sun, 2003-03-09 at 14:21, Taylor Richards wrote:
> On Sun, 2003-03-09 at 17:09, Jacek Popławski wrote:
> > On Sun, Mar 09, 2003 at 09:46:26PM -0800, Christopher Thielen wrote:
> > > here's a patch to fix it.
> > 
> > :-)
> 
> Note that compiling without NDEBUG does more timing related things than
> just this so make sure this actually helps _with_ NDEBUG.  A debug build
> times the frames a little differently  and actually uses the timing
> functions whereas a non-debug build does not use them.  I don't think
> that just defining USE_TIMING is going to do anything worthwhile.  I
> believe there is something else going on here maybe related to a driver
> issue but Dan and Steven know much more about this than I do.  I can't
> repeat this problem with NVIDIA or G400 drivers.
> 
> 
> On Sun, Mar 09, 2003 at 08:39:33PM -0800, Christopher Thielen wrote:
> > well, for whatever reason, the SDL_GetTicks() timing method is
> > considered debug. any reason for this?
> 
> Unless I'm not seeing something that Christopher is SDL_GetTicks() is
> used in all builds debug or not.  I've already tried another method of
> calculating the time but it didn't help any.
> 
> 
> Taylor




More information about the freespace2 mailing list