1 vs 2 finger swipe sensitivity

TouchTiltGamesTouchTiltGames Member Posts: 1,162
edited November -1 in Working with GS (Mac)
Wondering if anyone has some advice on a small issue I'm having with my game before I release it..

If you touch anywhere on the screen, the cannon shoots (except for the bottom where the interface is), and if you two-finger gesture up, the screen moves up to see more of the play area. Only problem is if you don't have two fingers on the screen at exactly the same time, the cannon shoots accidentally. Some players I can see getting pee'ved off at this so I need a better solution. I don't want to put a delay on the one-finger shooting cause that would slow things down...

So I'm wondering if I could specify a timer of sorts that says - if the second finger touches the screen within 0.5 seconds, do the gesture, else do the shooting. Would this work? Hmm how would I go about that?

Hmm anyone know a clever way of making the two finger swipe not fight with the one finger shooting so picky?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    in the 1 touch have a rule that says

    rule touch is pressed
    ------rule touch count = 1
    -------timer after 0.1 seconds (DO NOT check run to completion)
    ----------do one touch stuff

    this means that you will need to hold your 1 finger down for at least .1 seconds if not it will not fire the canon. Play with the 0.1 to get it to your liking. Leaving check to completion UNCHECKED is what makes it work.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Thanks a ton Sci! I'll try this tomorrow and ping back :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have the exact same thing (not a canon though, just a level selection menu) and works great. Should solve your problem.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Hey Sci, This works great for the first time you touch the screen with 1 finger to shoot or use 2 fingers to swipe, but the second time you try to shoot, it shoots right away with no delay. Here's my code:

    Touch is pressed
    game.touches.count = 1
    Timer: After 0.4 seconds
    game.readyShoot = 1

    Touch is released
    game.readyShoot = 0
    ( I tried then to reset it somehow by adding game.touches.count = 0 but that didnt seem to solve the second time problem)
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    It's gotta be my code somewhere else cause when you first start, the target isn't constrained to the mouse, but on the 2nd shot, it is...hmm.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Got it workin! :) Thanks a lot I appreciate
Sign In or Register to comment.