If you’re at all familiar with Super Mario Bros. speedrunning, it’s likely you’ve heard of the “frame rule,” a ubiquitous mathematical constant in the game’s code that also affects coin blocks.

A frame rule is a repeating 21-frame cycle that Super Mario Bros. uses to dictate various aspects of the game. Level transitions, for example, don’t occur until the frame rule counter has rolled over six times, but the current frame rule when a stage is completed doesn’t have to pass completely to be counted. It can be anywhere from its first frame to its twenty-first frame, which means level transitions range from 106 frames (around 1.8 seconds) to 126 frames (around 2.1 seconds).

For more on frame rules and how they affect Super Mario Bros. world records, be sure to check out the below video by Bismuth, another speedrunner. He’s much smarter than I am.

Coin blocks, as Kosmic explains, can only be hit during the 11 ticks of the frame rule counter immediately following Mario’s first interaction with said block. Optimizing the coins you can squeeze out of the block, therefore, follows the opposite principle as shaving off time between level transitions. Instead of trying to complete a stage at the end of a frame rule to save frames, you want to hit the coin block at the beginning of a frame rule to give Mario more time for jumping.

Kosmic calculates that the maximum amount of time to hit a coin block is 230 frames (around 3.8 seconds) after the first hit. Divide that by the 16 frames Mario needs to wait for the block’s animation to play out before it can be hit again, and you get 14 hits. Add that to the one free coin you get at both the beginning and end of this whole sequence (the block remains active until you hit it one more time after its timer ends), and the result is a grand total of 16 coins.

Go ahead and take a breather if you found all that math overwhelming. The rest of this blog will be waiting for you when you get back.