Gravity: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
Gravity is the general idea of accelerating towards a center of mass, often "down". In Mario 64, this 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.
'''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 -75 * 1024 / Mario's yaw speed.
##* 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.
##* Mario's vertical speed is increased by −4 × 1024 / Mario's yaw speed.
## Otherwise:
## Otherwise:
##* Mario's terminal velocity is set to -75.
##* Mario's terminal velocity is set to −75.
##* Mario's vertical speed is decreased by 4.
##* Mario's vertical speed is decreased by 4.
## If Mario's vertical speed is less than his terminal velocity, it is set to the terminal velocity instead.
## Mario's vertical speed is {{w|Clamp (function)|clamped}} to the terminal velocity.
## Mario now stops these gravity checks.
# Or, if Mario is in the [[Shot From Cannon|shot from cannon]] action:
# 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.
## If Mario's vertical speed is less than -75, it is capped/set to -75.
## Mario's vertical speed is clamped to −75.
## Mario now stops these gravity checks.
# Or, if Mario is in the [[Long Jump|long jump]], [[Slide Kick|slide kick]], or [[BBH Enter Spin|BBH enter spin]] actions:
# 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.
## If Mario's vertical speed is less than -75, it is capped/set to -75.
## Mario's vertical speed is clamped to −75.
## Mario now stops these gravity checks.
# Or, if Mario is in the [[Lava Boost|lava boost]] or [[Fall From Star Grab|fall from star grab]] actions:
# 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.
## If Mario's vertical speed is less than -65, it is capped/set to -65.
## Mario's vertical speed is clamped to −65.
## Mario now stops these gravity checks.
# Or, if Mario is in the [[Getting Blown|getting blown]] action:
# 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 unkC4, elaborate when documented -->
## Mario's vertical speed is clamped to &minus;75.
## If Mario's vertical speed is less than -75, it is capped/set 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 now stops these gravity checks.
# If Mario has the 0x100 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.
## Mario now stops these gravity checks.
# Or, if Mario's action has the "metal water" flag ([[Metal Cap]] and underwater):
# 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.
## If Mario's vertical speed is less than -16, it is capped/set to -16.
## Mario's vertical speed is clamped to &minus;16.
## Mario now stops these gravity checks.
# Or, if Mario has the [[Wing Cap]], A is held, and Mario's vertical speed is negative:
# 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 <!-- Elaborate -->
## Mario's vertical speed is decreased by 2.
## Mario's vertical speed is decreased by 2.
## If Mario's vertical speed is less than -37.5, it is increased by 4.
## If Mario's vertical speed is less than &minus;37.5, it is increased by 4.
##* Then if Mario's vertical speed is more than -37.5, it is capped/set to -37.5.
##* Then it is clamped to &minus;37.5.
## Mario now stops these gravity checks.
# Or, if none of the other branch conditions were true:
# If Mario is still in these checks:
## Mario's vertical speed is decreased by 4.
## Mario's vertical speed is decreased by 4.
## If Mario's vertical speed is less than -75, it is capped/set to -75.
## Mario's vertical speed is clamped to &minus;75.
 
[[Category:Action Mechanics]]
[[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.

  1. If Mario is in the twirling action and has negative Y-speed:
    1. 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.
    2. Otherwise:
      • Mario's terminal velocity is set to −75.
      • Mario's vertical speed is decreased by 4.
    3. Mario's vertical speed is clamped to the terminal velocity.
  2. Or, if Mario is in the shot from cannon action:
    1. Mario's vertical speed is decreased by 1.
    2. Mario's vertical speed is clamped to −75.
  3. Or, if Mario is in the long jump, slide kick, or BBH enter spin actions:
    1. Mario's vertical speed is decreased by 2.
    2. Mario's vertical speed is clamped to −75.
  4. Or, if Mario is in the lava boost or fall from star grab actions:
    1. Mario's vertical speed is decreased by 3.2.
    2. Mario's vertical speed is clamped to −65.
  5. Or, if Mario is in the getting blown action:
    1. Mario's vertical speed is decreased by his unkC4, some number that is set elsewhere.[elaborate when documented]
    2. Mario's vertical speed is clamped to −75.
  6. Or, if Mario has the 0x100 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:
    1. Mario's vertical speed is set to a quarter of its value.
  7. Or, if Mario's action has the "metal water" flag (Metal Cap and underwater):
    1. Mario's vertical speed is decreased by 1.6.
    2. Mario's vertical speed is clamped to −16.
  8. Or, if Mario has the Wing Cap, A is held, and Mario's vertical speed is negative:
    1. Mario's animation is changed[clarification needed]
    2. Mario's vertical speed is decreased by 2.
    3. If Mario's vertical speed is less than −37.5, it is increased by 4.
      • Then it is clamped to −37.5.
  9. Or, if none of the other branch conditions were true:
    1. Mario's vertical speed is decreased by 4.
    2. Mario's vertical speed is clamped to −75.