How do I make the curved ball moving by the curved touch

Get help using Construct 2

Post » Thu Oct 08, 2015 8:37 am

Trouble 1. How do I make the curved ball moving form the curved touch ?

Like this

youtube.com/watch?v=iDefzSrGvXg

More curved and fast of touch slide ---> more curved and fast ball moving

This is google play link : play.google.com/store/apps/details?id=com.fatfish.striker&hl=en

Trouble 2 . And I want to do this with more ball in the same time ,
each touch slide user do that will spawn a ball with curved moving equivalent .

(Now, in my game , I have an trouble that: all ball move the the same curved when I touch)

P/S:Sorry! my english is not good
B
4
Posts: 6
Reputation: 218

Post » Thu Oct 08, 2015 2:41 pm

Skifu wrote:(Now, in my game , I have an trouble that: all ball move the the same curved when I touch)


so you got your first 2 problems fixed? or do those still need help?

the last problem you mentioned could be fixed with multitouch... could be fixed by adding this...
viewtopic.php?t=67519&start=0
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,070

Post » Thu Oct 08, 2015 10:14 pm

@Skifu
You might get an idea with following example of mine:
viewtopic.php?f=147&t=124206&p=937984&hilit=+ball#p937984
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Fri Oct 09, 2015 6:07 am

Hi there

@antares330 thank for you reply
I need help all trouble ( 1 + 2)
1. I just reach to curved ball when user touching but I need to curved ball after user's touch is end
2. I dont need multitouch, I want a lot of ball, that fly in the sreen together with it's fix trajectory .
Each ball have a fix trajectory ( input by touch slide before the ball is created )

try my capx html below

@akextro thank for you topic, but your capx is diffirent with what I need.
I will reseach your file deeper . Hoping I will find something to apply for my game.

Please try my demo or capx to view what is my trouble and what Ive done


This is my Capx file dl.dropboxusercontent.com/u/25774306/curvedball.capx
html : dl.dropboxusercontent.com/u/25774306/Curvedball/index.html

Guide to control: Touch/click mouse any where to move player
slide,flick/drag curved mouse to spawn the ball and control the ball
B
4
Posts: 6
Reputation: 218

Post » Fri Oct 09, 2015 12:26 pm

Although I didn't test it... this is what I had in mind...

The touch object has 2 things...
1. angleAt (so you can tell what angle)
2. SpeedForID (to set the speed)

Use these, when touch ends, to send the ball in the right direction at the right speed...
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,070

Post » Fri Oct 09, 2015 2:31 pm

antares330 wrote:Although I didn't test it... this is what I had in mind...

The touch object has 2 things...
1. angleAt (so you can tell what angle)
2. SpeedForID (to set the speed)

Use these, when touch ends, to send the ball in the right direction at the right speed...


Yes, I made game angleAt and speedforid then I have my file demo I ve post :mrgreen:
B
4
Posts: 6
Reputation: 218

Post » Fri Oct 09, 2015 3:36 pm

I don't quite understand your last post...

Your saying angleAt and speedForID worked?

or that was in your demo you uploaded above? (I Checked your demo file, I didn't see it... although my monitor is in a lower res atm)
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,070

Post » Fri Oct 09, 2015 10:10 pm

@Skifu
I don't understand.. You said you need to make the ball move in curve and it will moving fast or slow depend to the touch (swipe) speed.
My example showcase these mechanic, you just need to make it simpler than mine.

So what exactly you want the game behave to?
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Sat Oct 10, 2015 3:58 pm

Thanks for your patience ! All of you!
Maybe My english is very poor, sorry!

antares330 wrote:I don't quite understand your last post...

Your saying angleAt and speedForID worked?

or that was in your demo you uploaded above? (I Checked your demo file, I didn't see it... although my monitor is in a lower res atm)


I mean angleat and speedforid , they work for my demo uploaded above

in my capx file

On any touch end > system creat ball opject
Ball on created> Ball set Car speed to [b]Touch.Speedat(0)[/b]
Touch is in touch >ball rotate 120*dt degree toward Touch.angleat

@alextro @antares330 »
=> Now I curved the ball when I curved the swipe touch in the same time
But I want to to curved the ball affer the curved touch end.

In @alextro file , you have just one ball
but In my game , I spawn a lot of ball. Now , my 1st trouble is all the ball will have the same move

And your ball is have the simply curved move (banana ball) - It's very real
2nd trouble: I want my game have more fantatic move like sin move...and even the ball fly circle around and around. ( yes , the move still depend on touch input)
If I use just 3 point like your capx file , I just only make a banana move

Thanks for your helps!
B
4
Posts: 6
Reputation: 218

Post » Sat Oct 10, 2015 4:32 pm

Seems to me @alextro has given you a great starting point..
What you have to do now, is adjust things so they suit you better..

"my 1st trouble is all the ball will have the same move"

It's unclear if you want to have the same move or not..
If not you could add randomness or adjust per ball depending on your requirements..

"If I use just 3 point like your capx file , I just only make a banana move"

You might want to try adding more points, although the math will probably become a bit more complicated..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 8 guests