Sleeping


I explain how sleeping works in SM64 and what conditions must be met in order for it to happen. You see, when Mario stands still, he turns his head left and right repeatedly. After 10 complete cycles of this, Mario falls asleep, assuming all conditions are met. There are four main conditions:
(1) Mario must be doing the head-turning animation. This excludes standing on toxic gas, standing in quicksand, and having low health.
(2) Mario cannot be in a cold course. This includes CCM, SL, and WMotR.
(3) Mario cannot be standing on an object. He must be standing on a floor triangle that’s part of the course geometry.
(4) The floor height 60 units behind Mario must be within 24 units of Mario’s height.

For the record, the two variables shown in the video were:
Head Turning Phase: short at 00C26C0A
Completed Head Turning Cycles: short at 00C26C08

Big thanks to Peter Fedak who looked into the game’s code, dissected the sleep function, and then told me all of the conditions required for falling asleep. You can find Peter’s channel here: https://www.youtube.com/channel/UCQUbI9jNfYWx0nPt_LxClHg

No Responses to “Sleeping”

Post a Comment