Actions

Difference between revisions of "SPG:Underwater"

From Sonic Retro

(Cleanup and consistency, added SPG table of contents)
(Streamlined page layout, and added speed values for being hurt)
Line 4: Line 4:
 
*''When [[Sonic]] is underwater he moves much more slowly, but otherwise his physics are largely the same.  This is achieved mostly by halving the pertinent variables, but some, like gravity and initial jump velocity, are not exactly half.''
 
*''When [[Sonic]] is underwater he moves much more slowly, but otherwise his physics are largely the same.  This is achieved mostly by halving the pertinent variables, but some, like gravity and initial jump velocity, are not exactly half.''
  
==Variables==
+
==Underwater Constants==
 +
  acceleration_speed: 0.0234375 (half of 0.046875)
 +
  deceleration_speed: 0.25 (half of 0.5)
 +
  friction_speed:  0.0234375 (half of 0.046875)
 +
  top_speed: 3 (half of 6)
 +
 
 +
  air_acceleration_speed:  0.046875 (half of 0.09375)
 +
 
 +
  roll_friction_speed: 0.01171875 (half of 0.0234375)
 +
  roll_deceleration_speed: 0.125 (unchanged)
  
===Acceleration===
+
  gravity_force: 0.0625 (instead of 0.21875)
 +
  jump_force: 3.5  (3 for knuckles) (instead of 6.5  (6 for knuckles))
 +
  jump_release: -2 (instead of -4)
  
Acceleration has a value half that of normal: 0.0234375.
+
==Getting Hit==
 
+
When [[SPG:Getting_Hit|getting hit]] underwater, the Player will fly back with an X Speed of 1 (or -1) and a Y Speed of -2, half that of normal.
===Deceleration===
 
 
 
Deceleration has a value half that of normal: 0.25.
 
 
 
Rolling deceleration remains unchanged.
 
 
 
===Friction===
 
 
 
Friction has a value half that of normal: 0.0234375.
 
 
 
Rolling friction has a value of 0.01171875.
 
 
 
===Top Speed===
 
 
 
Sonic's top running speed is 3, half that of normal.
 
 
 
===Air Acceleration===
 
 
 
Sonic's air acceleration behaves the same way, but has a value of 0.046875, half that of normal.
 
 
 
===Gravity===
 
 
 
Gravity is 0.0625, instead.  This causes Sonic to fall much more slowly.
 
 
 
===Jump Velocity===
 
 
 
Inital jump velocity is equal to -3.5 (-3 for Knuckles), and release velocity is equal to -2.
 
  
 
==Bubbles==
 
==Bubbles==
  
When Sonic gets a bubble underwater, his X speed and Y speed are both set to 0.
+
When the Player gets a bubble underwater, their X Speed and Y Speed are both set to 0.
  
 
==Entry & Exit==
 
==Entry & Exit==
  
When Sonic hits the water, his X speed is multiplied by 0.5 and his Y speed is multiplied by 0.25 (this occurs after gravity is added). Conversely, when Sonic leaps out of the water, his Y speed is doubled (after water gravity has been added), so that he begins moving faster now that water no longer impedes his movement (however, X speed is ''not'' affected when leaving the water).
+
When the Player enters the water, their X Speed is multiplied by 0.5 and their Y Speed is multiplied by 0.25 (this occurs after ''gravity_force'' is added to Y Speed).  
 +
Conversely, when the Player exits the water, their Y Speed is doubled (after water ''gravity_force'' has been added), (however, X Speed is ''not'' affected when leaving the water).
  
 
==Drowning==
 
==Drowning==
  
When Sonic drowns, his X speed and Y speed are both set to 0, and the water gravity remains normal.
+
When the Player drowns, their X Speed and Y Speed are both set to 0, and the ''gravity_force'' remains set to the lower water gravity.
  
 
==Speed Shoes==
 
==Speed Shoes==
Line 56: Line 41:
 
==Animation Speeds==
 
==Animation Speeds==
  
Being submerged doesn't affect the speed of Sonic's animations at all. Animations whose speeds are proportional to variables which are otherwise affected, such as Sonic's velocity, will be attenuated by the same proportion automatically.
+
Being submerged doesn't affect the speed of the Player's animations at all. [[SPG:Animations#Variable_Speed_Animation_Timings|Variable Speed Animations]] will be attenuated by the same proportion automatically.
  
 
[[Category:Sonic Physics Guide|Underwater]]
 
[[Category:Sonic Physics Guide|Underwater]]

Revision as of 09:02, 14 February 2023

Sonic Physics Guide
Collision
Physics
Gameplay
Presentation
Special

Notes:

  • The research applies to all four of the Sega Mega Drive games and Sonic CD.
  • When Sonic is underwater he moves much more slowly, but otherwise his physics are largely the same. This is achieved mostly by halving the pertinent variables, but some, like gravity and initial jump velocity, are not exactly half.

Underwater Constants

 acceleration_speed: 0.0234375 (half of 0.046875)
 deceleration_speed: 0.25 (half of 0.5)
 friction_speed:  0.0234375 (half of 0.046875)
 top_speed: 3 (half of 6)
 
 air_acceleration_speed:  0.046875 (half of 0.09375)
 
 roll_friction_speed: 0.01171875 (half of 0.0234375)
 roll_deceleration_speed: 0.125 (unchanged)
 gravity_force: 0.0625 (instead of 0.21875)
 jump_force: 3.5  (3 for knuckles) (instead of 6.5  (6 for knuckles))
 jump_release: -2 (instead of -4)

Getting Hit

When getting hit underwater, the Player will fly back with an X Speed of 1 (or -1) and a Y Speed of -2, half that of normal.

Bubbles

When the Player gets a bubble underwater, their X Speed and Y Speed are both set to 0.

Entry & Exit

When the Player enters the water, their X Speed is multiplied by 0.5 and their Y Speed is multiplied by 0.25 (this occurs after gravity_force is added to Y Speed). Conversely, when the Player exits the water, their Y Speed is doubled (after water gravity_force has been added), (however, X Speed is not affected when leaving the water).

Drowning

When the Player drowns, their X Speed and Y Speed are both set to 0, and the gravity_force remains set to the lower water gravity.

Speed Shoes

When in possession of Speed Shoes, but also underwater, the underwater variables take over, effectively nullifying the Speed Shoes altogether. No calculations, such as multiplying by 0.5, take place.

Animation Speeds

Being submerged doesn't affect the speed of the Player's animations at all. Variable Speed Animations will be attenuated by the same proportion automatically.