Well, I'm trying to make a rhythm game and I want the enemies to change sprite (To look as they were dancing) and attack following the tempo of the current song. It's my first game and I don't know too much about code or how pico-8 works. I tried to make a T variable that add one to its current value each frame and to use a the "%" operator to sync the frame counter to the beat but it's hard to do it that way and I feel like it doesn't sync too well. Can anyone help me to code it?