In turn, for each of their 16x16 blocks, 128x128 chunk definitions have a pair of flags that control their solidity. The first flag makes the block solid from the top, the second flag makes it solid from the sides and from the bottom, and both put together make the block completely solid. SonLVL, a popular level editing program, respectively displays level collision in white, yellow and black, depending on the value of these flags.
Furthermore, each 16x16 block actually picks two collision patterns from the global collision array. By changing which of the two is currently active, the game can essentially set the player on one of two different "paths", which may have distinct solidity. This is what allows loops to work: at the peak of their circumference, the collision is silently swapped, closing off the side from which the player just came, and opening up the path ahead.
Next time, the yellow devil that glues this all together.
No comments:
Post a Comment