Tuesday, August 15, 2017

Contextual graphics, part 1

The capsule near the start of Sandopolis Zone 2 uses graphics which do not reappear until the after the boss fight, and so it would be a waste of VRAM if they were loaded the entire time. So instead, the graphics are loaded on the spot via PLC call, much like we saw before in Marble Garden Zone 2.

Unlike the MGZ2 boss however, which is initially hidden from view, the capsule is immediately visible upon spawn. This makes it unsuitable for the capsule to load its own graphics as it spawns: you would catch the art being decompressed on the fly. The solution the developers found was to place a helper object on the loop above the capsule.


Once the player is within range of the object, it loads the capsule's PLC over the graphics for the Skorp and Sandworm enemies. The object's range is quite generous, though, and it is entirely possible to cause the capsule graphics to load without actually taking the loop. This would normally be fine, since there aren't any enemies in the immediate area.


However! If you push the first door in the level all the way open, and then quickly make your way over to the loop, there should be just enough time for you to step into the helper object's range and make it back to the door before it closes.


By the way, the Sandworm enemy's regular appearance is more than just inspired by the Caterkiller enemy in Sonic 1.

1 comment: