Making Bow Animations

From The Battle for Wesnoth Wiki
Revision as of 06:50, 15 January 2006 by Jetryl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is how I made the elvish marksman animations, and how I'd like to have bow animations done for the entire game. For reference, consult the frames for the elvish marksman, which have been in the game since before 1.0. I'd link them here, but I'm making new ones for the team color switchover, I'll link those when I finish it.

One of the most important things is the presence of a missile-weapon frame for the unit. I actually wire this into the animation so that it gets seen regardless, rather than having the code generate the timing for this thing programmatically. It might appear for some additional time, it might not - the semantic presence of this image as a "standing-with-ranged-weapon-active" frame might be entirely unnecessary at the current time, and we might be able to use it as just the first and last frame of the animation. The _point_ is that the unit is forced to assume a pose where their weapon is definitely at the ready, but is also definitely not being used. That's a useful frame to have.

In the magical world of wesnoth, the arrows nocked into our bows do not actually get shown, because we didn't take the effort to animate that being done. Because of the way our current bow frames are done, they would be compatible with being extended into such an animation - 4 or 5 frames would need to be added at the beginning, transitioning into where the "missile-weapon" frame currently gets used. That individual frame would be replaced with something wherein the archer is not standing there at the ready, but moving the arrow to nock it to his bow (essentially, the hand would be shaped differently, with the arrow held in the two forefingers, inasmuch as they're visible on a sprite). After this, all of the existing bow frames would essentially be identical except that there would be an arrow in the bow.

At the time of this writing, I'm not going to pursue this, because, relative to other endeavours, such as walking animations, it's a lot of work for a relatively minimal gain. Bringing all the bow animations up to the standard described herein is a first step towards that, and will be a huge improvement in its own right.

The one other note that I'd make is that, for smaller bows, the angles of deformation and string pullback can be a little bit stronger than for a big bow like the marksman has, because if they are not, the little toy bow might look especially wimpy.

Step by Step:

Here are the individual changes in the image, from frame to frame.

  • Changes from standing frame to bow frame: This is flexible, but whatever the unit does, it must lift the weapon somehow. This movement must happen.

Bow moves up one pixel, and left (eg. towards the body) by one pixel. I also shifted the rear foot in the elvish marksman animations. The arm gets moved very high, and seems poised to grab the bowstring at any second. I would just copy the empty hand and arm out of the elvish marksman image, if you're making another bow animation (and recolor the arm).

  • Changes from bow-standing frame to bow frame #1:

Head and torso move in towards the bow by one pixel. Empty hand grabs bowstring, and thus the shoulder needs to follow with it by quite a ways.

  • Changes from bow frame #1 to bow frame #2:

The bow does not change shape in this frame, but the string is pulled back so that the diagonals made by it are at about a 30° angle relative to vertical. The bow moves out from the body (to the right) by one pixel (very important). Relative to the bow position, the hand pulling the bowstring moves back (by seven pixels, six in terms of absolute position, and this number doesn't need to be strict), obviously, but also moves up by two pixels. The upward motion is important, and should not be neglected.

  • Changes from bow frame #2 to bow frame #3:

Remember how the head and torso moved forward in bow frame #1? Now they move back by one pixel - the bow, however, stays put. The bow also deforms for the first time, here, and the string reaches approximately a 40° angle relative to vertical. The hand does not move up or down, but does move approximately 5 pixels to the left, as it is pulled back. By now, the elbow of the arm pulling back should be jutting out from the body.

  • Changes from bow frame #3 to bow frame #4:

The bow reaches its maximum deformation, at which the string is at about at a 45° angle. Smaller bows can have a harder angle for their string. The most important thing about this frame is that the hand moves up one pixel, and to the left by another five, jutting way out from the body. Foreshortening does make the forearm smaller than it was in the previous frame, because the arm is no longer facing parallel to the computer screen - it's now 4 pixels where it was 6 before. One of the important things to note is that though the bow does deform, and the string gets pulled back, it does so less than in the previous frame, because the resistance of the bow is greater now that it's being stretched so far - this makes it looks like the bowman is reaching the limits of his draw.