pouët.net

Go to bottom

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?
added on the 2008-10-24 09:29:51 by trixter trixter
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.
added on the 2008-10-24 09:36:06 by d3pth d3pth
Same framerate in other PC ?
added on the 2008-10-24 09:41:49 by Aeko Aeko
and the answer to the universe is .... 42 + 1 !
added on the 2008-10-24 10:10:36 by iq iq
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.
added on the 2008-10-24 11:07:17 by kb_ kb_
Bloody hell, the shit Trixter has to go through!
added on the 2008-10-24 12:02:04 by rc55 rc55
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.
added on the 2008-10-24 17:53:50 by trixter trixter
43 is 45 for extremly big values of 43
added on the 2008-10-24 20:13:14 by src src
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 :)
added on the 2008-10-24 20:33:21 by ryg ryg
the guys at firelight seems to have a good sense of british humour.
added on the 2008-10-24 20:46:07 by v3nom v3nom
use BASS instead. simple as that. :D
Kind-of hard to use BASS once the demo has already been written :)
added on the 2008-10-24 22:09:04 by trixter trixter
well you COULD code a fake fmod dll that routes all calls to bass...
added on the 2008-10-24 22:12:15 by Gargaj Gargaj
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?
added on the 2008-10-24 23:42:03 by BarZoule BarZoule
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?
added on the 2008-10-24 23:49:26 by texel texel
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.
added on the 2008-10-25 00:44:15 by trixter trixter
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.
added on the 2010-07-25 21:16:53 by trixter trixter
that's true for anything conspiracy-related though, all the CNS tools are running with 100hz internally.
added on the 2010-07-25 21:24:35 by Gargaj Gargaj
Wish I'd known that two years ago :-) but thanks for the confirmation. It explains some of the problems I had a year ago.
added on the 2010-07-25 21:39:58 by trixter trixter
There is no background graphic in Wir sind Einstein. There are a few 2d layers but those layers are simple plane objects as well.
added on the 2010-07-25 21:47:04 by slyspy slyspy

login

Go to top