Show HN: Counting Tap Toy
memalign.github.ioHi HN! This is a project I made for my 3-year-old who always skips “14” when counting.
In Counting Tap Toy, you can tap to count various aquatic creatures. The count is displayed and announced. My hope is that seeing and hearing the numbers will reinforce 14’s existence.
I find tapping all the fish while listening to the songs and popping sound effects to be pretty relaxing too.
Technical details: https://memalign.github.io/p/counting.html
This is the fourth “Tap Toy”, joining:
- Slice: https://memalign.github.io/m/slice/index.html
- Fireworks: https://memalign.github.io/m/fireworks/index.html
- Original: https://memalign.github.io/m/taptoy/index.html
Tried fireworks. Looks awesome for my 3.5 year old (he is playing Super Mario Bros snes version on TV these days so not sure but will try).
It's very choppy on phone when bursting, animation looks awesome but need some optimisation I guess.
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.
Yes, 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).
Thank you! I’m able to reproduce this now too! I’ll make a fix this weekend!
This 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!
There are indeed always 31 fish.
Right! 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!
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).
This is fantastic and just the kind of thing my nephew enjoys! Thank you for sharing. :)
Consider adding a configurable setting that skips "14" when counting in order to memorialize the cited reason for your effort. It might also help others empathize with your child. :)
count speech is delayed when you click too quickly. I got to 28 while voice was still saying 19. You should not wait for the sample to finish, just cut it off and start the new one
I don’t think the built-in browser SpeechSynthesis allows this, though it does allow for increasing the rate of speech. Maybe it’d work well to try to dynamically match the tap rate and the speaking rate.
For speed tappers who don’t need the number to be announced, I made it possible to mute the announcements.
You can cancel the ongoing utterance and any additionally queued utterances at any time with `speechSynthesis.cancel()`.
Oh nice - thank you!
Yes, by level 12 the audio was still counting up the stuff from level 9. Actually exciting to outrun the speech by clicking faster.
(I didn't know the goal/purpose of the game at that time, so I just clicked through, hoping for something to change)
I dont know what is going on. It counts to 30 then adds more stuff
[dead]
Love it. If you love little toy webapps, maybe you will like my scroll speed o meter.
https://speed2.franzai.com/
Pressed the "end" key on the keyboard and won ;) thanks
(Top speed: 127351 km/h)
End does fly fast but not nearly as fast as the speed of light.
Maybe I don't understand what is supposed to happen, but this doesn't work for me. (Firefox, Pop_OS!)