ragdoll upon death

For questions about using Classic.

Post » Mon Jan 24, 2011 11:08 pm

so ive been once again fiddling around with my platformer experiment, and decided to do a sort of primitive ragdoll system whenever my character dies. ive got the platformer character and the ragdoll model finished just about, but now i really dont have any idea on how to implement it and make it work.

i guess it should be something like:

event
-on player death
action
-->create ragdoll on player hotspot
--->destroy player

sounds simple and easy, but the problem is, my ragdoll model consists of several sprites,that are hinged together,and i really have no idea how to create them all at once and at their accurate positions.
i guess what im trying to say is:
is there a way to treat the ragdoll model as a single object that i can create when i want to?
would that be doable with families or? (i must admit i havent looked much into families yet)

any ideas and suggestions are appreciated

heres the .cap if anyones interested:

[url:30mvpqxg]http://dl.dropbox.com/u/11157144/ragdoll-test.cap[/url:30mvpqxg]
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Tue Jan 25, 2011 12:57 am

I would use an image point for each limb/section and spawn each piece upon death, creating the hinges at that point as well. You can have multiple image points, so just make one for each connection point.
B
13
S
6
G
6
Posts: 144
Reputation: 3,106

Post » Sun Feb 06, 2011 3:32 pm

just tried to do something along those lines. havent been on my computer lately,been too busy. but anyway, tried to do it with image points,but it gets really complicated trying to hold everything together. so far i havent succeeded in making something that works.then theres the fact that i would have to make those image points to all my animations(and frames),or am i wrong?

i wished there was a way to group objects together and make them a single object, but i guess im asking too much?

nevertheless, this is an intriguing challenge, at least for me.

but i appreciate the suggestion,gonna try and experiment it a little more.

anyone up for a challenge,feel free to contribute :)
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Tue Feb 08, 2011 5:14 am

Couldn't you put them all in one container? If this work, at spawining one limb, the rest of the body would spawn with it.

That's just a guess, but could be the first step.
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Tue Feb 08, 2011 1:56 pm

actually, was just thinking about container option. sadly, like many things in construct, i haven't looked into it much. but i think i'll start studying on how it works. off to check some tuts.
thanks for the suggestion!
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Tue Feb 08, 2011 3:02 pm

IMHO, I wouldn't go with spawning a set of objects.
Given the style of your current animations, you would be better off rigging a frameless animation similar to the bones behavior. With bones you could simply make a "death" animation, or use the custom movement behavior for all animations.
Might also check some of the posts about optimization.
40 megs for a stickman is really kind of scary.
[url:1cbxdn79]http://dl.dropbox.com/u/666516/ragdollish.cap[/url:1cbxdn79]
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Wed Feb 09, 2011 2:37 pm

well ive managed to almost get it working now. not flawlessly,but i made some simple tests and it seems like the best way to go so far,would be using image points and creating parts and hinges when needed.though it will be alot of work, since my game is gonna end up with alot of animations. container doesnt seem to work,because when i try to create all the contained objects,the hinges wont work. dunno why.

ah well,back to do some testing.

oh and nevermind that 40 megs,newt. this is just an experiment and my way of learning new stuff, wont be using that stickman for any actual game i make. :)
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Mon Feb 14, 2011 1:51 pm

Can you share the updated .cap? I could really use a ragdoll system in some games...

Thanks in advance,
velosotiago
B
4
S
1
G
2
Posts: 75
Reputation: 1,000

Post » Tue Feb 15, 2011 10:14 pm

sure here's the .cap for anyone interested:

[url:bxlytnhy]http://dl.dropbox.com/u/11157144/ragdolling.cap[/url:bxlytnhy]

also if any of you still have some suggestions or ideas for a cleaner,more efficient code or something,,im all ears :)
it isnt very polished and the physics still go crazy sometimes. dunno know if its me or the physics behavior.also, one problem i still have :
i dont know how to make the ragdoll face the same direction when the player dies.
but eh, i guess thats the best i can do for now.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests