Wednesday, July 19, 2017

Bop it! Twist it! Pull it! Shake it!

When you encounter the Marble Garden Zone 1 miniboss near the start of the level, if you quickly run away as soon as it begins burrowing into the ceiling, you'll get caught in a permanent earthquake until something else causes the screen to stop shaking.


The reason for this should be clear, given what we've learned. The miniboss object has two distinct code paths through which it deletes itself: one for when it's scrolled off-screen and needs to be respawned, and another for when it finishes burrowing into the ceiling and is gone forever.

Unfortunately, both code paths are active at the same time, and the earthquake flag is only cleared when the latter path completes, so if you scroll the object off-screen after the quake starts but before it stops digging, it deletes itself without clearing the flag, which results in endless shaking.

You can confirm this hypothesis by going back to the spot where you encountered the miniboss: the object will respawn because it deleted itself through the on-screen test. If you let it finish digging, then it will no longer appear.

No comments:

Post a Comment