One tap on the phone counts as two presses in my casual game
A single tap buys the item twice, flips a card back at once or skips a dialog. Phones and browsers each report the touch in their own way, and sometimes both reports arrive. This entry shows how to drop the echo without ever swallowing a real double tap.
Why this works
The echo comes from a different kind of input, at nearly the same spot, a moment later. A real double tap comes from the same kind. Telling them apart by source keeps fast players fast.
When not to use it
Skip it when you listen to only one kind of input event in the first place. That is the cleaner fix and needs no filter.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 24 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "One tap on the phone counts as two presses in my casual game" (read_entry one-tap-counts-twice-on-phone-and-browser) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP