Re:Making a 3D modeler in C in a week
by sgt on Thursday May 02, 2024 @04:50PM
(#40241210)
Yes, the background is odd but the foreground is definitely not smooth. I see small little jitters occasionally. At one point I had to wait 15 seconds for it to jitter, though.
[ Parent
| on HN ]
Re:Making a 3D modeler in C in a week
by jay_kyburz on Thursday May 02, 2024 @06:58PM
(#40242295)
Yes the back and foreground is quite jittery for me on Firefox, and I'm almost certain its the browsers own requestAnimationFrame that's the problem.
Update: Although, having a closer look at the scene, I see its pixel art, so I bet the author is snapping floating point positions to a pixel point to prevent sub pixel blurring.
Another small update: I was sure requestAnimationFrame was locked to 60fps, but I noticed on Chrome the other day it was 144hz, the full speed of my monitor.
yeah, http://canonical.org/~kragen/sw/dev3/qvaders is unplayable on 120-hertz monitors because i'm running the game physics from raf ;)
Also noting that it's choppy on iPhone, but it's really barely noticable. Cool little game!