A jump sets Banjo's vertical speed to 710 units/s (610 from water) and his gravity to −1350 units/s², half the usual −2700, and sets his horizontal speed at once to the target speed the stick gives on the ground (banjo-kazooie/walking-speed). On a frame of the jump with A up while he still rises, bsjump_update resets the gravity to −2700 for the rest of the jump; nothing sets −1350 again, and with A held the lighter gravity lasts past the peak. Until Banjo has learned the ability the code names ABILITY_A_HOLD_A_JUMP_HIGHER, it resets the gravity every frame. A jump entered from a peck sets neither the speed nor the gravity. A take-off from a spring pad sets a flag that skips the reset; the first frame with A up clears it after the check, so the reset starts the frame after. While that flag is set, the jump's second phase turns into the Shock Spring Jump's charge (BS_21_BSHOCK_CHARGE). Leaving the jump state for anything but a peck restores −2700. Computed without the frame steps, a held jump rises about 187 units in 0.53 s, and one released at once about 93. Super Mario 64 instead adds a quarter of the forward speed to its take-off (sm64/jump-speed) and divides the rise by 4 on each frame A is up while Mario rises faster than 20 units/frame (sm64/jump-release). | src/game/mario.c L821–826src/game/mario_step.c L559–560src/game/mario_step.c L528–529 | Code |
With the Feathery Flap learned, A pressed during a jump or a fall starts it, once per time in the air: the flag it sets clears only on stable ground, while climbing, or in water, and a peck in the air blocks it. It stops Banjo's rise (vertical speed 0, gravity −1100 units/s²); when the opening animation reaches 0.9 of its length, it sets him rising at 280 units/s with his fall capped at −399.9, against the usual cap of −4000. A let go in the first 0.67 s of the flap, counted from its start through the opening animation by D_8037D308 (the atlas's reading of that unnamed variable as elapsed time), does nothing; after that, A up restores the usual gravity and cap. A 2.5-second timer ends the flap in any case. Once D_8037D301, which counts the frames the flap animation passes 0.9 of its length from the lift on (the atlas reads it as a loop count), reaches 4, holding A scales the target horizontal speed to 0.35 of what the stick gives. Super Mario 64's act_jump checks B and Z but not A; its second jump comes from a press during a landing (sm64/double-jump). | src/game/mario_actions_airborne.c L446–453src/game/mario_actions_airborne.c L108–110 | Code |
With the Beak Buster learned, Z pressed during a jump (or in the air in another state) starts it. Banjo stops dead: his velocity, his target horizontal speed, and his gravity all go to 0, and he hangs until the opening stretch of his animation stops and then one more frame. Then he pops up at 2300 units/s under a gravity of −20000 units/s², 7.4 times the usual −2700 (computed), with his fall capped at −5000 instead of −4000. Water ends the move at any phase. When he lands (stable ground, an unnamed flag BA_FLAG_8, or four frames in a row with under 1 unit of an unnamed vertical measure from func_8029445C), a landing with fall damage goes to a splat (BS_72_SPLAT); otherwise his speed and gravity go to 0 for 0.09 s; then he bounces up at 730 units/s under −2110, or at 400 under −800 if the Beak Buster hit an object whose marker id is 0x9E or 0xA1, which the hit kills. Super Mario 64's ground pound has no upward pop: Mario rises at most 110 units over 10 frames while he holds, then falls from −50 units/frame (sm64/ground-pound). | src/game/mario_actions_airborne.c L924–935 | Code |
On the ground the stick's tilt sets Banjo's target speed in five bands of the stick's distance from center, each axis clamped to a raw 7 to 59 (x) or 7 to 61 (y) and scaled to 0 to 1, and the distance capped at 1. Up to 0.12 the target is 0; above it the target rises linearly within each band: 30 to 80 units/s up to 0.2, 80 to 150 up to 0.5, 150 to 225 up to 0.75, and 225 to 500 at full tilt. The decompilers name the bands creep, slow walk, walk, and fast walk. On ground flagged BA_FLAG_13_TOUCHING_DANGEROUS_GROUND, the target is instead 30 to 150 by the distance itself, and 0 inside the 0.12 dead zone. Each frame the horizontal velocity closes the gap to the target by a fraction from a five-entry table (0, 0.07, 0.29, 0.15, 0.05) indexed by the unnamed D_8037C284 (the atlas reads the index as a movement state), unless func_8029CF48 has set an override for that index, which func_8029CED0 then returns instead, times the frame's time over 1/30 s; when an unnamed floor check (func_80294548) passes, the target is first scaled by the slope. Super Mario 64's target is 32 times the square of the tilt, and Mario gains a fixed 1.1 − speed/43 units/frame below it (sm64/walking-speed). | src/game/mario.c L1295–1298src/game/mario_actions_moving.c L450–453 | Code |
Super Mario 64 keeps Mario's speeds as floats in world units per frame: perform_air_step moves him a quarter of his velocity in each of four quarter steps. A frame waits for two vertical blanks in display_and_vsync, so on an NTSC console the game runs at most 30 frames a second. | src/game/mario_step.c L618–621src/game/game_init.c L372–375src/game/main.c L428–433 | Code |
| A single jump sets Mario's vertical speed to 42 plus a quarter of his forward speed, in units per frame, and multiplies the forward speed by 0.8. | src/game/mario.c L763–766src/game/mario.c L821–826 | Code |
| Mario's usual gravity subtracts 4 units/frame from his vertical speed each frame, down to a fastest fall of −75. The long jump and the slide kick use 2 instead, with the same cap. | src/game/mario_step.c L575–580src/game/mario_step.c L543–548src/game/mario_step.c L646–648 | Code |
Releasing A cuts a jump short: on a frame with A up and the rise above 20 units/frame, apply_gravity divides the vertical speed by 4 instead of subtracting gravity. Only actions flagged ACT_FLAG_CONTROL_JUMP_HEIGHT do this, among them the single and double jumps and the wall kick; the triple jump, backflip, and side flip lack the flag and keep their full height. The check also needs a flag that every airborne action sets and bouncing off an enemy clears. | src/game/mario_step.c L519–533src/game/mario_step.c L559–560include/sm64.h L256–263src/game/mario.c L887–888src/game/interaction.c L515–519 | Code |
A press while Mario lands from a jump or a fall starts a double jump, at 52 units/frame plus a quarter of his forward speed. The landing lasts 4 frames, and each of them sets doubleJumpTimer to 5; that timer counts down once a frame, and while it runs a press from the stop action that follows the landing still double-jumps, because set_jump_from_landing checks the timer and the previous action. With the stick held, the stop action turns into walking at once, and walking's previous action is the stop, so only a Mario standing still can double-jump after the 4-frame landing. | src/game/mario.c L785–788src/game/mario_actions_moving.c L26–32src/game/mario_actions_moving.c L1767–1783src/game/mario.c L1411–1413src/game/mario_actions_stationary.c L848–850src/game/mario.c L1030–1043src/game/mario_actions_stationary.c L856–857src/game/mario.c L1124–1125src/game/mario.c L1006–1007src/game/mario_actions_moving.c L791–792 | Code |
A press while Mario lands from a double jump starts a triple jump if his forward speed is above 20 units/frame, and a single jump otherwise. With the wing cap, the press always starts a different action, the flying triple jump (ACT_FLYING_TRIPLE_JUMP, 82 units/frame). The triple jump takes off at 69 units/frame whatever the speed, and releasing A doesn't cut it. | src/game/mario_actions_moving.c L1874–1876src/game/mario_actions_moving.c L147–153src/game/mario.c L796–802src/game/mario_actions_moving.c L50–52include/sm64.h L258 | Code |
| Z while running starts a crouch slide, and A in its first 30 frames at a forward speed above 10 units/frame starts a long jump. It takes off at 30 units/frame up and multiplies the forward speed by 1.5, capped at 48; in the air it falls with a gravity of 2 instead of 4. | src/game/mario_actions_moving.c L807–808src/game/mario_actions_moving.c L1459–1463src/game/mario.c L863–873src/game/mario_step.c L543–545 | Code |
| The long jump's cap clips only a forward speed above 48. A backward (negative) speed is multiplied by 1.5 with no limit, which the decompilers' comment names as the cause of backwards long jumps (BLJs). A long jump's landing chains into another long jump on A with Z held. In the air, each frame moves the speed 0.35 toward 0, adds the stick's push (up to 1.5 along Mario's facing), and adds 2 more while it is below −16. This is the US build; the Shindou and iQue builds set a negative speed to 0 when a long jump lands. | src/game/mario.c L868–871src/game/mario_actions_moving.c L46–48src/game/mario_actions_moving.c L1847–1859src/game/mario_actions_airborne.c L223–240 | Code |
A jump that hits a wall at a forward speed above 16 turns Mario around and holds him in ACT_AIR_HIT_WALL. A press on its first 2 frames kicks off the wall. On the 3rd he bonks away, wallKickTimer is set to 5 and counts down once a frame, and A still kicks while it is nonzero: 7 frames in all. The kick takes off at 62 units/frame up and at least 24 forward. | src/game/mario_actions_airborne.c L388–399src/game/mario_actions_airborne.c L1314–1337src/game/mario_actions_airborne.c L1156–1158src/game/mario_actions_airborne.c L1247–1249src/game/mario_actions_airborne.c L1147–1151src/game/mario.c L1407–1409src/game/mario.c L1705–1717src/game/mario.c L828–834 | Code |
| Z in the air starts a ground pound. Mario stops dead and, on each of the first 10 frames (t counting from 0), rises 20 − 2t units, 110 in all, each rise skipped unless his new height plus 160 stays below the ceiling. He holds there until his spin animation ends plus 4 frames; then he falls from −50 units/frame under the usual gravity. | src/game/mario_actions_airborne.c L451–453src/game/mario_actions_airborne.c L924–947src/game/mario_actions_airborne.c L948–951 | Code |
On the ground the stick's tilt sets a target speed: intendedMag is 32 times the square of the tilt's fraction of full. Below the target Mario gains 1.1 − speed/43 units/frame each frame (1.1 from a standstill); above it, on level ground, he loses 1. The target is at most 32, or 24 on slow floors, and the speed is capped at 48. | src/game/mario.c L1295–1298src/game/game_init.c L455–458src/game/mario_actions_moving.c L438–460 | Code |
In the doldecomp decompilation of Super Mario Sunshine, most of Mario's movement constants are named parameters (TParamRT), each built with a default in the code, in sets that each name a file, such as /Mario/Jump.prm. TParams::load, in a file configure.py marks as matching the game's code, reads the set's file from the scene's /map/params folder if it is there and from the params archive if not, and a record whose key and name match a parameter replaces that parameter's default; the rest keep theirs. The values the game plays with are data on the disc, which the atlas hasn't read, so the numbers in these claims are the code's defaults. The jump set's gravity, mGravity, defaults to 0.8. In the jumping states, jumpProcess in the decompilers' Player code, which doesn't yet match, moves Mario by a quarter of his velocity in one step per update. Then fallProcess subtracts mGravity from his vertical speed, except in a dive (the dive set's own gravity, with a cap of its own), in a spin jump's descent (mSpinJumpGravity, default 0.6), and when a release cuts the rise (sms/jump); in every case it then caps the fall at −75. Super Mario 64 also moves Mario a quarter of his velocity at a time, but in four steps a frame (sm64/units). | src/game/mario_step.c L618–621 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, a press that starts a jump through changePlayerJumping first goes to a miss jump if isJumpMiss is true, then to a spin jump if considerRotateJumpStart reads the stick's recent turning as a spin, and otherwise to the status it asks for. For the single jump, MARIO_STATUS_JUMP, setStatusToJumping sets Mario's vertical speed to 42 plus a quarter of his forward speed and multiplies the forward speed by 0.8, constants in the code rather than parameters, and the same take-off as Super Mario 64's single jump (sm64/jump-speed). On two kinds of floor, which the code tells apart only as isThing2 and isThing3, the speed is replaced or added to and the jump becomes MARIO_STATUS_FORCE_JUMP; on Yoshi it is multiplied by the parameter mJumpYoshiMult, and while isSinking() is true both speeds are scaled by a factor from the mGraffitoParams set. When the new jumping status carries the bit the code calls MARIO_STATUS_FLAG_UNK2000000 (0x2000000), as the single jump, the double jump, and the wall kick do, setStatusToJumping sets bit 0x100 of unk78, and it clears that bit for any other jumping status (other code clears it too). While that bit is set, the status has neither bit 0x1000 nor 0x20000, A isn't held, and Mario rises faster than 20, fallProcess multiplies his vertical speed by 0.75 on each update in place of the gravity. Super Mario 64 divides it by 4 on each frame when A isn't held and Mario rises faster than 20, if its MARIO_UNKNOWN_08 flag is set, the action is neither intangible nor invulnerable, and the action has ACT_FLAG_CONTROL_JUMP_HEIGHT, the same bit, 0x02000000 (sm64/jump-release). The status numbers line up too: Sunshine's single jump is 0x2000000 | 0x800 | 0x080 (computed 0x2000880), and Super Mario 64's ACT_JUMP is 0x03000880. | src/game/mario.c L821–825src/game/mario.c L763–766src/game/mario_step.c L519–529src/game/mario_step.c L559–560include/sm64.h L165include/sm64.h L256 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, the double jump, the backflip (MARIO_STATUS_BACK_JUMP), the spin jump, and the jumps the code calls trample and wireJumping all land in MARIO_STATUS_SEC_JUMP_SLIP. Its jumpSlipEvents counts updates and ends the landing on the 16th, before reading A, so a press on one of the first 15 (computed) goes to changePlayerJumping, which can still turn it into a miss or spin jump (sms/jump): the triple jump, MARIO_STATUS_ULTRA_JUMP, if the forward speed is at least the parameter mTriJumpEnableSp (default 20), and a single jump if not. The single jump and the wall kick land in MARIO_STATUS_JUMP_SLIP instead, where a press makes a double jump only at a forward speed of at least mSecJumpEnableSp (default 20). The triple jump takes off at mUltraJumpForce plus mUltraJumpSpeedMult times the forward speed (defaults 70 and 0.25) and multiplies the forward speed by mUltraJumpXZMult (default 0.8); its status lacks the bit that lets a release cut the rise. Super Mario 64's triple jump starts from the double jump's 4-frame landing at a forward speed above 20, takes off at 69 whatever the speed, and can't be cut either (sm64/triple-jump, sm64/jump-release). | src/game/mario_actions_moving.c L1874–1875src/game/mario_actions_moving.c L50–51src/game/mario_actions_moving.c L150–151src/game/mario.c L796–798include/sm64.h L258 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, when jumpProcess reports a wall to jumpingBasic during a jump, Mario is knocked back if his forward speed is above the parameter mClashSpeed (default 50) outside the wire roll jump, stops on Yoshi, stops on a wall marked isNoWallJump, and catches a fence (isFence). Otherwise, at a forward speed above 16, he turns about (after playerRefrection) and, against a wall, holds on in MARIO_STATUS_WALL_SLIDE. There stayWall adds 1 to the status timer each update, capped at 60, and 1 more while it is below 20, so he hangs still for 10 updates and then slides down at half the timer: −10.5 on the 11th update, then 0.5 faster each update to −30 (computed). An A press on any update on the wall kicks: startJumpWall turns him about and enters MARIO_STATUS_WALL_JUMP, whose take-off in setStatusToJumping is 62 up and 24 forward, constants in the code; the 52 that startJumpWall writes first is overwritten. Landing or losing the wall ends the hold. Super Mario 64 kicks at the same 62 up and at least 24 forward, and its act_air_hit_wall also writes a 52 that the kick's take-off overwrites, but it holds Mario only 2 frames and then bonks him away, with A still working for 5 more: 7 frames in all (sm64/wall-kick). With no wall to hold, Sunshine bonks him the way Super Mario 64 does: back down at 38 or faster, and at −8 if faster than 8. | src/game/mario_actions_airborne.c L1314–1337src/game/mario_actions_airborne.c L1147–1151src/game/mario.c L1407–1409src/game/mario.c L828–833 | Code notes |