I'm prototyping an app that requires objects to go from the left hand side of the screen to the right hand side of the screen, in a motion similar to how you propel a bird in Angry Birds (a parabolic path, I guess?)
I know I could just make a big huge list of coordinates, but there's got to be an easier way. Anyone?
Angry Birds path?
Moderators: heatherlaine, kevinmiller, robinmiller, malte
-
- Livecode Opensource Backer
- Posts: 211
- Joined: Sun Oct 24, 2010 12:13 am
Re: Angry Birds path?
There is no single line command for that (yet ) However, if you are using AE, you can use movePolygonal.
Use the build in graphics opject (freehand curve) to construct your path. Maybe edit it a little. There are also stacks available to construct a bezier curve. Afterwards, use movePolygonal to move your object.
hope that helps,
Malte
Use the build in graphics opject (freehand curve) to construct your path. Maybe edit it a little. There are also stacks available to construct a bezier curve. Afterwards, use movePolygonal to move your object.
hope that helps,
Malte
Re: Angry Birds path?
Also might look at this thread: http://forums.runrev.com/viewtopic.php?f=7&t=11185 there is a link at the end to a newsletter that has a guide to building a canon shooting type of game.
Also, if you want a calculated path, sin and cos can be used to generate factors that can then be used to calculate a trajectory.
Just off the top of my head.. Determine the angle of launch. use sin and cos to create x, y factors, use those factors unchanged combined with your launch velocity you can move the object in a straight line. Since you want it to be a ballistic trajectory, the y factor can be modified by taking the force of gravity and again to 'tweak' the value of y, adjusting for gravity over time. I think.
Also, if you want a calculated path, sin and cos can be used to generate factors that can then be used to calculate a trajectory.
Just off the top of my head.. Determine the angle of launch. use sin and cos to create x, y factors, use those factors unchanged combined with your launch velocity you can move the object in a straight line. Since you want it to be a ballistic trajectory, the y factor can be modified by taking the force of gravity and again to 'tweak' the value of y, adjusting for gravity over time. I think.
-
- Posts: 24
- Joined: Fri Sep 28, 2012 9:38 pm
Re: Angry Birds path?
Hi guys
i just downloaded livecode and want to make a similar app to angrybirds i.e a ball launches when a person swipes the screen and hits a target
is it possible to do this now via livecode also as a newbie to this will it be better for me to get animation engine as well?
thnx
i just downloaded livecode and want to make a similar app to angrybirds i.e a ball launches when a person swipes the screen and hits a target
is it possible to do this now via livecode also as a newbie to this will it be better for me to get animation engine as well?
thnx
Re: Angry Birds path?
Hi,
as animationEngine is entirely written in liveCode everything contained in it is possible without it in liveCode. Considder it being a time saver on some tricky stuff. Once you got the livecode basics down, download the animationEngine trial and see if it is for you.
Cheers,
Malte
as animationEngine is entirely written in liveCode everything contained in it is possible without it in liveCode. Considder it being a time saver on some tricky stuff. Once you got the livecode basics down, download the animationEngine trial and see if it is for you.
Cheers,
Malte