Windows demos at 43fps?
category: general [glöplog]
I'm doing pre-production work on MindCandy 3 and noticing a few demos that have an internal framerate of 43fps. Significant Deformation/kewlers is one, ix/moppi is another... Why 43? Is there some special significance to 43 as it applies to Windows timers or something? (like 18.2 is to DOS, for example)
Just curious... 25 or 30 or 60, etc. all make sense, but 43?? Any ideas?
Just curious... 25 or 30 or 60, etc. all make sense, but 43?? Any ideas?
I think it's due to FMOD - Check the seminar by Ryg from breakpoint 2008 (at about 39:00) - he says it's 45 fps though.
Same framerate in other PC ?
and the answer to the universe is .... 42 + 1 !
Yes, it's FMOD that has an internat timer resolution of about 43-45 Hz. People have been bugging Firelight for years now to either fix that or at least put a big red flashing warning into the docs, but so far he refused.
I know that Ryg thought about working on a workaround for kkapture (basically intercepting FMOD's getposition call and replacing it by a _real_ timer :), but no idea how far that has come, if at all.
I know that Ryg thought about working on a workaround for kkapture (basically intercepting FMOD's getposition call and replacing it by a _real_ timer :), but no idea how far that has come, if at all.
Bloody hell, the shit Trixter has to go through!
What iq same (he really deserves that nick, you know?) ;)
same = said
it's just 1 FPS too much.
Thanks for the replies; I emailed ryg to get his thoughts.
43 is 45 for extremly big values of 43
fmod only updates its mixing buffer position in 4k increments (the size of the chunks it submits to the sound api).
at 44.1khz, that gives 176400/4096=43.06640625 increments per second (exactly). at 22.05khz, you actually get a max framerate of around 21.53fps, with 48khz it's 46.875fps. it's ridiculous no matter what.
i did some special-case hacks for individual demos, but didn't try anything systematic yet. i'll look into it and try to do it soon, but no promises :)
at 44.1khz, that gives 176400/4096=43.06640625 increments per second (exactly). at 22.05khz, you actually get a max framerate of around 21.53fps, with 48khz it's 46.875fps. it's ridiculous no matter what.
i did some special-case hacks for individual demos, but didn't try anything systematic yet. i'll look into it and try to do it soon, but no promises :)
the guys at firelight seems to have a good sense of british humour.
use BASS instead. simple as that. :D
Kind-of hard to use BASS once the demo has already been written :)
well you COULD code a fake fmod dll that routes all calls to bass...
well.. that's go to know! i'll continue to not use fmod's timer!
...but trixter how the heck did you find out the 43hz ? comparing and counting each frames at various rates?
...but trixter how the heck did you find out the 43hz ? comparing and counting each frames at various rates?
well, so many people have found out about that, so it can't be that hard. :D
43 kb should be enough for everybody but...
Does it happens only when you used fmod's timer?
Does it happens only when you used fmod's timer?
43 kb maybe, but not 43 hz!
"how the heck did you find out the 43hz ? comparing and counting each frames at various rates?"
Yes. Stepping through the captured files, it was clear that some events were moving at a rate different than the capture rate. So I just did some experiments to find it.
Yes. Stepping through the captured files, it was clear that some events were moving at a rate different than the capture rate. So I just did some experiments to find it.
We can squeeze 4 more demos onto MC3 so we wanted to give Wir sind Einstein a try. This demo has always bugged me somehow, and after some kkapture analysis, now I know why: The object movement is on a 100Hz timer, but other elements (like background graphic) movement is on a fixed delta every frame. So that's why the demo has always looked odd to me, and why the only way to properly capture this demo is at 100Hz. But the MC3 Blu-ray is 60Hz, so I'm going to have to do some "interesting" motion synthesis with mvtools or something to try to create a 60Hz version that doesn't have judder. That is going to take days with 1080 source material...
...at least ASM is still 2 weeks away (we're waiting to see what ASM produces for other MC3 demos) so I have some time.
...at least ASM is still 2 weeks away (we're waiting to see what ASM produces for other MC3 demos) so I have some time.
that's true for anything conspiracy-related though, all the CNS tools are running with 100hz internally.
Wish I'd known that two years ago :-) but thanks for the confirmation. It explains some of the problems I had a year ago.
There is no background graphic in Wir sind Einstein. There are a few 2d layers but those layers are simple plane objects as well.