Platform-Game icon indicating copy to clipboard operation
Platform-Game copied to clipboard

Enemy Killed Animation

Open EdwardDunn opened this issue 7 years ago • 4 comments

Enemy Killed Animation

Currently when the player character jumps on an enemy character it falls off the screen.

Create an animation that makes the enemy character explode instead of falling away every time there is a collision.

There are a number of JQuery plugins to help with sprite animation.

EdwardDunn avatar Oct 17 '17 16:10 EdwardDunn

can we add a dissolving or fading effect?

skywalker212 avatar Oct 23 '17 04:10 skywalker212

@EdwardDunn since we are jumping on the enemies, why not squeeze them and make them fall to the ground? This can be done, quit simple, by changing height and using the function hitBottom. I can do a pull-request if you like to.
animation awesome first game, by the way!

antoschd avatar Oct 23 '17 12:10 antoschd

I don't think you can easily use the Jquery animation tools typical for CSS animation since the sprites are using the Canvas object - antoschd probably has the easiest method.

I couldn't find anything that felt like a cool death animation here: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Advanced_animations

sseelbach avatar Oct 23 '17 12:10 sseelbach

@antoschd Great idea, Its nice and simple but really adds to the game play. If other contributors want to create a more advanced animation that is fine but this is a good start. Go ahead and create a PR for your change.

I will keep this issue open for anyone who wants to keep working on animations.

EdwardDunn avatar Oct 23 '17 14:10 EdwardDunn