Scripted "physics" for bones! Collision detection!

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Please check the first post for new download files. I combined the AS and lua files into one zip file.

Once again more problems from my new hosting server. It doesn't support ".anme" or ".lua" file downloads.

-vern
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

VERN! Is this working properly? I'm UBER keen to make some cool animation, with like, someone getting shot out of a cannon and then smashing into a whole bunch of stuff. Kind of like a computer game ragdoll physics. Something about ragdoll physics fascinates me.

Can your scripts simulate something like what I'm talking about?
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

I found this cool little ragdoll game:

http://www.play4all.net/games/321/play.html
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

That game uses BOX2d

BOX2d.ORG

Someone's probably already posted that before, in fact I seem to remember seeing someone post that. Anyone ever use that program? Looks great. Man, AS implementation would be CRAZY! Ha ha ha ha ha. Too cool.
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

`Another great 2D physics game, looks like AS's style really. Sone with BOX2D. Lovely:

http://www.kongregate.com/games/Karolin ... wboarding/
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Unfortunately my scripts can't do ragdoll physics... yet. However it could do it. I just have to continue porting the Actionscript I have or use something like Box2d. I looked into Box2d but it's a bit over my head and not easily ported to lua. The math principles are in there but it's pretty complicated and not a straight forward conversion.

Anything done with Flash like ragdoll physics can be converted to lua and used in AS. It just... uh.... needs to be converted. I mentioned in a previous post the main problem I had converting Actionscript to lua.

Flash is wrong. It is "backwards". The coordinate system used in Flash is the opposite of what is "correct" for nearly every 2D coordinate system including what they teach in math class in college! It's upside down and rotations go in the wrong direction (counterclockwise should be a positive rotation. In Flash it is negative.. or something like that). So the Flash programmers are morons. It's all their fault. ;)

To make these scripts work I have to flip everything upside down before applying it to the bones. It's a bit of a pain in the arse.

-vern
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

Vern. You really need to be paid by Smith-Micro to make this script. That, or make a script to clone yourself and then make a whole company, VERN INC. that makes scripts for AS.

I must admit, I don't use scripts for anything really, but ragdoll physics would be pretty awesome.
Post Reply