Live data from Hacker News

Bouncing DVD Logo

bouncingdvdlogo.com

11–20 of 293 posts

Re: Bouncing DVD Logo

#11
In 1999, my DVD player could do this smoothly without any hitches or glitches. In 2020, my Xeon can't render this fast enough to avoid stutters. Either code quality has gone way down or my DVD player had a faster CPU.

Re: Bouncing DVD Logo

#12
post #7
post #3

Earlier quoted context omitted.

I watched the site for a bit just to see if it would hit the corner.

Some shameless plugs, My take on the matter - http://tholman.com/special-screen-savers/1/ ... and a 5ish minute segment at a conference talk, explaining the math of corner hitting, and my solutions https://youtu.be/iGPzwotXgfk?t=415

Right when you think now I know how deep the knowledge pockets of HN go you get surprised by a comment like this. Never imagined someone giving a talk about such an obscure digital event.

What an awesome explanation. Thank you for sharing!

Re: Bouncing DVD Logo

#16

In 1999, my DVD player could do this smoothly without any hitches or glitches. In 2020, my Xeon can't render this fast enough to avoid stutters. Either code quality has gone way down or my DVD player had a faster CPU.

Your computer is plenty fast, this is just written in a simple-but-slow way. See discussion under https://news.ycombinator.com/item?id=22882747

Re: Bouncing DVD Logo

#17
post #5

I was wondering why the animation was so stuttery and then I saw they are using setInterval for the animation... Jesus it's 2020 at least use requestAnimationFrame! https://flaviocopes.com/requestanimationframe/

It's a pretty simple page, setTimeout should work well enough. Is the interval too high?

The issue's not setTimeout. Even with requestAnimationFrame, you'd combine it with setTimeout to control framerate and cpu usage.

The issue is the css properties manipulated, as commented by another person.

Re: Bouncing DVD Logo

#18
post #5

I was wondering why the animation was so stuttery and then I saw they are using setInterval for the animation... Jesus it's 2020 at least use requestAnimationFrame! https://flaviocopes.com/requestanimationframe/

It's a pretty simple page, setTimeout should work well enough. Is the interval too high?

It's not just about speed, it's about timing. With setInterval the alignment of the screen refresh and the code to update will quickly become out of sync and cause periods where 2 frames are the same.

Re: Bouncing DVD Logo

#19

In 1999, my DVD player could do this smoothly without any hitches or glitches. In 2020, my Xeon can't render this fast enough to avoid stutters. Either code quality has gone way down or my DVD player had a faster CPU.

Interestingly, it’s smooth as butter on 3 year old phone.
Post reply on HN