Need Help! Creating a curving, bending line!

JagonAppsJagonApps Member Posts: 241
edited September 2013 in Working with GS (Mac)
Hi there!
I am looking to create an actor which is in the shape of a line, which can curve left and right and bend, according to preset parameters/rules, rather than for example following a mouse position.
If you can't visualise this, imagine the game snake, but instead of you moving the snake, it moves by itself (in a smooth motion however).

Perhaps I am not using the right terminology, but I can't find any resources or help guides on how I might do this.

Thanks for any help

Max

Best Answer

  • SocksSocks London, UK.Posts: 12,822
    edited September 2013 Accepted Answer
    Surely though you didn't create that effect in Gamesalad???
    Yes, it's all GameSalad, in fact it's a very simple project, just two actors - and two or three pretty simple rules in each actor doing nothing more exciting than moving and rotating. It looks more complex than it is.
    I thought what @gyroscope was saying was that he was showing a solution, but it would only work with joints. And I thought the amount of segments required to make it smooth would be unworkable.
    So...you have done it without joints??? :o
    You don't really need joints for something as simple as this, it's all going in one direction after all, there's nothing complex going on here, you could send a circle along a path, then send another circle along the same path 0.2/second later and another 0.2/second after than (and so on) to build up a moving 'snake' - try it, it's more straightforward than you might imagine.

Answers

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @JagonApps I'm thinking this can't be done yet, sorry to say (although I could be wrong...) I say "yet" because if/when we have joints, it'll be no problem.

    Slightly in this ballpark, for interest, you can have a single actor follow curved and bendy paths (these paths made invisible if needed).

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JagonAppsJagonApps Member Posts: 241
    @gyroscope,Thanks for the reply, I feared so though, but do you reckon you could elaborate please? By this I mean how would these paths be created?

    Slightly in this ballpark, for interest, you can have a single actor follow curved and bendy paths (these paths made invisible if needed).
    And failing that, a second opinion per chance? :P
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    @gyroscope,Thanks for the reply, I feared so though, but do you reckon you could elaborate please? By this I mean how would these paths be created?
    Hi, if you mean when made with joints, then the snake (following your example) could be made up of lots of segments, all of them following the lead segment (the head of the snake). This snake head could be made to move in a number of ways, like any other actor as you know, random directions included. Have I understood your question?)

    ----BUMP---

    And failing that, a second opinion per chance? :P

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JagonAppsJagonApps Member Posts: 241
    @gyroscope,Thanks for the reply, I feared so though, but do you reckon you could elaborate please? By this I mean how would these paths be created?
    Hi, if you mean when made with joints, then the snake (following your example) could be made up of lots of segments, all of them following the lead segment (the head of the snake). This snake head could be made to move in a number of ways, like any other actor as you know, random directions included. Have I understood your question?)

    Hi! Sorry no, I was hoping by what you said in the quote that there was an alternative way that might work now, although less effective?!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2013

    Ah, I see, sorry to be unclear... I shouldn't have added the bit about following curves, etc., but I'll repeat that this would work only for a single actor, not an "articulated" set of actors....

    So I can't really think of a workaround, even a less effective one, I'm afraid.... hope someone else chimes in with an idea tho'...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JagonAppsJagonApps Member Posts: 241
    edited September 2013
    @gyroscope, Ok thanks for your help anyway! btw like the look of the new website, looking forward to seeing it finished!

    Ok guys, this is your queue to jump in with a some work around... :P
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2013
    @gyroscope, Ok thanks for your help anyway! btw like the look of the new website, looking forward to seeing it finished!
    You're welcome; shame I couldn't come up with a solution for you.

    And thanks re: my new website... I'm a bit ashamed really, it's been "stuck" that way for far too long; I really must update it....

    ---------

    ----BUMP----

    Ok guys, this is your queue to jump in with a some work around... :P

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JagonAppsJagonApps Member Posts: 241
    @gyroscope Ye that's the same with mine! :P

    Thanks for the bump!
    Speaking of which...
    Bump!
  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2013
    @gyroscope Ye that's the same with mine! :P

    Thanks for the bump!
    Speaking of which...
    Bump!
    @JagonApps

    What @gyroscope said should pretty much cover it, just send each segment of your snake (or whatever) down the same path - but later segments are offset in either time or position.

    I've attached a little Quicktime movie of the finished effect . . . . . .

  • JagonAppsJagonApps Member Posts: 241
    @Socks Thanks for the reply, and the video, much appreciated.
    Surely though you didn't create that effect in Gamesalad??? Surely? **jaw drops**
    I thought what @gyroscope was saying was that he was showing a solution, but it would only work with joints. And I thought the amount of segments required to make it smooth would be unworkable.
    So...you have done it without joints??? :o

    If this is true, I would love to see the GS file of how if that is ok?!

    Max
  • JagonAppsJagonApps Member Posts: 241
    @Socks

    Incredible! Thanks so much I will try that out!
    And thanks to @gyroscope as well, you have both been a great help!

    Cheers

    Max
Sign In or Register to comment.