Gravity: Difference between revisions
(Filling out the gravity page/creating it.) |
AgentMuffin (talk | contribs) No edit summary |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
Gravity is the | '''Gravity''' is a force that draws matter together, which in everyday life causes objects to accelerate down towards the Earth's center of mass. Simulation of gravity in ''[[Super Mario 64]]'' is less consistent than real life and depends significantly on the object and the situation. This could be an acceleration or more of a velocity depending on the situation. | ||
== Mario == | == Mario == | ||
Mario generally does a series of checks and changes his velocity depending on the situation. Once Mario performs any changes to his vertical speed, he is done with gravity and applies no more changes. | [[Mario]] generally does a series of checks and changes his velocity depending on the situation. Once Mario performs any changes to his vertical speed, he is done with gravity and applies no more changes. As such, at the end of each main condition branch, Mario explicitly skips the rest of the gravity checks, making them mutually exclusive. | ||
# If Mario is in the [[twirling]] action and has negative Y-speed: | # If Mario is in the [[twirling]] [[action]] and has negative Y-speed: | ||
## If Mario is spinning with a yaw speed faster than 1024: | ## If Mario is spinning with a yaw speed faster than 1024: | ||
##* Mario's terminal velocity is set to | ##* Mario's terminal velocity is set to −75 × 1024 / Mario's yaw speed. | ||
##* Mario's vertical speed is increased by | ##* Mario's vertical speed is increased by −4 × 1024 / Mario's yaw speed. | ||
## Otherwise: | ## Otherwise: | ||
##* Mario's terminal velocity is set to | ##* Mario's terminal velocity is set to −75. | ||
##* Mario's vertical speed is decreased by 4. | ##* Mario's vertical speed is decreased by 4. | ||
## | ## Mario's vertical speed is {{w|Clamp (function)|clamped}} to the terminal velocity. | ||
# | # Or, if Mario is in the [[Shot From Cannon|shot from cannon]] action: | ||
## Mario's vertical speed is decreased by 1. | ## Mario's vertical speed is decreased by 1. | ||
## | ## Mario's vertical speed is clamped to −75. | ||
# | # Or, if Mario is in the [[Long Jump|long jump]], [[Slide Kick|slide kick]], or [[BBH Enter Spin|BBH enter spin]] actions: | ||
## Mario's vertical speed is decreased by 2. | ## Mario's vertical speed is decreased by 2. | ||
## | ## Mario's vertical speed is clamped to −75. | ||
# | # Or, if Mario is in the [[Lava Boost|lava boost]] or [[Fall From Star Grab|fall from star grab]] actions: | ||
## Mario's vertical speed is decreased by 3.2. | ## Mario's vertical speed is decreased by 3.2. | ||
## | ## Mario's vertical speed is clamped to −65. | ||
# | # Or, if Mario is in the [[Getting Blown|getting blown]] action: | ||
## Mario's vertical speed is decreased by his <code>unkC4</code>, some number that is set elsewhere.{{clarify|elaborate when documented}} | |||
## Mario's vertical speed is decreased by some number that is set elsewhere. | ## Mario's vertical speed is clamped to −75. | ||
## | # Or, if Mario has the <code>0x100</code> flag, his action does not have the "invulnerable" or "intangible" but has the "control jump height" action flags, his vertical speed is more than 20, and A is not held: | ||
# | |||
## Mario's vertical speed is set to a quarter of its value. | ## Mario's vertical speed is set to a quarter of its value. | ||
# | # Or, if Mario's action has the "metal water" flag ([[Metal Cap]] and underwater): | ||
## Mario's vertical speed is decreased by 1.6. | ## Mario's vertical speed is decreased by 1.6. | ||
## | ## Mario's vertical speed is clamped to −16. | ||
# | # Or, if Mario has the [[Wing Cap]], A is held, and Mario's vertical speed is negative: | ||
## Mario's animation is changed{{clarify}} | |||
## Mario's animation is changed | |||
## Mario's vertical speed is decreased by 2. | ## Mario's vertical speed is decreased by 2. | ||
## If Mario's vertical speed is less than | ## If Mario's vertical speed is less than −37.5, it is increased by 4. | ||
## | ##* Then it is clamped to −37.5. | ||
# | # Or, if none of the other branch conditions were true: | ||
## Mario's vertical speed is decreased by 4. | ## Mario's vertical speed is decreased by 4. | ||
## | ## Mario's vertical speed is clamped to −75. | ||
[[Category:Action Mechanics]] | |||
Latest revision as of 07:16, 24 May 2026
Gravity is a force that draws matter together, which in everyday life causes objects to accelerate down towards the Earth's center of mass. Simulation of gravity in Super Mario 64 is less consistent than real life and depends significantly on the object and the situation. This could be an acceleration or more of a velocity depending on the situation.
Mario
Mario generally does a series of checks and changes his velocity depending on the situation. Once Mario performs any changes to his vertical speed, he is done with gravity and applies no more changes. As such, at the end of each main condition branch, Mario explicitly skips the rest of the gravity checks, making them mutually exclusive.
- If Mario is in the twirling action and has negative Y-speed:
- If Mario is spinning with a yaw speed faster than 1024:
- Mario's terminal velocity is set to −75 × 1024 / Mario's yaw speed.
- Mario's vertical speed is increased by −4 × 1024 / Mario's yaw speed.
- Otherwise:
- Mario's terminal velocity is set to −75.
- Mario's vertical speed is decreased by 4.
- Mario's vertical speed is clamped to the terminal velocity.
- If Mario is spinning with a yaw speed faster than 1024:
- Or, if Mario is in the shot from cannon action:
- Mario's vertical speed is decreased by 1.
- Mario's vertical speed is clamped to −75.
- Or, if Mario is in the long jump, slide kick, or BBH enter spin actions:
- Mario's vertical speed is decreased by 2.
- Mario's vertical speed is clamped to −75.
- Or, if Mario is in the lava boost or fall from star grab actions:
- Mario's vertical speed is decreased by 3.2.
- Mario's vertical speed is clamped to −65.
- Or, if Mario is in the getting blown action:
- Mario's vertical speed is decreased by his
unkC4, some number that is set elsewhere.[elaborate when documented] - Mario's vertical speed is clamped to −75.
- Mario's vertical speed is decreased by his
- Or, if Mario has the
0x100flag, his action does not have the "invulnerable" or "intangible" but has the "control jump height" action flags, his vertical speed is more than 20, and A is not held:- Mario's vertical speed is set to a quarter of its value.
- Or, if Mario's action has the "metal water" flag (Metal Cap and underwater):
- Mario's vertical speed is decreased by 1.6.
- Mario's vertical speed is clamped to −16.
- Or, if Mario has the Wing Cap, A is held, and Mario's vertical speed is negative:
- Mario's animation is changed[clarification needed]
- Mario's vertical speed is decreased by 2.
- If Mario's vertical speed is less than −37.5, it is increased by 4.
- Then it is clamped to −37.5.
- Or, if none of the other branch conditions were true:
- Mario's vertical speed is decreased by 4.
- Mario's vertical speed is clamped to −75.