Animated battle sprites

Avatar

By MirceaKitsune 16 Jan 2017 18:50

Member · 38 comments

One little feature I've been curious about and moderately interested in; Would it be easy to support animated creature sprites in the battle screen at some point? Static images can be nice too, but having some sort of movement is often more immersive if done right.

The most common implementation for animation in sprite games is by vertically stacking each frame in a png file. The battle definition of the creature must of course specify how many frames there are, and what speed they should be cycled at (scale = pixel_size_horizontal X pixel_size_vertical / total_frames).

As a bonus, such a system could be used to allow special animations at various moments! Creatures can play a specific sprite set when attacking or being attacked, or use a different idle animation when HP is smaller than # or status bla-bla-bla is active or variable foo_bar is set, and so on.

If you want some nice examples of why this would be a great visual addition, this page offers quite a few.

tumblr_static_thyphlosion_.gif
tumblr_static_fennekin_pixel.gif
tumblr_static_bouncy_meowth_.gif
tumblr_static_suicune_bby.gif
tumblr_static_mew_.gif

Avatar

By MirceaKitsune 9 May 2017 22:08

Member · 38 comments

I made a few reports on this today, which I'll also post here in hopes of reviving the discussion a bit:

https://github.com/Tuxemon/Tuxemon/issues/298
https://github.com/Tuxemon/Tuxemon/issues/299

Avatar

By Sanglorian 10 May 2017 04:42

Champion · 491 comments

Hi MirceaKitsune, thanks for sharing your thoughts.

I'll be no help on the programming side of things, I'm afraid. I find a single GIF with the entire animation in it the easiest to work with, but it's trivial to convert that to a string of numbered PNG files instead. My least preferred is a sprite sheet.

In terms of animations and custom sprites, I think:

Animations add a great deal of charm. We are unlikely to ever get most or all of the tuxemon animated, but it's a nice option to have.

For battle animations, I'd say the most obvious are:

1. Getting hit by a melee attack
2. Getting hit by a ranged attack
3. Getting hit by a status effect
4. Making a melee attack
5. Making a ranged attack
6. Making a status effect
EDIT: 7. Idle (of course)

If you want to test out some idle animations, we have some of the right dimensions from OGA: https://wiki.tuxemon.org/index.php?titl … &redlink=1

For conditions, my first thought would be whether there are easier ways to implement the same concept. For example, just shifting the colour of the sprite (towards green or purple for poisoned, etc) or overlaying an animation (a few noxious bubbles for poisoned, question marks for confused, etc) would be much easier to implement, but serve the same purpose.

Last edited by Sanglorian (10 May 2017 13:33)