View Full Version : this game really got me wondering...
arkhan
12-02-2004, 02:20 PM
http://www.stickpage.com/ragdollgame.shtml
I have no idea how this could be made..any ideas?
jason
12-02-2004, 02:34 PM
Even with my really bad flash skills I would think it would be:
Click drag code to pick up the stick man
[}[[][] \\ What you think i know the code?
And the On collision code..
Nexus
12-02-2004, 04:07 PM
Ah, good old rag doll physics...
This is a little tricky to implement, it happens to require a few physics calculations.
I myself don't know what the actual method is, I just know that if you search around for "pendulum physics" or some other tutorial like that you'll find something.
Freddy
12-02-2004, 06:31 PM
dude, thats freakin awsome.
gotta love the blood particle efect.
c00lryguy
12-02-2004, 06:47 PM
BAHAHAHAHA!
I dropped him and he landed like this:
http://www.imageshosted.com/images/516345bahahha.jpg
mrlego9
12-02-2004, 07:06 PM
interesting. I have no knowlage of flash so i can't help :D
eatmorchikin6464
12-02-2004, 07:11 PM
It's fun to put him in a position on one side of the room. Keep holding the left mouse button. Then press the right mouse button and move the mouse to the opposite side's top corner, and click your left mouse button and hold. He flies right into the wall.
c00lryguy
12-02-2004, 07:13 PM
bahahahhaa awsome!
The Brown Cow
12-02-2004, 07:29 PM
Hmmm...
I'll have to play around with this some time.
I suppose you could do it by nesting the clips within eachother, but that could be messy...
Probably a clever use of objects and physics. Interesting...
c00lryguy
12-02-2004, 07:32 PM
i like positioning him so it looks like hes gonna do a back flip then throw him up and watch it try to do a flip but end up cracking its neak ^.^
Nexus
12-02-2004, 07:55 PM
Notice how when you click on a joint it follows the mouse but acts more like a spring? Off the top of my head here's a little demonstration of how to do that...
Make a MovieClip with a circle inside it, change it's instance name to "spring". Put this code in the main timeline and set the fps to 32 or higher. The place where you first place the spring movieclip on stage is where it will spring back to.
//Set spring's returning point
origin = new Object();
origin.x = spring._x;
origin.y = spring._y;
//Initial velocities
spring.vx = 0;
spring.vy = 0;
//Handlers
_root.onEnterFrame = function() {
var k = 0.2; //Rebound force of the spring
var i = 0.9 //Elasticity of the spring (1 = never stops)
if (!spring.dragging) {
disx = spring._x-origin.x;
disy = spring._y-origin.y;
spring.vx = k*-disx+i*spring.vx;
spring.vy = k*-disy+i*spring.vy;
spring._x += spring.vx;
spring._y += spring.vy;
}
};
spring.onMouseDown = function() {
startDrag(this, true);
spring.dragging = true;
};
spring.onMouseUp = function() {
spring.dragging = false;
stopDrag();
};
c00lryguy
12-02-2004, 08:09 PM
cool, it has a...gummy..feel to it
Jonanin
12-04-2004, 11:38 AM
i saw a tutorial on elasticity... and it hard like 1/3 less code and did the same thing ;)
Nexus
12-05-2004, 12:01 PM
Then chances are that code was for a movieclip. :wink:
DarkReality
12-06-2004, 02:05 PM
http://www.bit-101.com/tutorials/
Has a tutorial on how to create a "creature" with limbs that interact with the body to give it a relaistic feel. Spring physics and so on. Lots of fun stuff. Nowhere near as complex as the thing that was posted, but it gives a general idea of how it works.
And there are some kick-butt flash projects on the site :-D
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.