Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've hit a bug on "Waves - Order Still Matters!" where the graph is affected by zoom and object positions. Sorry about the short report, but it's really hard to explain, it just happens.


What do you mean by bug? It's true that you can get slightly different simulations at different zoom levels due to the sampling optimizations needed to draw a new graph every frame, is this keeping you from completing the level?


The graph goes crazy. The sine is spiky, like there were too few samples or some kind of sampling aliasing. This happens in the web plugin and standalone Windows exe.

It's so hard to explain, but I loved the game so much I'll download a screen recording tool to show what's going on. Will edit as soon as I get the video captured.

EDIT: Downloaded the worst video capture tool but here it is:

- Default state, zooming in and out: http://i.imgur.com/N34bRcS.gif You can see spikyness and the graph changing with zoom.

- Default function, changing x's scale: http://i.imgur.com/LQ99RY7.gif This does not make sense at all.

- Sledding with x scaled to 7: http://i.imgur.com/9QukafO.gif The graph changes over time.


Ah, I see what you mean. The problem is indeed sampling. For performance reasons the graph only plots a point every 8 pixels each frame, so if you have drastic changes that happen below that interval you get weird rendering artifacts. Unfortunately this will inevitably be the case until I can get a parser that's fast enough to sample for every pixel.


Well, it kinda breaks the game, doesn't it?

Can you decouple rendering from simulation? I guess so, since it's easy to test whether a point lies below or above the curve. If at least what was simulated were reliable that level would be (somewhat) playable.

I would suggest having reliable visual sampling too (samples in absolute space, growing in number with zoom out), but I'm not aware of the actual performance implications.

I still think there's something else going on besides sampling error. Why is it (visually) working correctly for x*7 until I sled? Why does it change so dramatically over time?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: