Angry Birds path?

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 196
Joined: Sun Oct 24, 2010 12:13 am

Angry Birds path?

Post by richardmac » Sat Feb 25, 2012 10:43 pm

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?

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Angry Birds path?

Post by malte » Sat Feb 25, 2012 11:47 pm

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

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1680
Joined: Sat Feb 28, 2009 11:49 pm

Re: Angry Birds path?

Post by sturgis » Sun Feb 26, 2012 12:08 am

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.

salman.r1BUSYiYh
Posts: 24
Joined: Fri Sep 28, 2012 9:38 pm

Re: Angry Birds path?

Post by salman.r1BUSYiYh » Wed Oct 03, 2012 10:20 pm

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

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Angry Birds path?

Post by malte » Thu Oct 04, 2012 8:40 pm

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

salman.r1BUSYiYh
Posts: 24
Joined: Fri Sep 28, 2012 9:38 pm

Re: Angry Birds path?

Post by salman.r1BUSYiYh » Thu Oct 04, 2012 9:59 pm

thanx

Post Reply

Return to “Animation Engine”