Jump to content


Photo

Ragdoll + Physics Engine(s) - Submit Your Editable


  • This topic is locked This topic is locked
415 replies to this topic

#1 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 13 February 2004 - 01:33 PM

Greets.

A lot has happened since we first started this topic. :) New versions of GM have appeared with better functions (and 3D) and our community has finally learned that nothing is "impossible" when it comes to GM. :blink:

I shall be periodically updating links in this post for DLLs and EDITABLE examples for physics related "innovations". :(

If you have made (or know of) any unique GM physics related example/dll, and would like to share them with the GM community please PM me.
________________________________________
Links of interest:

CoderChris's SUPERB GM Physics DLL + Examples
http://forums.gamema...howtopic=141853

Atrius's Examples:
http://www.kousougam...k/?act=download

Steffen Itterheim's GM + ODE DLL:
http://ode.org/
http://gamegestalt.c...o...7&Itemid=40

Macarrum's Tokamak 3D Physics Engine:
http://www.tokamakphysics.com/
http://forums.gamema...howtopic=117085

RTsa's Demo Game (using GM_ODE dll): Ragdoll Matrix: Reloaded
http://www.freewebs.com/rtsa/
http://forums.gamema...howtopic=115976

Bathy's Verlet Physics Engine based upon EricDB's scripts
http://forums.gamema...howtopic=142476

Edited by xot, 13 April 2008 - 06:33 AM.
** Old Experts Topic **

  • 0

#2 Guest_M2k3_*

Guest_M2k3_*
  • Guests

Posted 13 February 2004 - 05:30 PM

No, even with a DLL it is impossible to make ragdoll effects with GM.

#3 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 13 February 2004 - 06:04 PM

Yeah it is. you would just need a wicked (wicked wicked wicked wicked) Equastion, and for each limb (arms legs head feet etc) have them seperate and rotate them 360 degrees (well, 36 diffrent sprites).
  • 0

#4 (-[TJ]-)

(-[TJ]-)

    2D Artist

  • New Member
  • 61 posts

Posted 13 February 2004 - 06:41 PM

True ragdoll physics aren't possible but that doesn't stop you using natural-looking ragdoll STYLE animations (like I did in my game INVADED).
  • 0

#5 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 14 February 2004 - 10:37 AM

Hmm... I don't know about it being impossible.

Already I can see that the next version of GM deals better with contact/collisions with points/lines/etc. All that would be needed could be some IK calculations, and some nice collision code.

IK in bodyparts could be a nice -stitched- system of bodyparts (like in Poser) which looks something like:

hand-(joint)-forearm-(joint)-elbow-(joint)-biceps-(joint)-shoulder-(joint)-chest-(joint)-etc etc.

A lot of work perhaps - but regardless of Direct3D or not - the above method WILL probably be needed in one form or another to emulate realistic IK physics as a starting point. ie someone's gotta take the first step!

3D directions have already been simulated via perspective x,y,z scaling. I know it would be better in true 3D, but hey - I feel this is a doable idea.

Any takers? :angry:
  • 0

#6 deadimp

deadimp

    GMC Member

  • Validating
  • 64 posts

Posted 15 February 2004 - 12:29 AM

Well, you could use polygons that rotate on an axis, which is a joint. That joint's direction would be dependent on the joint' direction before it.
Ex: hand=hand_dir+elbow+shoulder+chest;

#7 videogamerx2

videogamerx2

    GMC Member

  • New Member
  • 31 posts

Posted 15 February 2004 - 03:05 AM

GM is capable of calculating most of the mathmatics equally to most comercial languages, so I don't see any reason for it to not work. Though it could be unbearably slow.
  • 0

#8 random

random

    completely random

  • New Member
  • 798 posts

Posted 15 February 2004 - 03:12 AM

True ragdoll physics aren't possible but that doesn't stop you using natural-looking ragdoll STYLE animations (like I did in my game INVADED).

Yes, animations can work well in some cases.

And it probably is possible, the question is whether it would run fast enough to make it any worth.
  • 0
My avatar still changes every time you refresh.

Barrage , a "curtain fire" shoot em up.

http://www.randomdragoon.com

#9 Lyndon

Lyndon

    GMC Member

  • New Member
  • 78 posts

Posted 15 February 2004 - 03:46 AM

Ever play Lemmings 2? That had Ragdoll physics, it was also 2d. Sure it was not a pure form of ragdoll physics but it did the trick and looked funny as hell. Download it here http://www.qytis.com/lemmings2.zip and see what i mean, it will make you laugh.


---Guess this was something to with the moderation queue on this forum... Richard ^_^

I know that is already been written, but for some reason i couldnt reply to it, so here is my reply to it here. 2d games can have ragdoll effects sorta. In Lemmings 2, they have a sorta ragdoll effect, its very vyer funny check out at http://www.qytis.com/lemmings2.zip so Its possible just wont be as cool as 3d games. Just envolves sprites and some collision points.


Edited by Richard, 16 February 2004 - 02:08 PM.

  • 0

#10 bearSoft

bearSoft

    GMC Member

  • New Member
  • 1002 posts

Posted 16 February 2004 - 12:27 PM

Ragdoll physics is advanced even for the best engines today
the math behind it is descibed in this paper from io-interactive
ragdoll in hitman
I do not believe it could be even faked with gm
  • 0

#11 Mastiff Odit

Mastiff Odit

    Geek of the week

  • New Member
  • 17 posts

Posted 17 February 2004 - 12:16 AM

The reason the Physics are so hard is because you have to emulate Enersha and Mass.(I hope I spelled that right)

You have to emulate the amount of Mass a character would have and then you would have to emulate the strength of the material that the doll is made of and how much Enersha (mometum) that each part of the doll has and in what direction at what speed.


Basicly you need a "true" Physics emulator in order to do it.
And that's REALLY hard to make and it would not be at all posible in GM because of how slow GML is, and the speed of our computers.


So, yes it is posible, but no, your not really going to do it with GM.
You could fake it but then it wouldn't look exactly right.
  • 0

#12 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 17 February 2004 - 11:25 AM

Nice link BearSoft. :D

Aww.. come on guys. It's very easy to say it cannot be done. But has anyone really sat back and thought about it for a minute?

Here's what I think is possible as a very crude start:

We have 2 rope examples in the GM community. One is the Grappling hook. And another is the pacman-monster swinging from platforms like the "Bionic Commando" game.

Thus, the rope physics has already been done for varying elasticity and speed, based upon distance from sourcepoint.

How about using this 'rope' as the 'joint' described above? Naturally, when a collision occurs on one of the objects, it will move as collisions do, but the 'rope' will hold it in place thus limiting its motion, and so - hopefully - you'll see a ragdoll motion. :)

Not 100%, but its a start! :)

Now realistic physics does require things like density/directional acceleration/velocity/etc. They are simply variables on a nifty (or wicked as defined above) algorithm. :)

We already have gravity, speed, and a rope. The differring density between many bodyparts could be achieved via friction + directional gravity formula. Give heavier objects a higher downwards gravity, and tweak possibly more(?) friction (so they dont go flying about when hit?).

Hmm... come one people! We can do this. :) Let's skip 3D directions for now, and concentrate on just a 2D illusion - like a side scroller platform game (remember Flashback!??)

Can anyone make this joint 'rope' system come to life. I'm mathmatically challenged - else I'd do it myself.

Edited by SSNautilus, 17 February 2004 - 06:25 PM.

  • 0

#13 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 17 February 2004 - 06:37 PM

I told this theory to some one in Q&A.. I didn't test it though backthen.

But now I decided to try...

I made this little hanging rope example in about 15 minutes.. try it out.. it's rather fancy.. viestituote.tripod.com/gm/ragdoll_rope.gmd or http://kotisivu.mtv3...agdoll_rope.gmd

I just played around with it and fixed there and there... it came up like this... I have never read any tutorial...

EDIT: Added another, better link.

Edited by viestituote, 18 February 2004 - 06:33 PM.

  • 0

#14 L33TNerd

L33TNerd

    King of Geeks

  • Banned Users
  • 114 posts

Posted 17 February 2004 - 07:39 PM

the link came up as that comp language for me

Edited by L33TNerd, 17 February 2004 - 10:02 PM.


#15 Guest_Hesla3_*

Guest_Hesla3_*
  • Guests

Posted 17 February 2004 - 09:08 PM

do you mean like... umm... yeah, i have a link where there are 2 games made by "taat", its like a human that gets damage from: falling from stairs, hit by truck... and here the "doll" is very realistik...

if ragdoll is this then it is possible....

www.taat.fi

hesla

#16 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 18 February 2004 - 12:39 AM

Yes Hesla3, thats ragdoll effects. But could you make it with GM?

viestituote, your example is very nice. :lol: I have tweaked it a bit - but it doesn't seem to work correctly - as we need some sort of 'rigidity' between the ropes - or limitation of motion - else it becomes a snake-like motion (which you can see in my version of your example):

http://www.angeltown...sc/examples.htm

Both examples are included in the Ragdoll.zip file.

I have added various bodyparts made with Poser. I hope that helps. :D
  • 0

#17 King Stephan

King Stephan

    www.gameboxsoftware.com

  • New Member
  • 734 posts

Posted 18 February 2004 - 06:09 AM

Here's a pretty neat demo with incredible physics: go to http://www.miniclip.com/ and find the game "Trial Bike Pro."
  • 0

#18 1800askgeek

1800askgeek

    GMC Member

  • New Member
  • 350 posts

Posted 18 February 2004 - 07:43 AM

Maybe this'll sound silly, but... what on earth is a "ragdoll effect"??? :huh:
  • 0

#19 bearSoft

bearSoft

    GMC Member

  • New Member
  • 1002 posts

Posted 18 February 2004 - 12:36 PM

>>viestituote the link opens the file as a html file
'save target as' alse refere to the html tag (anchor)
can u fix that?

>>nautilus. That is interesting thoughts -the thing we need to remember is that only sprite based graphics is reasonably fast on gm
if the graphics is drawn as pixels or solid figures gm gets sloggy and the fluidity is gone

the problem could very well be that it 'works' but it is useless in gamedesign due to the fps drop, (just like my old colorize.gmd btw.)

therefore succes should be jugded on whether fps can be kept unchanged high. If not the project is pure experimental and with no real 'value' in gamedesign
(amusing as it may be :)

>>hesla, the 'taat' project would be interesting to see -can u upload?
  • 0

#20 gringo

gringo

    GMC Member

  • New Member
  • 49 posts

Posted 18 February 2004 - 01:56 PM

You could fake some form of ragdoll effect for the 2d world, which woul work well in a platformer.

example

you have a torso sprite, two upper arm sprites, two lower arm sprites, ect ect.

you will need some gravity and a var assined to each limb for force and direction. So it the force from the legs as a whole is > gravity and the direction is oppersit to the gravity the object (legs) are supporting the rest of the body up right.

if the torso has a large exerting pushing it in a direction the legs force can drop and the body will fall down and in the direction of the gravity.

Im sure I could come up with an example, though if I do the sprites will be poor(black rectangles).

Gringo
  • 0

#21 Hitman

Hitman

    Shadowfied

  • New Member
  • 92 posts
  • Version:Unknown

Posted 19 February 2004 - 05:25 PM

Ok. first i propose a scientific outlook based on reason with this problem.

in other words, lets first ask (state) the problem.

-we need a realistic movement that creates an illusion of force against an object with (reliatively) some mass and densisty that it actually dosen't have.


then we need to hypothosize (brain storm) an outcome and try to visualize a ragdoll effect in real life (easily done with k-nex dudes :unsure: )

-in the world of 'the real' velocity plays a key role on inertia and rotation. IE. if a person is hit in the chest with a 50 pound wieght flying at a velocity of 30kph (excluding pain and body damage) his body will do the following. first the torso will arc away from the projectile, wthe arms will bed at the elbows and move up towards the chest(already 7 joints have been mentioned. elbows {2} shoulder{2}
torso {3})  . then the current position of the legs will manuvere in the same way of the arms but towards the the direction of the projectiles pervious velocity. that is the legs will ben at the knees {2}. then the head will arc towards the chest {1}. after that its time for momentium to kick in along with rotation and inertia. the entire body will rotate away from the projectile (clockwise if coming from the left and vise versa) with equal velocity but descreasing momentum, after that inertia will spread the limbs apart (like gravity versus friction does to sky divers) and out wards.


thus will be the outcome of a projectile hiting a human chest at 30kph . now that the 'rag doll' effect has been explained we just need to hypothosize a solution to the problem. how would we do it?

-joints are the main issue, thankfully if one is to think, three-dimensional engines are not needed for this. imaging an arm cut off at the elbow and the shoulder.
if this limb is rotated  (shoulder in the center) a radius is created (the length of the arm) . therefor two joints are seen, the elbow at

dx = x + (radius * cos(image_single*30 * 3.14 / 180));
dy = y - (radius * sin(image_single*30 * 3.14 / 180));
instance_create(dx,dy,elbowjoint)

and the shoulder at 0 (bounding x sign in sprite editor menu)

thats pretty baisic limb function (radius = the length of the are from shoulder to elbow)

the lower arm can be placed at the elbow joint (in step event jump to elbowjoint.x,.y)


so there ya have it, the same function can be done for the rest of the joints.
all that we need now is to figure out how to make thus function work for MULTIPLE objects. and of course the code that states the ragdoll effect for each limb as stated above.


we can do this if we work as a team :angry:

  • 0

#22 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 19 February 2004 - 06:03 PM

>>viestituote the link opens the file as a html file
'save target as' alse refere to the html tag (anchor)
can u fix that?

I added the other link.. it should work correctly.

>>SSNautilus
um... you could try to move the origin of the sprites to get the limps actually seperate from the torso... It's not very realistic but it looks somewhat like it.

We can problaly never (never say never) achieve "real" ragdoll physics with GM, but we could use something like this, just a bit modified...

The next thing we could try to add is, like SSN problaly tried to say, is to get the previous part of the rope also affect to the motion.

Currently it just keeps to part in the range of 100 from the next part of the rope, I originally had some sort of code in it that would do this, but the effect wasn't very good... I'll try again today...

What I can now think of, is something like gringo said, to have a direction and force variables. In each step, the gravity is added to the force, to direction 270. Then we calculate how much we must add force from adjected parts... hmmm... We need the same algoryth as the motion_add(dir,spd)...
Anyone got it?
  • 0

#23 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 22 February 2004 - 06:16 PM

:rolleyes: Jay! I've made an example! This time it's very life-like rubber-rope with a giant iron ball at the end! You can swing it! whoa!

Anyhow... I made my engine again completely, it's not optimized nor commented but at least it proves that natural-looking IK joints are possible with GM... I used about 10 lines of code in the step event... so it's not very heavy either...

This example doesn't include collision, that's my next project... You may play with it... Maybe you can get the idea of the engine.

Download here http://kotisivu.mtv3...gdoll_rope2.gmd

So, now it's proven that some kind of fake ragdoll physics are possible with GM. I'll still have to improve it, though...
  • 0

#24 King Stephan

King Stephan

    www.gameboxsoftware.com

  • New Member
  • 734 posts

Posted 22 February 2004 - 09:55 PM

That's funny, I made practically the same thing only mine's a bit smoother.
http://www.geocities...yer/ragdoll.zip
  • 0

#25 torrobinson

torrobinson

    GMC Member

  • New Member
  • 13 posts

Posted 23 February 2004 - 02:07 AM

Theres nothing in the zipped file ^_^ :rolleyes: :lol:
  • 0

#26 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 23 February 2004 - 04:49 AM

Dude, stephen, the link works n all, but its like 0kb big...
  • 0

#27 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 23 February 2004 - 08:32 AM

Whoa it is the same! The code princible is just the same! Only difference is that in my example there's more parts to the rope and the attributes are a bit different (gravity, stffines, lenght, friction etc.)...
  • 0

#28 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 23 February 2004 - 04:09 PM

Hmm... I can't figure this out... How can you make 2 objects bounce off each other realisticly depending on objects' mass, elastisicy, speed, direction and maybe rotation.

Anyone got any example of this? I think you could find some papers about this from Google, but as my school is finnish, I can't really understand sience-english so easily (if someone finds something, post the link, I'll use dictionary) as you might.
  • 0

#29 Zero_Point

Zero_Point

    GMC Member

  • New Member
  • 34 posts

Posted 24 February 2004 - 04:38 PM

Hmm... It'll probably require a special script with various algorithms to process how the certain variables play a part. For example, it you entered 10 as a variable for speed and 15 as a variable for mass, and then entered 4 as a variable for elasticity, you can set various motion actions to move the objects based on what the scripts' alogorithms produce.
  • 0

#30 Lyndon

Lyndon

    GMC Member

  • New Member
  • 78 posts

Posted 24 February 2004 - 08:07 PM

Maybe this will help you guys

http://www.dynamicdr...ndex13/band.htm
http://www.dynamicdr...13/trailer2.htm

Indeed
  • 0

#31 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 25 February 2004 - 06:30 PM

Maybe this will help you guys

http://www.dynamicdr...ndex13/band.htm
http://www.dynamicdr...13/trailer2.htm

Indeed

:huh: actually, my example is based on the second one. I saw it on some page by accident, and then converted into GML....

But unfortunately these don't include collisiond between two objects... I made some experiements based on Boomed32's car physics example. It used the built-in bounce and reduced the speed based on the direction change.. This didn't work out very realisticly...
  • 0

#32 King Stephan

King Stephan

    www.gameboxsoftware.com

  • New Member
  • 734 posts

Posted 27 February 2004 - 02:56 AM

I made mine myself. I simply loaded a bunch of coordinates into an array, and made them move toward the next with some inertia, draw the lines between them, and a small ball on the end. For some reasoin people can't download mine (right click> save target as ^_^ ).
  • 0

#33 sxclimax

sxclimax

    GMC Member

  • New Member
  • 17 posts

Posted 27 February 2004 - 04:55 AM

It does provide collisions. Move your cursor to the side of the screen. It collides with the wall of the browser window.
  • 0

#34 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 28 February 2004 - 03:39 AM

I've fixed the sprites - so they now better align than before. I have also used a jump_to action to make the sprites allign with each other, and a collision event so they all collide with walls.

Its not much, but a basic man_object. And needs some work. I have rotated all sprites (counter-clockwise x 16 frames) except HEAD and CHEST, as they were making the file beyond my servers uploadable limit of 900KB. :o You press space to change directions - but do see the default collisions first.

http://www.angeltown...sc/ragdoll4.zip

I've noticed one thing about all the 'rope' examples, is that none of them take into account the fact that when things move on joints, they always rotate.

Now, doing 2D ragdoll effects may not require full fledge physics, but maybe a neat algorithm to actually PIVOT several objects - depending upon the 'impact' and direction of the neighbouring objects.

For example.

Logically speaking, if an object gets shot in the torso, the torso/abdomen will most likely be 'pushed' furthest back, and the limbs would follow.

If an object gets shot in the head, the head goes furthest, the the body follows, and limbs probably go in any direction.

Essentially, what would be needed is that a variable check that is constantly exchanged between all connected body part (or global.vars) to check for the following:

(a) Impacted object.
(B) Impacted objects collision direction.
© Impacted objects pivoting angle.
(d) Connecting objects/limbs corresponding pivots, and 'deduced' direction.
(e) Assigning logical weights_vars to objects, and amounts for frictions/grav
(f) Calculating how much 'energy' is actually 'absorbed' to 'push' the impacted object - then dividing the remaining 'energy' of impact within the rest of the body.

However, this all may sound a bit complex, and cumbersome, so lets step-back and start at the PIVOT basics first:

http://www.angeltown...bat_physics.zip

Here's a starter. Press space and a bat_object is created. They all fall down, and hit the pins on the way down. Can anyone figure out a way to make the bat_object pivot in the CORRECT direction when it hits the pins? Something like the balance scales. They should also respond correctly when they collide with each other.

Happy pivoting! :P
  • 0

#35 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 28 February 2004 - 11:12 AM

>>sxclimax
Yeah, but all it does is to reverse the hspeed and multiple it by 0.75, we are talking about a bit more complicated physics :medieval:

>>SSnautilus
Those links don't work, gives me an error.

But, as I can see from your post, we are getting close to the solution, I think I'll try to add variables heading_direction and rotational_force.
Then, every joint of a object has it's direction. So, when an object which is connected to this object's joint1, which's direction 90, the rotational_force is changed to move thowards it... Or something... whoa
  • 0

#36 ikbendirk

ikbendirk

    GMC Member

  • New Member
  • 30 posts

Posted 28 February 2004 - 12:06 PM

currently i'm making a armature demo... it hasn't much to do with ragdoll effects yet, but its a start...

it isnt working very good yet, but at least you can have a look at the code..
SSNautilus said i should give some ideas about the ragdoll, so, here they are! :) well after we have completed a fully working (and skinned ;) ) armature, we can go and think about forces...

about the armature, actually it is very simple: there are n bones, and bone n-1 is the parent from bone n... some rotation calculations ofcourse... and thus there are two x's and y's for every bone: the top and the bottom. the top is always connected to the bottom of its parent (except for the first one) and the bottom is calculated with (co)sinus, radius and top-x,y.

after we've created an armature we must skin it: i have not much experience bet lets have our thoughts about this one; the image rotates in the centre, so we must skin it at the centre of the bone.. so:
x=(x1+x2)/2, y=(y1+y2)/2

well ofcourse the image is now still shifted, so the image-width,height should still be substracted which gives us:


x=(x1+x2-image_width)/2, y=(y1+y2-image_height)/2
i hope someone can find some use with this knowledge :medieval:

oh i almost forgot!
my armature demo click here

[EDIT, 1 March] [Broken links corrected at 2 March]
as posting takes too much time for me, i'll keep editing until i at least get some replies :D i fully completed the demo for now.. there is only one problem with rotating the bones; at first i dont know what's the easiest: to refer to relative rotation or not.. well as for the error, it occurs while more bones are childeren from only one parent... can't figure what the problem is yet :) but i guess it can already be used for some ragdoll tests.... any volunteirs :D?
Newest update

Edited by ikbendirk, 02 March 2004 - 02:56 PM.

  • 0

#37 Yani

Yani

    GMC Member

  • New Member
  • 48 posts

Posted 02 March 2004 - 12:48 AM

Viestituote, your example is a good start, but I would've tweaked it a bit more before releasing it. I have made a similiar example. It has a real-looking rope, you only need to specify the length of it. It even collides to different shapes almost correctly. The only thing I was too lazy to make was the inertia/momentum thingy.
Well.. actually it had my own quick version of it^^ the rope parts at the bottom were heavier than the parts at the top. It even was believable at times, but all it could do was when I let the rope loose, the part with nothing below it fell down and dragged the end of the rope on surfaces if there was enough loose rope.

Oh, and ragdolls are quite possible. The physics' realisticness isn't that important on below 64x64 character. Ever played soldats? It has a ragdoll system although it isn't that precise, it looks cool. I think I'll try to make an example of it sometime.
My RPGM-project is taking all my GM-time. Someone else might make it before me but who cares! :D

Peace out

P.S. Näkeepä täällä näköjään suomalaisiakin... hyvä juttu :)
  • 0

#38 Yani

Yani

    GMC Member

  • New Member
  • 48 posts

Posted 02 March 2004 - 12:50 AM

eeh... hehe... didn't notice page 2 :)
well.. think of the previous post as an extension to page 1 :D
  • 0

#39 viestituote

viestituote

    The Moinen

  • New Member
  • 84 posts

Posted 02 March 2004 - 05:07 PM

>>>Yani
Yeah, it should be trimmed a bit... When I made it, my old-slow computer was running Opera, Messenger, ICQ, mIRC and some other "heavy" programs, not to mention the internet connection, so it didn't run at very high speed and as so the program didn't record my mouse movements as fast as it should've.
I noted it later, though...

Ah, I admit! I was too hasty with it! :) ... anyway... it works kinda OK if you don't make any fast moves. haha.
  • 0

#40 Pogo708

Pogo708

    GMC Member

  • New Member
  • 107 posts

Posted 04 March 2004 - 08:04 PM

Hmm... Well, it's not perfect, but it's a start.........

Stick Physics

Click to set a stick. Sometimes it gets stuck, but does anyone want to modify it?
cb_x and cb_y are for the center of balence.
  • 0

#41 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 04 March 2004 - 10:31 PM

Please RIGHT-CLICK and SAVE-TARGET-AS for both examples.

A complete body is provided for personal use and pleasure!! ::lmao::

EDIT:

I'm referring to the links I posted in the previous post, regarding the PIVOT experiment, and the new RAGDOLL sprites/collisions.

Here are the links again:

RAGDOLL:
http://www.angeltown...sc/ragdoll4.zip

PIVOT:
http://www.angeltown...bat_physics.zip

Please see my previous post (above) for detailed info.

Edited by SSNautilus, 07 March 2004 - 03:04 PM.

  • 0

#42 bwzguy

bwzguy

    GMC Member

  • New Member
  • 66 posts

Posted 05 March 2004 - 02:16 AM

... What are you talking about SSN?
  • 0

#43 Schalken

Schalken

    From Hyperspace

  • New Member
  • 109 posts

Posted 05 March 2004 - 11:00 AM

well... here i have yet another good start/example. its in registered 5.2 .gmd format (zipped). if you can figure out how to stop the sticks from stretching please tell me. :rambo
  • 0

#44 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9425 posts
  • Version:Unknown

Posted 19 March 2004 - 08:29 AM

i was wondering how i could hav like 2 origins, cause ive got a good, workin example of a ragdoll thing with a body and arm, but i need to know where to add the leg to the rotational sprite. the only way i can think of is to hav

if (image_single = 0)
{
origin2_x=sumfing
origin2_y=sumfing
}

u would hav 2 find out the correct position 36 times and do that code 36 times, 1 for each subimage
but its possible
  • 0

#45 Scuba

Scuba

    Mr. Lazy

  • New Member
  • 18 posts

Posted 22 March 2004 - 10:44 PM

It would be alot simpler if each limb were a different object.
(i.e. Jet's pedestrians, Rayman)
  • 0

#46 xenu

xenu

    Helpdesk

  • New Member
  • 113 posts

Posted 23 March 2004 - 01:41 PM

It would be alot simpler if each limb were a different object.
(i.e. Jet's pedestrians, Rayman)

In fact, it would be mad mans work not to use different objects.
  • 0

#47 deadimp

deadimp

    GMC Member

  • Validating
  • 64 posts

Posted 24 March 2004 - 01:40 AM

Actual, you can make basic ragdoll stick figures just in the draw event, without stretching etc. You can do it all with the polygon functions and a circle position script. Each body part would be a different polygon, ex. Torso<>Calve<>Leg-Foot; Chest<>UpperArm<>LowerArm<>Hand<>Fingers. I've said this before, but not in true detail. Now, each body part has to pivot or rotate on a defined point with a certain angle. Ex:

UPPER LEG:
|    |
|    |
|    |
|    |
| x | - Knee (point)

Also, to define the angle of a body part, you'll have to go 'up'.
Ex: The angle for the upper arm: UARM_fin=(BODY_ang+UARM_ang). Lower Arm: LARM_fin=(UARM_fin+LARM_ang). Hand: HAND_fin=(LARM_fin+HAND_ang). And so on...
Also, you'll have to rotate each joint similar to what you did above, except with a circle script, like <circle_pos> which I use, which the syntax is: circle_pos('x/y',Center X/Y,Angle,Radius,?)
Ex: The position for the elbow: ELBOW_x/y=circle_pos('x/y',BODY_x/y,UARM_fin,RADIUS); Position for the wrist: WRISt_x/y=circle_pos('x/y',ELBOW_x/y,LARM_fin,RADIUS); And so on.

Of course, I will add an advertisement for my current WIP, Polygon Maker. Just download it and see what it's like.

#48 ---7 Winged Messenger---

---7 Winged Messenger---

    GMC Member

  • New Member
  • 1 posts

Posted 30 March 2004 - 08:17 AM

i've been trying to create ragdoll physics for a while, but it's not really working out.
After some internet scouring, I found this article which may help, it was written by some guy who made the ragdoll physics for hitman, but most of the ideas he describes are perfectly suited to 2d

the address is http://www.ioi.dk/Ho...ons/gdc2001.htm
  • 0

#49 Supernickydeluxe2

Supernickydeluxe2

    GMC Member

  • New Member
  • 27 posts

Posted 01 April 2004 - 04:22 PM

the origin2 thing is very simple......

you just set this:

origin2_x=origin_x+2
  • 0

#50 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9425 posts
  • Version:Unknown

Posted 04 April 2004 - 09:27 AM

but the sprite rotates so that wont work
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users