Easy way to get 15 free YouTube views, likes and subscribers
Get Free YouTube Subscribers, Views and Likes

Sliding Speed and Speed Conservation

Follow
UncommentatedPannen

I explain the two forms of speed and how they can be used to perform speed conservation.

Mario has two forms of speed: horizontal speed and sliding speed. Horizontal speed measures how fast Mario's moving forwards. Sliding speed measures how fast Mario's moving in the +X and +Z directions. So under most circumstances, sliding speed is just the X and Z components of horizontal speed. Thus, horizontal speed and sliding speed together are redundant, since one can be deduced from the other (given Mario's angle).

Because horizontal speed and sliding speed are redundant, only one of them is ever used at a time. Sliding speed is the one used whenever Mario slides, i.e. crouchslides, bellyslides, buttslides, and slide kicks. Horizontal speed is the one used in all other circumstances. For convenience, we say that the one being used is the dominant one, and the one not being used is the recessive one. On every frame, the dominant one is used to compute the value of the recessive one, though the recessive one is not usually used.

However, when Mario switches between a sliding and nonsliding state, the roles of the two speeds switch, and so the recessive variable's value then becomes relevant. Hence, the recessive speed is kept updated so that it has the correct value for when a switch between the states occurs.

But interestingly, there are two circumstances in which horizontal speed is dominant but sliding speed isn't kept updated. These are while in water and while grabbing a pole. Hence, while in these circumstances, the value of sliding speed retains an old value. And so if Mario transitions from one of these circumstances to a sliding state, then that old value of sliding speed will reemerge. Consequently, Mario is able to conserve his speed from before water/pole to afterwards. In most cases, this is done by simply pressing Z on the frame Mario exits the water/pole.

(Note: When I first observed sliding speed years ago, I didn't exactly know what it was used for. Thus, I just called it "secret speed", which you may have seen in older videos of mine in which I showed the variables I was tracking. Later, Tyler Kehne informed me that it was used specifically for sliding, and so I referred to it as "sliding speed" ever since.)

posted by Grellea1