5 ms·
Is it supposed to have a off by one error? I'm left with an extra fish. Maybe I clicked too fast or managed to get a twofer.
by neuroelectron 2y ago
Is it supposed to have a off by one error? I'm left with an extra fish. Maybe I clicked too fast or managed to get a twofer.
- lifthrasiir 2y agoYes, the game allows for clicking one fish more than once and the number of fishes will gradually increase when this happens over and over. This can be easily triggered with multiple mouses (or one mouse plus mouse keys, as I had).
- memalign 2y agoThank you! I’m able to reproduce this now too! I’ll make a fix this weekend!
- memalign 2y agoThis bug should be fixed now. I found two root causes: 1. Rather than waiting for the game engine update callback, I handle touch/mouse input immediately (required by SpeechSynthesis) so multiple input events can trigger before the game engine cleans up a destroyed object (fish). 2. I incremented score synchronously but marked a fish as destroyed asynchronously so there was a window where another click on the fish could occur. Thanks again!
- wizzwizz4 2y agoThere are indeed always 31 fish.
- memalign 2y agoRight! There are 31 so I could announce “30” and announce the next level. One time I ended up hitting a bug where the new level would start while an extra fish from the previous level was still there. If anybody figures out a way to reproduce this, please share!
- wizzwizz4 2y agohttps://news.ycombinator.com/item?id=42642521 https://news.ycombinator.com/item?id=42642521 allowed me to reproduce this issue. I'm surprised it didn't happen to me before (clicking twice on the same frame isn't that hard, especially if it's lagging).