Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Sprites - Enemy

Published 2 years ago

For our enemy sprite, we'll use a multi-frame sprite sheet setup for animation. Animating a sprite sheet requires reworking canvas' c.drawImage() quite a bit. Basically, instead of using three or five arguments, we use nine, and all of the arguments' positioning changes which can make the refactor quite confusing.

I'll walk you through it step-by-step, declaring descriptive variables in all the right places so you can walk through the animation process with ease.

  • 0:00 Extend Enemy class from Sprite class

  • 4:15 Crop enemy sprite sheet

  • 10:43 Animate enemy sprites

  • 15:31 Slow down animation with frame hold

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
S
SPURTECH posted a year ago
0

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.