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.

2D All the way! / 2d and ragdoll

Author
Message
WAKS
10
Years of Service
User Offline
Joined: 5th Oct 2013
Location: Oslo, Norway
Posted: 23rd Oct 2013 11:58
How could I make ragdoll physics in my 2D fighting game. Is it possible to add ragdoll physics in a 2D game? If it's possible could anyone give me a example code or other examples you know about. My idea is to create my fighting game so dynamisc as possible, and therefore I thought ragdoll physics was a nice idea

Thanks for answers
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 23rd Oct 2013 12:50
It depends on how you approach animation. I mean, you'd have to use a 2D skeleton animation system, like that SpriteX or whatever, and you'd have to support that in your game. I'd actually suggest making your own animation system.

Really, you need to move and rotate individual sprites for different body parts for animation, which in the long run is probably the best route for a 2D beat em up. Along with that, you could have each body part move according to it's last velocity - like running, then say the character dies, you would store the velocities of the sprites, add in gravity, and update it as a ragdoll instead of according to animation. Maintain the links between sprites, and you might get an effect that's good enough. Or you could make a Box2D ragdoll, link the sprites together, set their velocities, and let Box2D handle the results.

I am the one who knocks...
WAKS
10
Years of Service
User Offline
Joined: 5th Oct 2013
Location: Oslo, Norway
Posted: 23rd Oct 2013 21:15
Thanks for your answer Van B
I will check out your tips, I will also check out box2D more. I searched up box2D, and it sounds interresting

Thanks again

Login to post a reply

Server time is: 2024-03-28 16:30:14
Your offset time is: 2024-03-28 16:30:14