Premium Features

Download Video

Player Sprite - Idle

Here we'll cover how to code animation into our player sprite. We'll use a plethora of frame related techniques to move our drawImage crop mark and get our player animating in an idle animation.

  • 1:15 - Extend Fighter Class From Sprite Class

  • 7:05 - Scale Sprite and Reposition Sprite

  • 10:40 - Move Sprite Up and Down

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
S
Star posted 4 years ago

how can i make a wall to stop my 2 characters from going out of the frame? how can i make the actions turn to the right for player 2? for ex. the death img and others

0
S
Star posted 4 years ago

what if my img is bigger than that how do i adjust the size?

0
chris posted 4 years ago

Try passing through a smaller scale value, something like 0.5. As long as drawImage's last two arguments are affected by that, your image should shrink.

Let me know if that works 😄

1
S
Star posted 4 years ago

thx

0

Providing the lift to launch your development career

© 2026 Chris Courses. All rights reserved.