p5.js blog post #8

I made animations for the character’s movement each cardinal direction. The other image files are of a collectible item which increases the player’s score, an “enemy,” and a death state for the enemy. I only have the Player() object here as I want to set up the arrays before I tackle the enemies and the pick-up items.

Showing the code for the images used in the game.
Showing the code for animation within the Player() object, as well as demonstrating the animation.

Code: https://editor.p5js.org/robbiery/sketches/yeUtl4pJB

Leave a comment