Back | Reverse | Quick Reply | Post Reply |

Game Programming and Inverse Kinematics
Link | by thefiifthman on 2008-07-01 23:00:41
I'm looking into programming a physics-intensive 2D fighting game, and one of the things I need is some way to implement inverse kinematics for character animation. How hard is to write code for IK? Are there libraries out there that I can use to save time?

I'm still writing a design doc for the game, I still haven't decided on what language I'm going to use, although I'm split between Python and C++.

Re: Game Programming and Inverse Kinematics
Link | by h4xordude on 2008-07-08 12:54:21
That REALLY depends upon how complicated you want the system to be. Do you want it to follow a simple skeletal kinematic model or do you want it to bend and warp like a flesh model? and then there's little things like trajectory physics that tie in. A lot of that will be judged by the kinds of terrains or map environments you want to simulate, like if one was underwater you might want to account for water drag, currents, etc.

That's the great thing about programming though since you can make it as complicated or as simple as you want.

I haven't used python a whole lot for this sorta thing but I guess it'd be ok; Personally though I'd use C or C++ since I find they have a little more flexibility with what you can do.

Beware the quiet people, You don't know their intentions
(small signatures are sooo much cooler since they don't annoy people trying to read through posts!)

Re: Game Programming and Inverse Kinematics
Link | by ruyvlopez on 2008-07-25 05:23:51 (edited 2008-07-25 05:24:44)
I just make this kind of game, but it's only a 2D Physical Fighting Game with no long-ranged attacks and other effects like the Street Fighter Games. Although it is very tough to build, not only by coding it but building some Model Graphics to be used as a character.

I used One Dimensional Kinematics in this, although I'm not giving the code of but I give some info. I combine Visual C++ and Visual Basic to build it, but there is some hint to be understand to build it.

For Use of Computer Codes

1. Must first study the input codes equivalent using the keyboard for the controls.

2. After building the character, there's must have a shadow in order to the objects don't flicker while moving it as the program runs.

3. There is must a Skeletal Blue Print of the characters when you inplotted it in the program. I use the concept of Stick-Man in doing this so that every Attack of the character, there is a limmitation of ranged distance and damages.

4. Use some gamming components of DirectX in order to the game to not slows down or lag while it's running in your PC.


For Kinematics Method Reference (Can be found in other Physics Lessons)

1. The Law of Gravity. This is very helpful in Jumping, Attacks, and Free Fall from Attack of a certain character in the game. But in my game, I also use it to identify how heavy is a character so that it can jump hardly depending on it's weight and the strength it can carry it's weight. It is also be helpful in what terrains do you want to build like underwater terrains that h4xor dud3 says in his post.

2. Trajectory. I use this method for jumping as what h4xor dud3 may say. This is only simple while computing the weight of the character, force of jump, gravity, interference (like water drag as what h4xor dud3 says), and the angle of destination (try Math in relationship with Angles).

3. Applied Force. My teacher says to me when I submitted this as my project, "You make a terrible fighting game because it has equal damage to the sprite characters even it only touch the hair of that sprite." I got a C- for that game because of not knowing this. I use the concept of Stick-Man as the Character's Actual Body to compute the mele damage. Like a Digital Bone, it can compute the damage according to how it reaches the other digital bone, if it is far (0), normal damage (10~30), heavy damage (31~50), and critical if it hits a vital portion, ex: neck, lower part of the body where reproductive organs is located, and heart (50~70).

The code you think is hard, especially if you did it in C++ in applying those kinematics method and pseudo code. But the hardest to do is the Sprite of the Character to be used in the game. Actually it is very complicated if you make a costumized character, but if you lack of time, try to snap shot a character from an arcade game.

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0023 seconds at 2024-12-28 22:15:03