randomized continuous motion on screen

jorkosjorkos Member, PRO Posts: 353

Hey guys, I have a game concept but i'm struggling with a core piece - I want to have an actor that moves continuously around the screen in smooth lines.....I don't want the movement to be predictable. Have any ideas or suggestions for how to tackle this? The actor starts at the center of the screen and then starts moving....the actor cannot go off screen.

Thank you!!

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    @jorkos -- I can't quite visualize what you mean by moving, "continuously around the screen in smooth lines." Do you mean that you want it to gradually curve around - instead of having sharp angles?

  • jorkosjorkos Member, PRO Posts: 353

    @rthurman yes i'm looking for smooth lines but I want the actual direction randomized.....no sharp angles

  • you could try a timer every 0.1 sec move to randomX(min,max) randomY(min,max)

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Stop Sign Studios Inc. said:
    you could try a timer every 0.1 sec move to randomX(min,max) randomY(min,max)

    But they want smooth lines. That would be very erratic and jagged looking. @Socks has some great demos in this thread: http://forums.gamesalad.com/discussion/52494/spare-code-dump-it-here/p1. You might have to dig a little but his worms examples are probably close to what you want.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    Maybe something like this?

  • SocksSocks London, UK.Member Posts: 12,822

    @jorkos said:
    Hey guys, I have a game concept but i'm struggling with a core piece - I want to have an actor that moves continuously around the screen in smooth lines.....I don't want the movement to be predictable. Have any ideas or suggestions for how to tackle this? The actor starts at the center of the screen and then starts moving....the actor cannot go off screen.

    Here's a version that does go off screen . . . (attached)

    Let me see if I can keep him on screen, back in a minute.

  • SocksSocks London, UK.Member Posts: 12,822

    Here's a quick version that will stay on screen, it's a bit belt and braces, but maybe you could refine it a little.

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2014

    Here are a few example files of random (or pseudo-random) paths, includes such hits as:

    Broken Steering Wheel

    Curley Wurley

    Curved grid

    Dancing Bees

    Doughnuts

    Etch-a-sketch

    Lost Ant

    Nodules

    Occasional Bump

    Perm Machine

    Rising

    Smooth lumps

    Spaghetti

    Sudden Turn

    Wobbly Signature

    Zig-Zag

    Link: https://www.mediafire.com/?p920m99b6pz2v9q

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited December 2014

    @Socks said:
    includes such hits as:

    Not to mention @Socks trying to come up with a trig function while moderately distracted by the music video "Wrecking Ball"

  • SocksSocks London, UK.Member Posts: 12,822

    @Hopscotch said:
    Not to mention Socks trying to come up with a trig function while moderately distracted by the music video "Wrecking Ball"

    There is no need for mockery, as you well know my 'research' into the work of Miley Cyrus is purely sociological.

  • LovejoyLovejoy Member Posts: 2,078

    The trig involved in the cheek movement of twerking is beyond our understanding, lets leave that to professor @Socks‌

  • HopscotchHopscotch Member, PRO Posts: 2,782

    "Initium id intromissio recuperare" @Socks

  • SocksSocks London, UK.Member Posts: 12,822

    @Hopscotch said:
    "Initium id intromissio recuperare"

    That's the line my lawyer used at the trial, I didn't understand it myself, but it did the job, they still imposed the 200 metre restriction zone around Cyrus (although I can still shout at that distance), but I was allowed to keep the shrine in my front garden.

  • SocksSocks London, UK.Member Posts: 12,822

    @Lovejoy said:
    The trig involved in the cheek movement of twerking is beyond our understanding, lets leave that to professor Socks‌

    It's all tables.

  • myu699myu699 Member Posts: 96

    try the interpolate function

Sign In or Register to comment.