Making better use of existing animation frames
Moderator: Forum Moderators
Making better use of existing animation frames
I've noticed that attack animations can be made much better looking by just using the existing frames better.
Let's take the dwarvish guardsman for an example. This is what the poor fellow has now:
The above means that the single attack frame is displayed all the way from his own hex to the enemy's and back again. It looks silly. Now, since not every unit can get a 3+ frame animation in the next couple of years still, we can use other tricks to make this animation look considerably better:
The above means that he starts with the base frame, slides just a little bit forwards, changes to the defense frame (which happens to look exactly like a wind-up for the thrust, so we'll use that), continues sliding forwards up until just before the point of impact, which is when we'll change to the actual attack frame. When sliding back, the same frames are displayed in reverse order. The end result is that the attack looks much more nicer and smoother than just sliding back and forth using one frame.
The reason why I use the base frames in the beginning and end of the animation is that it just seems to look smoother that way. I think it's because of this: if the sliding starts at the same time when the frame switches, all the changes (movement and graphic) happen at the very same moment, so the attention is drawn more to these "key points", which makes the whole thing look more jerky. If the changes that happen don't "pair up" like that, but alternate instead, the whole thing looks smoother, maybe because the eye can't so clearly distinquish the "key points", but rather sees one smoother continuous motion. Anyway, it may or may not work this way, but I just felt like writing it anyway as I was thinking about it.
And now the purpose of this post: I'd like to start fixing unit animations to work this way. Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery. Since some units have these sweat drops flying out of their heads in their defense frames, I might need to duplicate those frames in order to just get rid of the sweat. If the tweak seems very simple, I might actually change something in the frame while I'm at it. I wouldn't be adding any "new animations" as such in the process, at most taking an existing frame and tweaking it just a bit to make it fit in with the rest of the attack animation. If there are no suitable other frames to use as part of the attack animation, I'd just use the base frame like in the guardsman example. I've tried it with several units, and even that looks better that sliding back and forth with only the one attack frame.
Since it might be quite a big change to how most people look at how attack animations work, I'd figure it's best to announce my intention and confirm that it's ok first. So, any objections?
Let's take the dwarvish guardsman for an example. This is what the poor fellow has now:
Code: Select all
[animation]
[frame]
begin=-200
end=100
image="units/dwarves/guard-attack.png"
[/frame]
[/animation]
Code: Select all
[animation]
[frame]
begin=-200
end=-150
image="units/dwarves/guard.png"
[/frame]
[frame]
begin=-150
end=-100
image="units/dwarves/guard-defend.png"
[/frame]
[frame]
begin=-100
end=50
image="units/dwarves/guard-attack.png"
[/frame]
[frame]
begin=50
end=75
image="units/dwarves/guard-defend.png"
[/frame]
[frame]
begin=75
end=150
image="units/dwarves/guard.png"
[/frame]
[/animation]
The reason why I use the base frames in the beginning and end of the animation is that it just seems to look smoother that way. I think it's because of this: if the sliding starts at the same time when the frame switches, all the changes (movement and graphic) happen at the very same moment, so the attention is drawn more to these "key points", which makes the whole thing look more jerky. If the changes that happen don't "pair up" like that, but alternate instead, the whole thing looks smoother, maybe because the eye can't so clearly distinquish the "key points", but rather sees one smoother continuous motion. Anyway, it may or may not work this way, but I just felt like writing it anyway as I was thinking about it.
And now the purpose of this post: I'd like to start fixing unit animations to work this way. Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery. Since some units have these sweat drops flying out of their heads in their defense frames, I might need to duplicate those frames in order to just get rid of the sweat. If the tweak seems very simple, I might actually change something in the frame while I'm at it. I wouldn't be adding any "new animations" as such in the process, at most taking an existing frame and tweaking it just a bit to make it fit in with the rest of the attack animation. If there are no suitable other frames to use as part of the attack animation, I'd just use the base frame like in the guardsman example. I've tried it with several units, and even that looks better that sliding back and forth with only the one attack frame.
Since it might be quite a big change to how most people look at how attack animations work, I'd figure it's best to announce my intention and confirm that it's ok first. So, any objections?
True, for elf animations this doesn't work. The fighter and captain, however, can use the defense frames after the strike, when gliding back. The lowering of the sword and covering with the shield when retreating fits there nicely. Defense frames before the strike seem to suit some dwarves and at least a few mermen (most notably the hoplite). The drake burner line, too (except the flameheart).Jetryl wrote:Just be certain that the following is true:
Because in many cases (elvish units being one example, horsemen being another), it is not.Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery.
But obviously, if I add new frames to the animation, I'll check in-game whether it looks ok or not.
Just be certain that the following is true:
As for the use of the base frame (briefly) at the start and end, I generally endorse it wholeheartedly. Go to town.
I've actually used a similar technique for many of the elvish bow frames, though with a slightly different purpose (since it's ranged, after all).
Because in many cases (elvish units being one example, horsemen being another), it is not.Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery.
As for the use of the base frame (briefly) at the start and end, I generally endorse it wholeheartedly. Go to town.
I've actually used a similar technique for many of the elvish bow frames, though with a slightly different purpose (since it's ranged, after all).
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
One note, on units where using the defend frame works if the sweat droplets are removed, if you make the tweaked frame, it could also be used for an alternate defend frame, say when the unit is missed. That way the sweat beads would only show when the unit was hit. Overall, a good idea as long as you are checking each result in game and not just doing it in an automated way.
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358
All right, I spent most of today doing this (and other small animation fixes), and I've now committed the first batch. A few good examples, in case you want to see some, are several drakes, namely sky, hurricane, flare, flameheart, warrior, blademaster, fire, inferno, slasher and warden.
I'll probably commit another batch tomorrow, but it probably takes several days for me to manually tune every unit (especially since I'll be away for a few days).
I'll probably commit another batch tomorrow, but it probably takes several days for me to manually tune every unit (especially since I'll be away for a few days).