Members - Reputation: 116
Posted 26 May 2012 - 02:00 PM
I am currently reading various books but this question keeps popping up in my head. Thanks in advance.
Members - Reputation: 1285
Posted 26 May 2012 - 02:17 PM
In most modern games, are animations 'drawn in' as in you have models which contain the animations of various things moving? or are they 'coded' in: when the key W is pressed and MOVE() is called, this directly changes the coordinates at which the player is drawn, along with his legs moving in a running animation in specific intervals
Most games have pre-drawn stuff.
That said, most games have artists (which you might not).
Some graphics (explosions/ advanced particle effects) look better with custom coding,
While pre-rendered animations look better, and allow you to work well with an artist, I find that coding my animations is much more fun to me as a programmer (I love coding cool explosions and morphs).
My browser game: Vitrage - A game of stained glass
Moderators - Reputation: 40643
Posted 26 May 2012 - 02:39 PM
Next come the animators. Their job is to animate the bones and joints in ways that look good. These are generally a bunch of transformations and keyframes. This is also generally done in Maya or 3D Studio Max.
The cool thing about it is that when done right, modelers can generate many different models using the same bones and joints. Animators can create a single animation that will look good no matter what the model is. As one example, consider The Sims since it is so well known. The same animations work regardless of if your person is tall or short, skinny or fat, male or female, old or young. You can use different textures (color of skin, makeup, tattoos) and different models (male, female) and reuse the same animation on them all.
The programmer builds an animation system that loads up all the models, the textures, and the animations, turns the bones and joints into a skeleton, and plays the animations (which are matrix transformations) and blends them smoothly over time.
Sometimes the animation won't have it written by the animators. There are systems called Inverse Kinematics systems (IK Systems) that will solve the math for you. For example, if the IK system knows a hand needs to been at one point and knows the shoulder needs to be at another point, it can solve the math to figure out where the elbow needs to go.
The programmer should never need to move those points directly. Instead he should be able to tell the animation system that a specific animation needs to be played, and the animation system will run the matrix transformations that the animator specified.
As you can see, there is a lot of work involved in making 3D games.
Particle systems, such as explosions, fog, mist, and so on, are also generally created by artists. The artists create particles, and they create simple scripts that describe where the particles start, how they move, and how long they last. The programmer can start and stop the particles with a fairly straightforward particle system.
For making 2D games, pixel artists generally draw a series of pictures. When the programmer needs to play an animation, the animation system simply plays one picture every frame until the end of the cycle. For example, you would tell the animators that the walk cycle is 32 frames; when a character walks they move the object for 32 frames while at the same time playing the animation for the same 32 frames.
2D games are simpler to program, but can require much more drawing than 3D games.
In neither case do major games have the programmer directly moving animations through code.
Hope that helps.
Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.
Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.
Members - Reputation: 200
Posted 27 May 2012 - 02:15 PM
While there are pure dynamic animations, the usual case is to blend them with pre-set animations, to make the character more believable by reacting correctly to the world.
Do note that this subject is pretty advanced (a lot of inverse kinematics and physics).
Members - Reputation: 119
Posted 28 May 2012 - 08:11 AM
Large monsters were drawn in parts, and their parts were animated through image transformations, sort of like a model system.
Edited by Explodinator, 28 May 2012 - 08:11 AM.