Jump to content

  • Log In with Google      Sign In   
  • Create Account


coding vs drawn animation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 lululoo   Members   -  Reputation: 116

Like
0Likes
Like

Posted 26 May 2012 - 02:00 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

I am currently reading various books but this question keeps popping up in my head. Thanks in advance.

Sponsor:

#2 SillyCow   Members   -  Reputation: 849

Like
0Likes
Like

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 new android game : Enemies of the Crown

My previous android game : Killer Bees


#3 frob   Moderators   -  Reputation: 19762

Like
3Likes
Like

Posted 26 May 2012 - 02:39 PM

For 3D games, the models are meshes covered up by meshes. Think of it the same way they do the big parade floats with a wire mesh covered by decorations. These are made by modelers. The modelers also include "bones" and "joints", which are special points that tell the mesh how it should deform. This is generally done in Maya or 3DStudio Max.

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 personal indie blog at bryanwagstaff.com.

#4 wolfscaptain   Members   -  Reputation: 200

Like
0Likes
Like

Posted 27 May 2012 - 02:15 PM

And then there are dynamic animations, such as the character's feet actually meeting the stairs when you walk up on them, rather then hover over them playing the pre-set walk animation.

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).

#5 Explodinator   Members   -  Reputation: 119

Like
0Likes
Like

Posted 28 May 2012 - 08:11 AM

The 2D castlevania (metroidvania) games I believe have "coded" dynamic animations.

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.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS