← Back to context

Comment by yetihehe

4 hours ago

About 20 years ago there was a similar problem with demoscene creations. It was hard to capture demos in realtime in all their glory. So one guy created a tool[1] that waited for a frame render and presented proper time to demo so that frames would be paced properly. "All popular ways of getting time into the program are wrapped aswell - timeGetTime, QueryPerformanceCounter, you name it. This is necessary so .kkapture can make the program think it runs at a fixed framerate (whatever you specified)."

[1] https://www.farbrausch.de/~fg/kkapture/

Ha, I independently set that up for my own coding animations. Not as crazy as faking the whole system time though, that's cool!

It's still used in the gaming industry but fir the opposite, you can go faster than time.

Some enterprise software also have it, mainly for testing and they have lint tools that check that you never use Date.now()

Dont forget .gif webcam streams! Just keep sending new frames!

  • Indeed. The problem with that was that the browser would cache the whole bloody stream and that quickly led to issues. That's why we switched to JPEG, which also greatly improved the image quality over the GIF format, which really wasn't designed for dealing with camera generated images.