[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direction of Linux games...







>Can't someone just shove a usleep() in there, for heaven's sake? Will
>not make it properly done, but will make it *run* properly at least
>(what? being penalized because I have a better computer/video card? I
>don't even have a friggin' Turbo button!)...

You could do it by timing a couple of frames & working out how much to usleep,
but the problem is that it will add a constant delay to each frame, which could
cause currently borderline frame render times (plus the delay) to break frame
where they shouldn't. Plus the issue is that you'd have to drop to the common
factor of the frame-rates: which is 15fps. Not that good. This actually saves
you slightly from the frame-break issue, because the actual frame boundaries can
occur on the granualarity of the refresh sequence. But 15fps physics would
probably be noticeable. And anyway, I wunt be happy getting the same performance
out of my 120MHz/Voodoo1 machine as out of my 400MHz/VoodooII one.

You could use the microsecond time functions to generate a usleep of nearly the
right length each frame, buuuuut.. usleep isn't accurate.

The actual solution without re-doing the physics is hard... essentially in each
75Hz frame you have to do 4/5 of what you'd do in a 60Hz frame and all the
timing will get screwed up.