Simple Item Animation

This cart demonstrates simple item animation. It is heavily commented so you can pull apart how this is being achieved.

Notes: The basic idea is to have a few specific pieces of information tracked with each item:

  • A list of sprites in the order they should be played in the animation.
  • A tick which keeps track of how many _update() ticks have gone by since the last time the animation changed.
  • An anim_speed that tracks how many _update() ticks should happen before the animation moves to the next frame.
  • The current frame for the animation.

Install instructions

Save this file to your PICO-8 carts folder. Then load it by typing load item_animation in the command line mode of PICO-8.


item_animation.p8.png 6 kB