Swipe gesture behavior for iphone game.

Discussion and feedback on Construct 2

Post » Mon Oct 17, 2011 12:49 am

About making game like "Fruit ninja".
I think it'll be nice if we have swipe detecting :D


This is how the detecting work.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/1412-detecting-swipe-gesture.html
B
3
G
1
Posts: 27
Reputation: 584

Post » Mon Oct 17, 2011 7:37 am

I am sure there are quite a few ways of doing this. For 'fruit ninja', for instance, why not have the program create a short-lived 'detector object' every tick while the screen is being touched. Then the fruit could be tested for collision with these particles.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Mon Oct 17, 2011 9:57 pm

That's good idea. I'll try it. Thank you squiddster!
B
3
G
1
Posts: 27
Reputation: 584

Post » Thu Jun 21, 2012 9:16 pm

Hmm.. I was looking for something similar.. that particle idea is pretty good too. I'm working on a shooter-ish game and I want to make the "ship" fly bounce around and return in the "general direction of the swipe... sounds harder than it is(or maybe not :P ).Ragevortex2012-06-21 21:17:12
Freefall Bird
B
37
S
8
G
5
Posts: 262
Reputation: 5,360

Post » Thu Jun 21, 2012 9:20 pm

@Ragevortex, that will be pretty simple, you just need to find the touch.X and touch.Y when you first press, then find the same when you release. Put that in angle() and Bob's your uncle.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Thu Jun 21, 2012 9:26 pm

Oh Nice! ... I just had adapted my game to catch the touchX and touch Y on the ship's inner "xTarget and yTarget" variables to see if It could just move better like that(which it did) this solution you give me will help with the (soon to come) battle system. (other than just plainly shooting every x tics) I wanna ram the thing to some of the targets heheh :) Thanx a lot :D
Freefall Bird
B
37
S
8
G
5
Posts: 262
Reputation: 5,360


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests