Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Ragdoll Physics in DB?

Author
Message
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 1st Jul 2008 18:38
Hey.
I was wondering if they had a 3d rag doll physics engine or dll or whatever for DB? it would really help a lot with my game "Fireman- the Stickman avenger".

Thanks in advance,

DD

AM I UGLY OR WHAT??!!
What? It's My Sig!!...
fnybny
17
Years of Service
User Offline
Joined: 15th Jun 2007
Location: calgary
Posted: 2nd Jul 2008 03:32
that is very interresting. i could use that in my game.
i'm sorry that i don't know the answer though

hi
Daniel TGC
Retired Moderator
18
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 2nd Jul 2008 22:29
It's not likely, DarkBASIC Classic really isn't developed anymore. For physics and ragdoll effects you really need to migrate over to DarkBASIC Professional and the DarkPHYSICS plugin, or get DarkGDK for free, and purchase the DarkPHYSICS plugin for that. The alternative is that you code it all yourself in DarkBASIC Classic, but that my be slow.

Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 3rd Jul 2008 01:45
Quote: "The alternative is that you code it all yourself in DarkBASIC Classic, but that my be slow."

i've already done this, and you are right - it IS slow.but thanks. i'll give DArK PHYSICS a try....

AM I UGLY OR WHAT??!!
What? It's My Sig!!...
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Jul 2008 07:44
@DD
Quote: "i've already done this"

Really? You coded it in DBC? Does it work? Is it laid out as a series of functions? If so, we can make a DLL out of it... should boost speed big time!

Enjoy your day.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 3rd Jul 2008 21:00 Edited at: 3rd Jul 2008 23:12
Quote: "Really? You coded it in DBC? Does it work? Is it laid out as a series of functions? If so, we can make a DLL out of it... should boost speed big time!"


yes. it's EXTREMLY SLOW... and it does not work too well.... and only works on the limb being hit... but give me a while to clean p my code and i'll post it....

Quote: "Does it work? Is it laid out as a series of functions?"


well....no and no. but, if you are willing to help, i can turn it into a cuple of functions. all i need is time.

AM I UGLY OR WHAT??!!
What? It's My Sig!!...
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Jul 2008 03:50 Edited at: 4th Jul 2008 03:51
The code for physics:


And A demo...

AM I UGLY OR WHAT??!!
What? It's My Sig!!...

Attachments

Login to view attachments
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Jul 2008 03:53
aND A Scrennie to boot.

AM I UGLY OR WHAT??!!
What? It's My Sig!!...

Attachments

Login to view attachments
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Jul 2008 04:21
hmmmm... It's a little different than what I was expecting. But interesting, none the less. Part of what can make this type of effect work is placing limits on how far a limb can be rotated and in what directions. I like your more generic approach.

It gives me an idea for a tumble - not necessarily flailing limbs - though that could be added. I'll post the idea when after I got it working a bit.

Enjoy your day.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Jul 2008 05:49
okay!
i was hoping someone could see what i was going for
I hope that i cleaned the code up enough...

AM I UGLY OR WHAT??!!
What? It's My Sig!!...
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 8th Jul 2008 17:56 Edited at: 8th Jul 2008 17:57
You could try newton game dynamics it's free but I don't know if it works in dbc

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Jul 2008 10:48
I completely forgot about this. I had run a couple of tests and found out a couple of things. If the object's limbs aren't set up in a good heirarchy , by that I mean if the parent child relationships aren't set up well or set up at all, rotating a limb can make it disjoint completely. So the first step is having a quality model that is set up right with good limb relationships. I found out the goblin model's feet are the main limb link for the legs instead of the hips being the main link. That means the legs rotate around the feet.

The next step is having a method of imposing limits on the rotation of a limb. That means knowing which limb number in DBC belongs to which actual limb. Again, if the model is well made, the limbs may be named in ways that indicate which ones they are.

Another limiter that can be added is an exclusion of which limbs can be subject to the tumble at all. For example, maybe there is a face limb on a head limb. There's no point in applying rotations to the face limb so exclude that. Maybe it's not important for the hands or feet to rotate but it's enough for the arm to do so - exclude hands and feet, etc.

I created a short tumble routine that uses exclusion of limbs (that's how I found out the feet of the goblin were the parents of the legs). It wasn't physic based, just took a force on x y and z and turned that into a full body rotation of the object based on the percentages of x y nd z forces. If there was more force on a particular axis, then the body would rotate more in that direction. I let the limbs freely rotate at 90 degrees to each of the angles of the body at any given time. It worked pretty well, though I should have included a rotation limiter. I'm not entirely pleased with it...

Enjoy your day.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 19th Jul 2008 20:58 Edited at: 19th Jul 2008 20:59
Quote: "That means the legs rotate around the feet."


oh.
i thought it was all based around the goblins chest.

i'll find a correct model to test it with....

i've been working on this too ,even if i havent gotten very far....

AM I UGLY OR WHAT??!!
What? It's My Sig!!...
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Jul 2008 22:38
Quote: "i thought it was all based around the goblins chest"

I think everything is together as a whole unit but, the parents of the legs seem to be the feet instead of the hips. The feet stay planted and the legs disconnect from the hips and spin around! So the tumble looks funny!

The cyborg model works pretty well.

Also, I was kinda hoping you had the physics ready to go in DBC and I was going to try and put them into a DLL for speeds sake. I don't really want to commit to working out the physics. Sorry.

If I have the inclination I might work on my tumble routine, but I don't really need it right now so it doesn't have my attention.

Enjoy your day.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 27th Jul 2008 02:36
Quote: "Also, I was kinda hoping you had the physics ready to go in DBC "


I'm still working on it,so when i have it done, i'll post it...


JOIN THE WAVE. THE PIVO WAVE. http://pivo.proboards104.com

Login to post a reply

Server time is: 2025-06-07 07:01:05
Your offset time is: 2025-06-07 07:01:05