Any idea how to do a "Paper Toss" style behavior?

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'm struggling to think about how to do a papertoss style game...

Would I use magnitude or what? How could I get it so that the paper flies away from the lower/middle portion of the screen with the "finger-flick" and the speed/power is determined by the velocity of the flick? Also, the angle of trajectory would be determined by the starting X/Y and ending X/Y, which I'm assuming would be slightly easier (I have an idea in my head how to do this).

I'm assuming 4 real attributes to start;
StartX, StartY and EndX, EndY?

Is there a way to determine the velocity of a "finger-flick"?

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
  • DrGlickertDrGlickert Member Posts: 1,135
    tshirtbooth said:
    Nextgen, yoda posted that you can not respond to a question with a template.

    The users want free answers not paid ones.

    cheers

    Heck yeah I want free answers! ;-)
  • DrGlickertDrGlickert Member Posts: 1,135
    Thanks TSB. I'll give that a shot when I get back from a BBQ. I'll be thinking about it all day!
  • SteverdSteverd Member Posts: 194
    Did that work? I need something just like this for a future game, not a paper toss, but a similar flick type of motion needed.

    Steve
  • mangaroomangaroo Member Posts: 419
    check the marketplace i saw a whole papertoss template that may be worth your while

    edit: its still on the first page actually:
    http://gamesalad.com/forums/topic.php?id=24236
    $15 not bad - would save a lot of hassle id imagine
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    mangaroo said:
    check the marketplace i saw a whole papertoss template that may be worth your while

    edit: its still on the first page actually:
    http://gamesalad.com/forums/topic.php?id=24236
    $15 not bad - would save a lot of hassle id imagine

    Did you read the post from TSB? If not, i'll quote it for you ...
    tshirtbooth said:
    Nextgen, yoda posted that you can not respond to a question with a template.

    The users want free answers not paid ones.

    cheers

  • mangaroomangaroo Member Posts: 419
    $15 for a complete how to is pretty good even alongside an explanation. I mis-read tsbs post thought nextgen was offering hourly help or something
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    I couldn't possibly comment on the template... (especially since I'm assuming NextGen got his message removed for promoting it)....

    But I agree $15 is a steal...

    ...

    @Steverd

    some thing along the lines of what t-shirt has said above will sort out your flick action..

    essentially... you need the position X and Y when touch is pressed, and again when it is released... then put those values into 'Vector to angle' and bobs you uncle...you have the angle that you've flicked at...
  • mangaroomangaroo Member Posts: 419
    ^^ template creator so im assuming some solid advice! good luck
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Oh i agree, its a good solution and well worth not having to worry about yourself. I think we should still be able to point to templates as some people may miss the threads in the marketplace. Its then up to them whether to purchase or hold out for a free answer!
  • DrGlickertDrGlickert Member Posts: 1,135
    I don't mind paying for templates. However, if I ask for an answer to something simple like this, I shouldn't receive a post; "Buy this template"

    It should have an answer to my question, along with, "Oh, BTW, here is a template for sale on this very issue..."
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Have you tried using what t-shirt suggested for getting the velocity to vary depending on the speed of the swipe?

    speed magnitude(self.position.Y,mouse.positionY)*3

    I've never used it myself, so not sure it knows how fast you've done the swipe?, I guess its working on a longer swipe on the screen being faster than a shorter one.

    Any luck?,
    if not, let us know and I'm sure one of us can figure it out....
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    DrGlickert said:
    I don't mind paying for templates. However, if I ask for an answer to something simple like this, I shouldn't receive a post; "Buy this template"

    It should have an answer to my question, along with, "Oh, BTW, here is a template for sale on this very issue..."

    But what if the following occurs;

    a. you dont know there is a template
    b. i know there is a template but dont know the answer to your question but know the template will solve your problem

    So rather than answering and posting, i now just have to ignore it and not comment?
  • DrGlickertDrGlickert Member Posts: 1,135
    That did not help. I'm messin with some ideas right now though...
  • DrGlickertDrGlickert Member Posts: 1,135
    I figured out how to get a starting X,Y (point A) and an Ending X,Y (point B).

    But I'm not sure how to detect how fast it took the player to "flick" from point A to point B.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    FMG has a free demo for this. I've used it. works great
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    SciTunes... any clues which one... I've had a quick look..

    I guess a reworking of the accelerate to mouse demo might work, if its setup to work only whilst touch is pressed, then when its released have it continue at its own velocity...
    http://gamesalad.com/game/3203

    ??
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    he called it throwing demo I think.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    "Throwing/Flicking Demo"
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    After the flicking occurs use interpolate to make the thrown object get smaller so it appears to be going off into the distance. Or constrain its height and width to a constant divided by the y position. This way it's size change will be lined up with how fast you flick the object making it more realistic.
  • DrGlickertDrGlickert Member Posts: 1,135
    I am going to do the interpolate/constrain for the size for sure.

    The problem that I'm having now is that I can't seem to find out how to determine the player's "flick-velocity."

    I have a starting x,y and an ending x,y which will give me the trajectory/angle of too. But I don't know how to get the "throw" velocity correct.

    I may start a new thread for that topic...
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    DrGlickert said:
    I am going to do the interpolate/constrain for the size for sure.

    The problem that I'm having now is that I can't seem to find out how to determine the player's "flick-velocity."

    I have a starting x,y and an ending x,y which will give me the trajectory/angle of too. But I don't know how to get the "throw" velocity correct.

    I may start a new thread for that topic...

    Have you opened the demo I mention above. I'm almost certain that has the velocity feature built into it.
  • DrGlickertDrGlickert Member Posts: 1,135
    It does. But it's based on the magnitude. I'm not opposed to using magnitude as the velocity of the ball. But I was hoping there was a way to make it so if the player doesn't flick as fast it wouldn't go as far and if they flick hard it would go much farther. I gotta think there is some way to accomplish this, just gotta find out how.

    I think this way gives the player a greater sense of control and ability with the game. If it's based on how far the player drags their finger then it doesn't work as well (in my opinion).
Sign In or Register to comment.