Show HN: Counting Tap Toy

(memalign.github.io)

31 points | by memalign 17 days ago

9 comments

  • smusamashah 17 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.

  • neuroelectron 17 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.
    • lifthrasiir 16 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 16 days ago
        Thank you! I’m able to reproduce this now too! I’ll make a fix this weekend!
        • memalign 15 days 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!

    • wizzwizz4 16 days ago
      There are indeed always 31 fish.
      • memalign 16 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!

  • sdrothrock 16 days ago
    This is fantastic and just the kind of thing my nephew enjoys! Thank you for sharing. :)
  • jsejcksn 17 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. :)
  • brulard 17 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 16 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 16 days ago
        You can cancel the ongoing utterance and any additionally queued utterances at any time with `speechSynthesis.cancel()`.
        • memalign 15 days ago
          Oh nice - thank you!
    • elaus 16 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 17 days ago
    I dont know what is going on. It counts to 30 then adds more stuff
  • hidden24 17 days ago
    [dead]
  • franze 17 days ago
    Love it. If you love little toy webapps, maybe you will like my scroll speed o meter.

    https://speed2.franzai.com/

    • sllabres 17 days ago
      Pressed the "end" key on the keyboard and won ;) thanks

      (Top speed: 127351 km/h)

      • tartoran 17 days ago
        End does fly fast but not nearly as fast as the speed of light.
    • NAHWheatCracker 17 days ago
      Maybe I don't understand what is supposed to happen, but this doesn't work for me. (Firefox, Pop_OS!)