Code and Demo for a Simple SHMUP Sprite Animation
My first assignment in JSFiddle was to get a simple animation working with a sprite sheet. I chose to go with a basic shoot-em up (shmup) game. First let’s take a look at our sprite sheet. These were created in Adobe Illustrator and Photoshop CC.
These graphics are pretty simple. I may go back later and refine them to look a little less cheesy, but for now they will work for this assignment. We are only going to be dealing with the first two rows in this post. I will build onto it as the game comes along. All we want to accomplish now is having our ship bank right and bank left.
I am hesitant to go through a tutorial, as a lot of things need some cleaning up here (like the ugly if/else statements in my key down and our time intervals). In fact, a lot of this will be cleaned up as my next step. Below is the program and the code:
Let me know if you have any questions!