Spielerando

Build a quantity "+" button that speeds up while held and lands exactly on the maximum

Choosing how many to craft with a plus button takes forever if you can only add one per tap, and becomes a lottery if it runs wild when held. This entry adds one on the first press, starts repeating after a short pause, speeds up in stages, never jumps past the limit, and gives the same result whatever the frame rate of the phone.

Why this works

People judge a counter by how long they held it, not by how fast their phone drew pictures. Working the number out from the time held gives every device the same result, and cutting the final sum to the limit makes the end land exactly where the player expects.

When not to use it

When the allowed numbers are very few, such as one to five, a stepper with speed-up is overkill; plain buttons or a row of choices are quicker. For huge ranges, a typed number or a slider serves better.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 36 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 "Build a quantity "+" button that speeds up while held and lands exactly on the maximum" (read_entry mobile-quantity-stepper-hold) 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