[freespace2] unstable speed of game?
Taylor Richards
mtrs at bellsouth.net
Sun Mar 9 19:13:50 EST 2003
On Sun, 2003-03-09 at 18:35, Christopher Thielen wrote:
> 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?
Have a look in freespace.cpp at game_set_frametime() and
game_update_missiontime(). It seems that mission time is based on what
is set in game_set_frametime() but there is an extra few bits of code
used when in debug mode. I don't know if the problem, or rather the
fix, stems from that code or something else along the way. I haven't
tried to step through the code and figure out exactly what it's doing
but just looking at the source gets me reaching for that bottle of
aspirin ;-) I am assuming that the problem is in freespace.cpp
somewhere but I can't say that for sure. It could be an issue relating
to the in-game time compression stuff as it doesn't seem to be factored
in/out correctly but it could be separate.
I've tried several things but haven't gotten anywhere useful. I haven't
heard of anyone having this problem except for Voodoo users. I'm
guessing this needs to be debugged using a Voodoo card but it's not
going to be fun if every frame has to be checked. It would be nice if
this happened to someone without a Voodoo card so we could know for
sure. I don't have a lot of experience with this so if you find out
anything I'd like to know as well.
Taylor
--
Taylor Richards <mtrs at bellsouth.net>
More information about the freespace2
mailing list