Show HN: Counting Tap Toy
30 points by memalign 3 days ago | 20 comments
Hi 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

  • franze 2 days ago |
    Love it. If you love little toy webapps, maybe you will like my scroll speed o meter.

    https://speed2.franzai.com/

    • NAHWheatCracker 2 days ago |
      Maybe I don't understand what is supposed to happen, but this doesn't work for me. (Firefox, Pop_OS!)
    • sllabres 2 days ago |
      Pressed the "end" key on the keyboard and won ;) thanks

      (Top speed: 127351 km/h)

      • tartoran 2 days ago |
        End does fly fast but not nearly as fast as the speed of light.
  • smusamashah 2 days ago |
    I dont know what is going on. It counts to 30 then adds more stuff
  • brulard 2 days ago |
    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
    • memalign 2 days ago |
      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.

      • lifthrasiir 2 days ago |
        You can cancel the ongoing utterance and any additionally queued utterances at any time with `speechSynthesis.cancel()`.
        • memalign 17 hours ago |
          Oh nice - thank you!
    • elaus 2 days ago |
      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)

  • smusamashah 2 days ago |
    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.

  • jsejcksn 2 days ago |
    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. :)
  • neuroelectron 2 days 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.
    • wizzwizz4 2 days ago |
      There are indeed always 31 fish.
      • memalign 2 days ago |
        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!

        • wizzwizz4 2 days ago |
          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).
    • lifthrasiir 2 days ago |
      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).
      • memalign a day ago |
        Thank you! I’m able to reproduce this now too! I’ll make a fix this weekend!
        • memalign 13 hours ago |
          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!

  • sdrothrock 2 days ago |
    This is fantastic and just the kind of thing my nephew enjoys! Thank you for sharing. :)