FTE ragdoll system

Discuss CSQC related programming.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: FTE ragdoll system

Post by Spike »

its not all by myself though.
often, indirect contributions can be much more valuable than direct ones. the simple reason being that it forces you to actually understand the whole instead of just the interfaces.
and I do get quite a few indirect contributions still, even if its someone reporting a bug (onemanclan has reported a few), or an admin saving giving me a copy of a saved game when some bug struck (bigfoot), or just trying out the weird and whacky features just to see if they actually have a chance of being more than just a gimmick (gb often does this, finding fun and whacky bugs along the way), or just existing APIs in other engines/mods that give me a testcase(xonotic is one demanding test case...).
And yes, I do sometimes rip code directly from other engines where I think it'll save me time... though I do at least try to understand enough of it before doing so.
the ragdoll code, for instance, depends upon the third party ode library. it uses code based on DP's MOVETYPE_PHYSICS stuff (and thus should interact properly with such entities, including solid stuff like the world). The fact that I wrote a little code around it to parse a .doll file, generate physics bodies+joints and animate the mesh by tracking the physics bodies is somewhat insignificant in comparison to the length of time that it must have taken to write ODE in the first place. Incidentily, I hate matrix maths.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: FTE ragdoll system

Post by toneddu2000 »

Spike wrote:often, indirect contributions can be much more valuable than direct ones. the simple reason being that it forces you to actually understand the whole instead of just the interfaces.
and I do get quite a few indirect contributions still, even if its someone reporting a bug (onemanclan has reported a few), or an admin saving giving me a copy of a saved game when some bug struck (bigfoot), or just trying out the weird and whacky features just to see if they actually have a chance of being more than just a gimmick (gb often does this, finding fun and whacky bugs along the way), or just existing APIs in other engines/mods that give me a testcase(xonotic is one demanding test case...).
Yeah, sure, people helping find bugs is a blessing, but ...
Spike wrote:The fact that I wrote a little code around it to parse a .doll file, generate physics bodies+joints and animate the mesh by tracking the physics bodies is somewhat insignificant in comparison to the length of time that it must have taken to write ODE in the first place. Incidentily, I hate matrix maths.
yeah, that's so "insignificant" that we had to wait 2014 to see ragdolls on quake engine! :D
C'mon, you're good in programming, you're really good! :)

I just hope that DP and FTE in the next years will share the same functions with CSQC. I'd like to see no more fteextensions and dpextensions but engineextensions.qc with same functions names and same constants.
It would be great to delete all the Quake related like STAT_NAILS and so on (but this is something I can do on my own without bothering programmers!)
I also noticed that ODE physics is activated in a different way from FTE to DP.
In DP you have to write:

Code: Select all

self.movetype = MOVETYPE_PHYSICS;
self.geomtype = GEOMTYPE_SPHERE;
instead, inf FTE there's no GEOMTYPE, but you have to write:

Code: Select all

self.movetype = MOVETYPE_PHYSICS;
self.solid  = SOLID_PHYSICS_SPHERE; 
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: FTE ragdoll system

Post by Spike »

okay, we're getting a bit off topic now...
fteqcc got fixed to silently ignore duplicate definitions, so assuming neither engine is completely incompatible, it should be possible to include both/all sets of headers and get the union of their definitions.
I would recommend including fte's before dp's though. fte's contains extra optional arguments on various builtins, while dp's defines the builtin with either a trailing elipsis (...) or by an alternative name. using fte's extensions.qc first means that fteqcc can just pull out the first def without an issue (different optional arguments will otherwise not conflict/warn, so long as one is a superset of the other).
If you do get problems including both, report the issue to the engine that you consider in the wrong and I'm sure it'll get resolved at some point, even if just by renaming something.
as an example, note that vanilla defs.qc contains copypaste errors (eg: droptofloor), and thus conflicts with fteextensions.qc.

and back on topic...
.solid still works in DP, if you want to target both engines. I'll probably add geomtype at some point.
fte also doesn't support dp's physics_* builtins, except as a stub (as indicated by their non-appearance in fteextensions.qc). they're not particuarly useful to ragdolls, as they assume that entity=body. right now there's no alternative for ragdolls other than actually hitting them with another physics body.
Seven
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: FTE ragdoll system

Post by Seven »

Hello toneddu2000,

Very interesting things you are doing !
A Quake ragdoll system is what many people "dream" about.

It reminds me of the SVQC ragdoll systems
- MauveBib´s sagdoll: http://qexpo.tastyspleen.net/booth.php?id=38&page=357
- Urre´s TWIG: http://bfeared.com/library/quake/archive/quakedev/urre/

Did you play/tinker with those before ?

Great work toneddu2000 !
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: FTE ragdoll system

Post by toneddu2000 »

hi Seven! In these weeks I unfortunately had to shelve a bit FTE ragdoll's system to dedicate time to work. But I promise to post more videos in the next weeks. Yeah I've seen MauveBib's sagdoll but they didn't full convince me in the corpse limbs movements. I used Twig a lot, but just for boxes and barrels, never find a ragdoll example. My future intent is to write a full csqc enemy (working possibly!)code that extends ragdoll possibilities not just for ragdoll but also for damage impact.
Something like this would be great. Imagine a player shooting an enemy and so, normal animation execution is stopped during damage dealing code and activated "for a bit" ragdoll system. Enemy, which is running towards the player, would go back a little with the body part that was hit but his legs will keep running. But I think that, for accomplish this, it would need some sort of "bone filters" that apply ragdoll just to hit skeleton bones and I'm thinking is just not feasible right now.

The great work is by Spike, btw! :D
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Post Reply