Hacker News new | ask | show | jobs
by alexanderperrin 3189 days ago
Thanks so much for the kind words and also the performance analysis! I agree with you 100% that the motion can be jarring and unpleasant. I'm yet unsure as to what exactly is causing the issue, but I believe it's something with regards to GC that is just over my head for the moment. Resolution also plays a huge factor, and as a temporary measure I've added a half-res toggle in the info panel. This helps out especially with high DPI monitors.

Whilst it shouldn't be surprising, I'm astounded as to how much of a science and balancing act it is to achieve frames that at least ~feel~ smooth, especially on web browsers.

I'll be working away as much as possible to try and make things silky all over. Thanks for your patience until then!

3 comments

Just curious - did you draw all this artwork yourself? It is exquisite. If so, did you draw onto paper then scan in, or did you use a tablet etc. to create vector drawing that you then animated?
On all my browsers here it animates smoothly enough (good frame rate), but every time it renders changing parts of a frame there’s some flashing effect, and as a result when the car is moving fast looking at the background is pretty unpleasant, especially skinny high-contrast elements like the trees and posts against a white background

Maybe that’s just inevitable when using the canvas for painting?

Just something that might help you debug it, it looked a lot more fluid on my 60hz screen than my 144hz one, where it got pretty jarring at full tram speed. You might also want to add a rate limiter on the bell, but that's personal preference.