Skip to main content
GameDev.net gamedev.net
🔒 Locked

Few questions

Started by horizon981 Aug 23, 2006 at 12:06 AM 4 replies 800+ views
Original Post
horizon981
horizon981
Hi. I have experience making 2d games and done some OpenGL too. Was going through DirectX books... Man!! DirectX in enormously complicated. Personally, I don't want to mug up so many namespaces. Is there a better way out? I've heard about game engines. What are they capable of? Would I be better off with or without an engine? One more thing, if anyone can explain to me in simple words how the characters in a 3d game(say, Max Payne) are made to move, jum, shoot etc? I mean, are all those polygon transformations hand coded by the programmers? Or do the models "understand" certain things so as to make it easy for the developers. Im playing Prince of Persia these days, and the more I think about it, the more complicated it appears to me. Just look at the variety of stunts this guy can do!! I know this sounds like a buch of stupid questions hurled together, but I am really really curious. I have so many other things to ask, but fear that it might put you off. The post is already large enough. Thanks in advance.
Digitalfragment
Digitalfragment
Game engines are the basis of any game, and abstract out stuff like sound, input, graphics, physics etc so that the people writing the game dont have to write specific code for any of those features. For example, i dont need to bother about rendering all of the triangles in my character, because the engine will load the file i specify, and render the character in the animation frames i tell it to.

As for the polygon transformations you describe, they are created by Animators (Artists who 'rig' and animate models). The programmer just has to listen for a specific input and then tell the engine to play the specific animation.

You would be much better of with an engine that can handle the features you want, otherwise you will burn all of your time writing your own engine. Of course, if your like me and a lot of other people, its much more fun to reinvent the wheel in your own shape =)
horizon981
horizon981
So, every character( e.g. a 3ds file) has all the possible animations previously saved?
Code Fusion
Code Fusion
Animation involves nothing more than transforming some vertices . Of course animation
should be seen by human eyes to confirm if it looks real , but that doesn't change the
fact that it can be generated.in games like max payne , you got people being blown away
, and people rolling down the stairs . stuff like that provide irregular scenarios ,
so you can't prepare for each one. that calls for a more dynamic animation , which is
related to the object skeleton , and anatomy.so you save what you can predict , and
generate the rest.
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
frob
frob
>> One more thing, if anyone can explain to me in simple words how the characters in a 3d game(say, Max Payne) are made to move, jum, shoot etc? I mean, are all those polygon transformations hand coded by the programmers? Or do the models "understand" certain things so as to make it easy for the developers.

>> So, every character( e.g. a 3ds file) has all the possible animations previously saved?

Depends on the engine.

If you are only playing back pre-recorded animations, then obviously they need to be pre-recorded. :-)

When you want dynamic motion of the 3D models, you will want to use a physics engine rather than re-invent another one.

A lot of it actually is pre-recorded. It can come from the animators / artists or from motion capture or other sources. This is often combined with other methods.

Inverse Kinematics (IK) solutions will look at where something like a foot needs to be, and will try to move joints in the right way. You need to compute approximately where you want the thing. For example, placing the foot on a stair and the setting the hip height and then let your physics engine figure out how to bend the knee and ankle. It is very compute intensive, can get stuck, and doesn't always look good.

Ragdoll physics / forward kinematics will just move stuff around like a limp rag doll, with constraints on legal joint motions. It can be used in conjunction with other physics tools. It works well for hair, cloaks, and falling parts.


Generally a mix is used.

Artists, animators, mocap systems, and procedurally generated motion tools come up with good animations for walking, running, climing, falling, crawling, jumping, and whatever else. That takes care of the major motion and gives each character their distinctive features. These are the base for the other transformations.

Some IK physics might be involved (or might not) to make small adjustments to those animations. This is compute intensive both to figure out the destination and to determine the motion, and might not be the best use of your time.

Specialized physics are then applied as desired. Popular ones are cloth physics (although I don't care for it) and T&A physics. There are other specialized physics options that vary based on your needs. For example, you might look at tensions on glass to decide if (and how) it breaks. You might want to have slightly different physics for weapon kickback, or deformed objects, or whatever.

Finally, simple ragdoll physics can be used on hair, cloth, falling glass, severed limbs, dropped swords, and anything else not covered in the earlier versions.

Since each of these can become very compute expensive, physics engines are taking advantage of specialized hardware (such as PhysX) to handle it.
frob
frob
Oh, and most of those systems mentioned are well beyond the scope of what a lone programmer in the basement or an ad-hoc team of noobs would ever use.

They generally involve a team of experienced people who specialize in the animation and programming of physics, and may include contracting for mocap work or (expensive) in-house mocap recording systems.


For a small project that wants to do some physics, your are basically limited to the plain ragdoll stuff you get from ODE or other free engines (which is really quite good for that type of project), accompanied with whatever hard-coded or procedurally generated motion files you and your artist come up with.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.