randomized continuous motion on screen
jorkos
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
@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?
@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)
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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Maybe something like this?
Here's a version that does go off screen . . . (attached)
Let me see if I can keep him on screen, back in a minute.
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.
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
Not to mention @Socks trying to come up with a trig function while moderately distracted by the music video "Wrecking Ball"
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
There is no need for mockery, as you well know my 'research' into the work of Miley Cyrus is purely sociological.
The trig involved in the cheek movement of twerking is beyond our understanding, lets leave that to professor @Socks
Fortuna Infortuna Forti Una
"Initium id intromissio recuperare" @Socks
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
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.
It's all tables.
try the interpolate function