
This project is a super fun game/animation that moves to the beat, made as part of Scratchtober. Rhythm is always super fun for me and I love to keep tempo, but keeping rhythm on Scratch is hard. It comes in with built-in music blocks, but those will get desynced even if you tell it to rest for the song's tempo-- because the blocks themselves have processing time, so over time it will get slower and slower. You can try to calculate the block's processing rate and offset from that, but that's clunky and not really guaranteed to work either-- computers process at all different times, and even during normal operation, something can run on one computer at a completely different speed than another computer. I had that problem with a project playing an animation from a list - https://scratch.mit.edu/projects/915925406/ - and that's just accounting for when it's at full speed, never mind the fact that computers can freeze and stutter at any time, which will guarantee a de-sync, as the script stops but the sound doesn't. So I had to edit it to use the timer blocks instead of relying purely on Scratch's processing. A similar thing happened with this. I recently played "Rhythm Forever" and the songs were super cool, but the on-screen animation was always just *slightly* off-beat with the song-- and not always the same amount either, always a slightly different amount, so you can't get used to it. That project is very complex, but this project uses a very simple system which *should* keep things in-beat. It uses the "timer" blocks and simply multiplies by the total number of beats and knows exactly how much time to wait. Instead of using "wait X seconds", use "wait until timer > x". That's guaranteed to work no matter how much you lag, as any desync will self-correct. If the sound is desynced for any reason, usually just clicking the green flag twice will be enough to fix it. Originally a game, now a game/animation. Pop the bubbles to make them disappear, or let them pop on their own. Music: Za-Chary - Oak Leaf Rag Bubble sprite by chrisg