GoogleChromeLabs / proxx

A game of proximity
https://proxx.app
Apache License 2.0
1.32k stars 125 forks source link

Hold to flag on touchscreens #480

Closed Fry98 closed 5 years ago

Fry98 commented 5 years ago

Solves issue #55. The held tile gets flagged after approx. 400 ms even when the user is still touching the screen. That should solve the problem with indicating mode switch to the user and prevent accidentally tapping a black hole.

If user moves his finger before the tile is flagged, the event gets cancelled and his touch only works as a scroll trigger.

jakearchibald commented 5 years ago

Unfortunately this doesn't solve https://github.com/GoogleChromeLabs/proxx/issues/55#issuecomment-485356053. If the user holds for 399ms they get the opposite of what they intended, and likely lose the game.

Fry98 commented 5 years ago

It seems that maybe I don't quite understand the problem. I thought that the problem was that it might not be obvious to the user for how long he needs to hold and he might tap a black hole accidentally if he released his finger too soon.

In my branch, the tile turns blue the moment you've held long enough so you can immediately see that the tile already got flagged and you can release your finger.

surma commented 5 years ago

How do you see the tile turned blue when your finger is on top?

Vibration would be great, but iirc there's no support on iOS :(

surma commented 5 years ago

Also I just remembered: our original solution to this was making the nebula background flash in some way as a signal that the user has tapped long enough.

Fry98 commented 5 years ago

Hmm... I guess that's a good point. While playtesting, it never really happened to me that I would cover the whole tile with my finger and couldn't see it but I guess it could happen to someone with bigger fingers.

I'll just close this PR then.