Star Bounce Cancel

From Ukikipedia
Revision as of 05:18, 26 September 2022 by Macrepeh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A star bounce cancel[1] occurs when, over the course of a star spawn cutscene, the spawned star descends by more than 600 units, preventing the star from playing its bouncing animation. Canceling the bounce potentially saves 41 frames over a star spawn cutscene in which the star travels a flat distance.

A star bounce cancel occurs due to the following code interactions:

1) An off-by-one error in the duration of the star's flight causes the star to overshoot its intended position by 1/30th of the distance it traveled. This is typical for a spawning star.

2) The bounce action begins. The bounce action raises and lowers the star in a smooth arc (which can be observed in casual play), and on the first frame, it rises by 20 units. Because of the overshooting, these 20 units are not enough to raise the star above its intended position, even though they usually are.

3) A check is performed to determine whether the star is above or below its intended position. This check normally happens during every frame of the bounce animation to determine when the star has finished bouncing. In this unusual case, the star is found to be below its intended position--this normally only happens when the star has finished bouncing.

4) Because this check determines when a star has finished bouncing, the bounce animation ends, even though the star is rising instead of falling.

Star bounce reduction

When a spawned star descends by more than 300 units (up to 600), the star bounce animation is not stopped on the first frame. Instead, it ends two frames earlier than a full-length star spawn cutscene.

References