Martial arts using physics + IK animations?

Stigmata

The Freeman
Joined
Jun 2, 2003
Messages
15,904
Reaction score
371
ATM I'm thinking of starting work on a 2nd mod, a martial-arts based mod. There would be multiple disciplines, and a multitude of moves per discipline. But in order for this to work, one thing would have to work in the engine: blocking.

The way I envision it, whilst in "defensive mode" your character is in a defensive stance. While in it, the character actively tries to block all incoming attacks using IK and FD animations, which means that the character would follow the movements and physically make contact with the incoming attacks instead of "faking" the blocks in the engine. Does anyone think this would be possible with Source, even when defending against more than one person?
 
OK, here's my opinion:

I think it is possible to do what you are suggesting, provided that you manage to come up with a very good system for handling attacks and a system to handle animation/IK when hitting something (so you do not punch through the enemy, but only do damage when you really hit him)

The thing with the defense WILL be hard, you'll have to calculate IK style the position of the arms accordingly to the attack that has to be blocked and perform a collision detection between block and attack, and perhaps do some physical calculations (arms that get kicked out of the way) as well... hmmm you gotta need a good coder with animating experience for that...
 
Thanks for the responses, but I don't think i was clear enough on how I think the attack/defense should be handled.

The reason I feel the need to use FD/IK animation is because this is a 3D fighter like OMF: Battlegrounds and not a much more simple 2D fighter like Super Smash Bros. Melee. Instead of having a preset block for each attack, you would have a keyframe/IK blend animation for each attack. This allows for the block to look like it would in real life, but also be able to shift its angle on the different axes to account for different attack directions. So the block would have no need fore the IK animation to it if the attack comes from the "normal" direction, but if the attack comes from a different angle the IK can move the block animation accordingly.

If you care, I've spent a good four or five hours working out a combat system on paper and in my head, with dodges, evades, blocks, counterattacks, throws, and disarms (for possible weapons), all of these moves performed with a total selection of about ten controls. It's about two pages long to describe everything, but if you want to see it I could type it out for you guys.
 
I spose we EXACLTY got what you wanted to do, and, if I may ask you a question, have you ever coded something by yourself?

This may sound a bit harsh, but I do not think you realise the problems you will be facing when implementing this into actual game code...
Its not about designing moves, its about timeing the interaction between two fighting players... And about adjusting complex animations at real time... About synchronizing movement on server and client (lag?)... about how you implement the control mechanism, and how you mix the mouse control into this... not to mention exception handling (what if you are attacked by two players? if you punch a wall? ...)

But if you manage all that and it looks good, I'm gonna license it at once...
 
How do you plan to control attacks/movement etc??
 
Konfuzzyus: I wasn't saying I would do this all by myself, it's just my idea of how a martial-arts mod would work.

Really, I think the combat has nothing to do with the engine itself requiring the attacks to be timed perfectly, but rather the two players trying to time their actions with the other players. If you attack before your enemy goes into defense, the blocking wouldn't happen soon enough to stop your attack.

Adjusting complex animations in real-time... The Strider already does this very smoothly. Didn't Gabe say that Source can support something like two ragdoll, one Inverse Dynamics, four or five IK and twelve keyframe animations per model? I can't remember fully, but I know it supports a bunch of different animations per model, which would suffice for a combat stance and four limbs.

Control mechanism I'll assume is how the player will control their actions. I said already that I've thought this out on paper. I know that I probably missed some possible controls that have to be put in, but I can assure you that every single movement would be available through using the total ten-twelve buttons.

The mouse controls where you're character is looking. I should probably note that I designed this around a third-person game. You use the mouse to turn, but you wouldn't be able to turn in mid-attack.

And finally, Exception handling: I don't see how punching a wall would create an exception error. If the arm/leg is physically-simulated, then if you punch a wall your arm or leg would be stopped in mid-attack.

babywax: The attacks would be controlled through a direction-button combo. It's rudimentary and not that great, but right now I can't think of how else to control the attacks. If you're standing, you have a set of probably ten attacks, controlled through punch/kick + w/s/a/d combo. If you're crouched, you have a set of five or six attacks. The kick attacks would be leg swipes, and the punches would be upper-cuts or something similar. And when you're in mid-air, you have about five kick attacks (forward/back/left/right/straight vertical), but no punching attacks.

BTW: I haven't coded anything myself, but I'm going to try to learn some C++ in a week or so :) But it'll be a while before I'm good enough to do much of this on my own.
 
Well... guess you'll see the problems once you start codeing i think...

You know that the strider was done by people who have bout 100 times the experience most of the people in this forum have, who have the support of some really clever guys specialiazing in that physics stuff, hey they even have a PROFESSOR from an university just for that facial animation stuff, you know, a fella with a god damn doctorate?!?...

Even though I do NOT know how easy things like that can be made in the source, what functions you have to play with... and even if a model can handle thousands of animation types at once, you will have to understand at least half of it vaguely to even start messing around with it ...

Knowing what you want to do is one thing... Finding a way to pack it into code is another...

EDIT: Sorry bout this dismotivating speech ... perhaps I see this a bit too pessimistic...
 
Remember, all professors and programmers are human, just like you. You can be better than anyone at anything, depending on how long you spend on it and how dedicated you are. Sounds old and like what everyone tells you but it's the truth.
 
I didnt read all the posts but

I think you'ld have a horrible time coding all the IK interaction between styles, stances, attacks, parries, jabs, counters, grapples, blocks, and defense if your trying to make the game free flowing and realistic. if you wanted to create a more static system then you wont really need code a free flowing ik system because you will already know the outcome IE you always know Jonny is suscepatble to a power upper cut after a slide then you can follow that with a jump kick to an ice ball to a slide than hit your fatality and you have Jonny's spine ;) :D
 
The attacks/blocks/moves would not have a truly free-flowing control scheme, there are combos for each move. IE you can only do throws once you have grabbed your opponent, and moves can only be done in certain stances (like you can't do a sweeping kick in midair).

And the university professor for the facial animations didn't actually do the animating, he just coached the animators on how to realistically animate facial expressions.
 
Originally posted by stigmata
And the university professor for the facial animations didn't actually do the animating, he just coached the animators on how to realistically animate facial expressions.

Not even that, all they did is use research from quite some time ago for the expressions. I think the prof who made it is already dead. (If I recall correctly that is)

Still, I don't think this is possible. Even if the concept would work, it still can't be done without a huge amount of programming. Simply not do-able for a non-professional team.

Feel free to give it a try though, and good luck, you'll need it:)
 
I don't know if I'll go forward with it as of yet, seeing as I'm "working" on Cause and Effect right now (i.e. waiting for the SDK). I may start work on this soon, but it's more likely that I'll end up starting this project once Cause and Effect is finished with, which would mean I put 100% of my modding time into each project.

If anyone's interested in attempting to get this to work, feel free to email me through the link in my signature.
 
I'm too lazy to read right now, and too lazy to run spell check, so live with my comments :)

To block, merely allow the players incresed control of their arms. Also, reduce the ammount of (impact) damage that occurs by impacts to the arm, or leg, and even (impact) damage happends to the hand or foot. You'd have to do that anyways to hit/punch/kick...or...he, he...closeline someone.

Daymn, I'm starting to get ideas for meele attacks in my MOD....

(me runs off to scribble down ideas).
 
Originally posted by stigmata
The attacks/blocks/moves would not have a truly free-flowing control scheme, there are combos for each move. IE you can only do throws once you have grabbed your opponent, and moves can only be done in certain stances (like you can't do a sweeping kick in midair).

then theres theres no point of coding a real time time IK system. since its all data driven IE each player has a couching defense, a crouch, a standing defensive stance, standing neutral standing, offensive standing, and jumping (with transitional states). which means the the predefined high attack against a low defending player will always miss

have you thought abought your control system and the relationship it will have with the players perspective (1st, 2nd(OTS) or 3rd person)?
 
The point of coding the realtime IK system is to make the attacks/defense look realistic. I think the IK may have to apply to a few attacks like straight punches/kicks and grabs, but not to sweeping kicks or similar moves to make it possible to dodge them. I think the way the IK will work for the attacks is the engine determines where the enemy is relative to your player at the time of the attack, and uses the IK to animate the attack to that spot. However this "spot" would be stationary and would not follow the enemy player, making it possible to dodge the attack.

I'll probably end up having to tweak the combat system to make it more attack-heavy and to make it harder to block attacks.

And what exactly would a 2nd-person camera be? :P
 
I understand the point of it but is there a reason to do it and can it be designed at the mod level as to not be a perfomance hit? but if you have limited system then you can predetermine that outcome IE 2 charging players one punches the other kicks whats the outcome? The kick lands first due to the attack range neing greater than the punch. which means you already have predetermined infro that doesn't require a lot of IK

2nd person is over the sholder while 3rd person is the traditional 'side scroller' style. all three change the way the player controls the character and the way the AI reacts
 
no your 3rd person is wrong because it follows the character. in a fighting game think of how the camera pans out when the fighters have a greater distance between them, and then how it pans in when they get closer. thats third person, its not just focused on one player. where as 2nd person is just like you and I described, and it can actually float around think of it as being the sidekick view (Robin's view of Batman )
 
OK, the camera system I would want to use is a fixed 2nd-person camera. Over the shoulder.

And I got an idea for the blocking system that would require more skill: You control the blocks yourself. So when you're holding the "defense" key, you use forward/backward/strafe left/strafe right to block up/down/left/right. This way you have to time your blocks, and there are no predetermined outcomes for certain attack combos.

Also, I think I need to add again, this is a free 3D fighter, not like Super Smash Bros. or Mortal Kombat. You can control which direction your attacks go, you can run in any direction, you can dodge anywhere. If you're not facing your enemy you won't be able to attack them or defend against them.
 
Back
Top