Page 1 of 1

Added a "miss" Animation

Posted: Tue Mar 17, 2015 11:42 pm
by Lille1_opendev2015
Hi ! I'm Arnaud from the Lille 1 OpenDev group !
I and Bafou added an animation when an attack misses.
The animation is based on the poison effect, with a different opacity and a white-gray color, so it looks like smoke.

I think it is better this way because before this, we didn't really know that the attack misses (except from the log) and I found it a bit disturbing.

Thank you for your feedbacks !

The link to the pull request :
https://github.com/Zukero/andors-trail/pull/10

Re: Added a "miss" Animation

Posted: Wed Mar 18, 2015 10:31 pm
by Zukero
I like the idea, and your code is well written.
However, I don't like the animation graphics. They look too much like you successfully landed a different kind of attack (like a freeze or whatever...).
I'd also love the word "MISS" to show up just like the damage amount does when you actually land (or take) a successful attack.

If you don't have anyone to draw a convincing animation for your feature, I can try to dig in my relations for someone who may decide to care to draw one, but that'll cost me a bunch of beers :D

Re: Added a "miss" Animation

Posted: Thu Mar 19, 2015 1:58 pm
by Lille1_opendev2015
We searched how to display "MISS" but we didn't find where it was in the code. That's why we made a smoke-like animation.
Could you give us an hint about this ? =)

Re: Added a "miss" Animation

Posted: Thu Mar 19, 2015 5:19 pm
by Zukero
Yup.
Check out VisualEffectController.startEffect(Coord position, VisualEffectCollection.VisualEffectID effectID, int displayValue, VisualEffectCompletedCallback callback, int callbackValue)
There, the "int displayValue" is used to show the damages.
An API change to make it a "String displayValue" could be the right way to do it, along with the consequences:
- The VisualEffectAnimation(...) constructor would have to also accept String instead of int, removing the need for the value check and String conversion.
- The existing callers of VisualEffectController.startEffect(...) would have to take care of their own int->String conversion, ideally reusing the one removed from VisualEffectAnimation(...) in the previous step.

Enjoy !