0 Favourites

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

  • 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

  • (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...

  • Skifu

    You might get an idea with following example of mine:

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

  • 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...

  • 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

  • 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)

  • 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?

  • Thanks for your patience ! All of you!

    Maybe My english is very poor, sorry!

    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 Touch.Speedat(0)

    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!

  • 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..

  • 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..

    @LittleStain : thanks I will try to learn about alextro file. .

    I want to have not the same move. Im finding the way to adjust per ball but now I still stucked.

    And when I want to use more point, example 100 point, It's seem hard to me. But I will try .

    I was a beginer of construct 2 for 2 months ago, this is my first game, first code.

    May be I need more time to learn.

  • Take your time and you will start to understand your stuff as you worked for each project even the simple one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,232
rexrainbow's avatar
rexrainbow
Unread hot topic
167 14,513
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,838
minhcuong's avatar
minhcuong