PICO-8: Simple Item Animation
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
spritesin the order they should be played in the animation.
tickwhich keeps track of how many
_update()ticks have gone by since the last time the animation changed.
anim_speedthat tracks how many
_update()ticks should happen before the animation moves to the next frame.
- The current
framefor the animation.
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.