Polishing up unit animation WML (timings/halos/etc.)

Contribute art for mainline Wesnoth.

Moderators: Forum Moderators, Developers

Forum rules
Before posting critique in this forum, you must read the following thread:
User avatar
Coffee
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Polishing up unit animation WML (timings/halos/etc.)

Post by Coffee » June 12th, 2013, 11:47 am

Hello all artists

EDIT: changed thread title from only dealing with timings as it is now dealing with halos and such as well. I do not intend this thread to be for making any new sprites, just polishing up existing animation code and such.

After recently doing some work on the animationWML syntax for 1.11 I noticed that some of the default units animation timings are out. What do I mean by this -- some of the timings for attacks do not match the unit movement offsets. For example, the ruffian/thugs line sound in 1.10 plays the sound to hit way before the graphics show the unit hitting an opponent. Another example might be a unit that plays its attack frame after it has fully moved towards an opponent and is then moving backwards. Another, probably rarer example, might be a unit that plays part of its animation too quickly or too slowly -- for example in defense so it plays after it was suppose to dodge or something like this.

I've had some help from Bumbadadabum in identifying units such as the ruffian/thug line, but I am sure there are plenty of others, and it would be good to get a list of problematic units with these kind of off timings so that they can be fixed -- making the game look as nice and polished as they were intended to. The new syntax allows easier access to smooth frame offsets as well, so if there is any jerkiness that is not intended with something, this can fix that too.

So to summarise (somehow my posts always end up longer than intended), please list any problem units with timing issues here and they will be looked into.

H-Hour
Posts: 183
Joined: April 14th, 2010, 12:27 pm

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by H-Hour » June 12th, 2013, 1:48 pm

Do the problems exist in the 1.11.4 release, or should we only be looking if we have a more recent checkout of the repo?

User avatar
bumbadadabum
Developer
Posts: 1005
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands
Contact:

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by bumbadadabum » June 12th, 2013, 2:52 pm

H-Hour wrote:Do the problems exist in the 1.11.4 release, or should we only be looking if we have a more recent checkout of the repo?
We haven't really changed anything since 1.11.4, so if the problem is there it most likely also is in the latest HEAD.

User avatar
Coffee
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Coffee » October 12th, 2013, 3:08 am

Although not terribly exiting, some work has gone into polishing up the animation WML code and timings since the last post here by bumbadadabum.

I have a small outstanding issue with the red mage and white mage lines though.

For the red mage line, the fireball appears to be coming out of the chest of the attacking unit. To the artists -- is this supposed to be like this?

For the white mage line, the attack appears not to be directed by the mage, but happening before any staff is raised, etc. Can we change this?

User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by thespaceinvader » October 12th, 2013, 7:01 am

I don't see any particular problems with fixing these sorts of issues.
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by zookeeper » October 12th, 2013, 7:04 am

Coffee wrote:For the red mage line, the fireball appears to be coming out of the chest of the attacking unit. To the artists -- is this supposed to be like this?
It's been that way forever; back then all ranged attacks were simply a projectile going from the center of one hex to the other. It could definitely be changed so that the fireball appears for example at the point of the staff or above the mage's head (preferably as a new fireball macro which takes x,y starting coords as well). Since such a big projectile appearing out of nowhere in one frame probably also looks a bit weird, one could also use ~SCALE() to make it scale in during the first 100ms or so (I don't know if using it as a progressive parameter would be exceptionally costly performance-wise, though), or ~O() to make it fade in. There's a lot that can be done with IPF to enhance these sorts of effects.
Coffee wrote:For the white mage line, the attack appears not to be directed by the mage, but happening before any staff is raised, etc. Can we change this?
Sounds definitely like someone's messed up the timing sometime recently (it hasn't always been that way).

User avatar
Coffee
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Coffee » October 12th, 2013, 11:05 am

zookeeper wrote:...It could definitely be changed so that the fireball appears for example at the point of the staff or above the mage's head (preferably as a new fireball macro which takes x,y starting coords as well). Since such a big projectile appearing out of nowhere in one frame probably also looks a bit weird, one could also use ~SCALE() to make it scale in during the first 100ms or so (I don't know if using it as a progressive parameter would be exceptionally costly performance-wise, though), or ~O() to make it fade in.
I can put something together that does this, but I am not an artist so someone else would probably have to check it looks good. After doing some refactoring of the animation code for 1.11.2+ I wouldn't think that it would be costly at all as the movement is just an offset that is now calculated over a continous line and the appropriate image matched from a discrete set and scaled when needed. If the animation is sped up, AFAICT then it wouldn't do the scaling at all unless that frame is shown.
zookeeper wrote:
Coffee wrote:For the white mage line, the attack appears not to be directed by the mage, but happening before any staff is raised, etc. Can we change this?
Sounds definitely like someone's messed up the timing sometime recently (it hasn't always been that way).
Well, it could be me that stuffed things up with syntax changes -- but I checked 1.10.7 on slow motion and the beam definitely comes down before the staff is raised and such. To me it doesn't look quite right.

User avatar
Coffee
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Coffee » October 14th, 2013, 12:33 am

In recent commits I've changed the white mage timing slightly and made a new fireball macro with my best effort to get what zookeeper suggested to work.

I've attached a video of the red mage line attack (skip the first 2 seconds of menus). The X and Y coordinates should start the fireball from the centre of the staff.

EDIT: bug fixed with westwards animations. Cheers Zookeeper.
Attachments
Red mage attack.zip
(105.34 KiB) Downloaded 199 times

User avatar
bumbadadabum
Developer
Posts: 1005
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands
Contact:

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by bumbadadabum » October 15th, 2013, 2:44 pm

I've committed a new halo for the level 1 Malin Keshar in DiD. Thanks to Coffee for the idea to use ~O.

User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Crow_T » October 15th, 2013, 10:25 pm

Speaking of Halos, I have a request: to reduce the illuminate halo transparency by about 50%, it's currently very obtrusive.

User avatar
Coffee
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Coffee » October 16th, 2013, 10:22 am

Crow_T wrote:Speaking of Halos, I have a request: to reduce the illuminate halo transparency by about 50%, it's currently very obtrusive.
An interesting suggestion. This has bothered me in playing before a bit.

Here's my suggestion for an artist to comment on:
illuminates-aura-opacity-80-percent.png
That is to change the opacity of the illuminates-aura image under data/core/halos to an 80% opacity version. I've attached the image I used to produce the screenshots.

I figure the change is small enough not to cause any issues, and at the same time increase the visibility of surrounding hexes.
Attachments
illuminates-aura-80-percent-opacity.png.zip
(49.66 KiB) Downloaded 197 times

User avatar
bumbadadabum
Developer
Posts: 1005
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands
Contact:

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by bumbadadabum » October 16th, 2013, 10:33 am

This looks great. I was afraid this change would mess with other things that might use this halo, but it's really not big enough to cause any trouble. It does make a difference regarding visibility. I think it's good to commit, but it won't be bad to wait for an artist to comment.

User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Crow_T » October 16th, 2013, 9:40 pm

Here I shrank it and opacity is 60% of stock Wesnoth.

I'm glad that this is up for discussion, the current aura hurts my head :doh:
Attachments
illuminates-auratest.png
illuminates-auratest.png (67.97 KiB) Viewed 3864 times

User avatar
bumbadadabum
Developer
Posts: 1005
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands
Contact:

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by bumbadadabum » October 16th, 2013, 9:44 pm

I think 60% might be overkill. Although the surrounding hexes are better visible, it's much harder to recognize the actual aura in your screenshot. Perhaps something like 70% would be the middle ground?

User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Polishing up unit animation timings (sounds/attacks/etc.

Post by Crow_T » October 16th, 2013, 10:09 pm

70%, and still shrank down a bit, plus a regular size (edit: the pixel density affects it) These are just examples for discussion :
Attachments
illuminates-auratest70big.png
illuminates-auratest70big.png (69.93 KiB) Viewed 3853 times
illuminates-auratest70.png
illuminates-auratest70.png (67.89 KiB) Viewed 3855 times

Post Reply