Difference between revisions of "Vertical Speed"

From A complete guide to Super Metroid speedrunning
Jump to: navigation, search
(Directly adding Galamoz' jump speed chart, and linking FreyasSpirit's writeup)
m (fun facts on shinespark subpixel)
 
(5 intermediate revisions by 3 users not shown)
Line 15: Line 15:
 
Crouching before jumping will cause Samus to begin her jump eight pixels higher than if she did not crouch.
 
Crouching before jumping will cause Samus to begin her jump eight pixels higher than if she did not crouch.
  
 +
[[Moonfall]] is a glitch that underflows the fall speed, allowing you to continuously gain speed without hitting the cap. When doing a moonfall, the address used for direction has a value of 0.
  
 +
The below give values in the various mediums of (air, water, lava/acid). For water and lava/acid, it should be assumed Samus does not have Gravity Suit equipped:  With Gravity Suit, these mediums behave as air (for purposes of vertical speed).
  
 
== Speed Values ==
 
== Speed Values ==
  
'''Falling'''
+
'''Acceleration'''
 +
 
 +
In the various mediums of (air, water, lava/acid), Samus experiences a different acceleration. This changes Samus' speed downwards by this same amount every frame. There are a couple exceptions, for example if she is at her fall speed cap (see next section) or when changing directions (where her speed is first zeroed).
  
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
  |-
 
  |-
  ! Movement !! Amount !! Ramp !! Notes
+
  ! Region !! Medium !! Acceleration
 +
|-
 +
| NTSC || Air || 0.07168
 +
|-
 +
| NTSC || Water || 0.02048
 +
|-
 +
| NTSC || Lava/acid || 0.02304
 +
|-
 +
| PAL || Air || 0.10240
 +
|-
 +
| PAL || Water || 0.02457
 
  |-
 
  |-
  | Falling || 5.02048 || 46 || 7168 subpixel increase per frame
+
  | PAL || Lava/acid || 0.02764
 
|}
 
|}
  
  
 +
'''Falling'''
 +
 +
When falling, there is a maximum fall speed allowed for the pixel value. If Samus' fall speed hits this pixel value, falling further will not increase speed. The fall speed cap ignores subpixel. Since Samus' speed is usually zeroed upon hitting the peak, there is a "usual" value for the subpixel at the fall speed cap. This can be different, though:  For example, if Samus falls from air into water, the subpixel will most likely be different.
 +
 +
On NTSC, the fall speed cap is 5 pixels. On PAL, the fall speed cap is 6 pixels.
  
'''Falling (underwater without [[Gravity Suit]] equipped)'''
+
Since there is a "usual" subpixel value for the fall speed cap, these are recorded below. These are, in essence, when falling from zero speed while fully immersed in the medium.
  
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
  |-
 
  |-
  ! Movement !! Amount !! Ramp !! Notes
+
  ! Region !! Medium !! Usual Fall Speed Cap !! Ramp
 
  |-
 
  |-
  | Falling || 5 || 60 || 2048 subpixel increase per frame
+
  | NTSC || Air || 5.02048 || 46
 +
|-
 +
| NTSC || Water || 5.00000 || 160
 +
|-
 +
| NTSC || Lava/acid || 5.01792 || 143
 +
|-
 +
| PAL || Air || 6.06144 || 39
 +
|-
 +
| PAL || Water || 6.02361 || 161
 +
|-
 +
| PAL || Lava/acid || 6.02036 || 143
 
|}
 
|}
  
  
 +
'''Rising'''
 +
 +
For jumping, [[Space Jump]] and [[Spring Ball]] behave as if jumping from the ground (even if performing a mid-air spring ball jump). A [[walljump]], though, is slightly different.
  
'''Rising'''
+
Note with [[Speed Booster]] equipped, jumping with a non-zero dash speed changes the initial velocity. The relationship is somewhat complicated, see the next section.
 
   
 
   
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
  |-
 
  |-
  ! Movement !! Amount !! Ramp !! HGBFS !! Notes
+
  ! Region !! Medium !! Jump type !! Velocity !! Ramp !! HGBFS
 
  |-
 
  |-
  | Jump / [[Space Jump]] || 4.57344 || 46 || 111.06144 || Same values apply to [[Spring Ball]]
+
  | NTSC || Air || Normal || 4.57344 || 46 || 111.06144
 
  |-
 
  |-
  | Jump / [[Space Jump]] ([[Hi-Jump Boots]]) || 6.00000 || 56 || 167.37888 || Same values apply to [[Spring Ball]]
+
  | NTSC || Air || Hi-Jump || 6.00000 || 56 || 167.37888
 
  |-
 
  |-
  | [[Walljump]] || 4.40960 || 44 || 101.58368 ||
+
  | NTSC || Air || Walljump || 4.40960 || 44 || 100.07168
 
  |-
 
  |-
  | [[Walljump]] ([[Hi-Jump Boots]]) || 5.32768 || 52 || 140.62464 ||
+
  | NTSC || Air || Walljump with Hi-Jump || 5.32768 || 52 || 141.03072
 
  |-
 
  |-
  | [[Bomb Jump]] || 2.49152 || 27 || 34.62464 ||
+
  | NTSC || Air || [[Bomb Jump]] || 2.49152 || 27 || 35.62464
 
  |-
 
  |-
  | [[Shinespark]] || 14.? || 2 || N/A || 7.07168 for first frame, then 14.? for all frames after (before crashing occurs); subpixel speed per frame is either random or uses an indiscernible pattern
+
  | NTSC || Water || Normal || 1.49152 || 56 || 49.57344
 +
|-
 +
| NTSC || Water || Hi-Jump || 2.32768 || 80 || 101.16384
 +
|-
 +
| NTSC || Water || Walljump || 0.16384 || 8 || 1.08192
 +
|-
 +
| NTSC || Water || Walljump with Hi-Jump || 0.32768 || 16 || 4.16384
 +
|-
 +
| NTSC || Water || [[Bomb Jump]] || 0.04096 || 2 || 0.06144
 +
|-
 +
| NTSC || Lava/acid || Normal || 2.49152 || 80 || 108.61184
 +
|-
 +
| NTSC || Lava/acid || Hi-Jump || 3.32768 || 101 || 175.64000
 +
|-
 +
| NTSC || Lava/acid || Walljump || 2.40960 || 76 || 99.20736
 +
|-
 +
| NTSC || Lava/acid || Walljump with Hi-Jump || 3.32768 || 101 || 175.64000
 +
|-
 +
| NTSC || Lava/acid || [[Bomb Jump]] || 0.04096 || 3 || 0.05888
 +
|-
 +
| PAL || Air || Normal || 5.55552 || 39 || 112.24064
 +
|-
 +
| PAL || Air || Hi-Jump || 7.13056 || 48 || 169.29952
 +
|-
 +
| PAL || Air || Walljump || 5.25600 || 36 || 101.16384
 +
|-
 +
| PAL || Air || Walljump with Hi-Jump || 6.28928 || 43 || 142.39680
 +
|-
 +
| PAL || Air || [[Bomb Jump]] || 3.19456 || 23 || 36.28672
 +
|-
 +
| PAL || Water || Normal || 2.06400 || 57 || 59.48028
 +
|-
 +
| PAL || Water || Hi-Jump || 3.00000 || 82 || 121.34712
 +
|-
 +
| PAL || Water || Walljump || 0.19456 || 9 || 1.21316
 +
|-
 +
| PAL || Water || Walljump with Hi-Jump || 0.39168 || 17 || 5.04168
 +
|-
 +
| PAL || Water || [[Bomb Jump]] || 0.04864 || 3 || 0.07271
 +
|-
 +
| PAL || Lava/acid || Normal || 3.19456 || 80 || 130.33492
 +
|-
 +
| PAL || Lava/acid || Hi-Jump || 4.13056 || 101 || 211.10104
 +
|-
 +
| PAL || Lava/acid || Walljump || 3.06964 || 75 || 119.06316
 +
|-
 +
| PAL || Lava/acid || Walljump with Hi-Jump || 4.13056 || 100 || 211.10104
 +
|-
 +
| PAL || Lava/acid || [[Bomb Jump]] || 0.04864 || 3 || 0.06964
 +
|-
 +
| Any || Any || [[Shinespark]] || 14.xxxxx || 2 || N/A
 
|}
 
|}
  
 +
Note shinesparks have a cap on the pixel value of 14 (in both NTSC and PAL, in any medium). The first frame will be 7 pixels, and all remaining will be 14 pixels. The subpixel, though, continues to accelerate with a quadratic relationship with respect to the given acceleration values in region and medium above. Thus, for example, on NTSC in air, the subpixel acceleration is:  7168, 14336, 21504, 28672... This gives subpixel veloctiy values of 7168, 21504, 43008, 6144... For most RTA purposes, this is effectively random:  Some frames will move Samus 14 pixels, and some 15 pixels.
  
 +
The subpixel pattern does follow a closed loop, readily determined by the above. The length of the loop is as follows:
  
'''Rising (underwater without Gravity Suit equipped)'''
 
 
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
{| class="wikitable sortable" style="text-align:center" cellpadding="20"
 
  |-
 
  |-
  ! Movement !! Amount !! Ramp !! HGBFS !! Notes
+
  ! Region !! Medium !! Jerk (subpixels) !! Length of loop (frames) !! Distance before next loop (pixels)
 +
|-
 +
| NTSC || Air || 7168 || 128 || 1848
 
  |-
 
  |-
  | Jump || 1.49152 || ? || ? ||  
+
  | NTSC || Water || 2048 || 64 || 920
 
  |-
 
  |-
  | Jump ([[Hi-Jump Boots]]) || ? || ? || ? ||  
+
  | NTSC || Lava/acid || 2304 || 512 || 7416
 
  |-
 
  |-
  | [[Walljump]] || ? || ? || ? ||  
+
  | PAL || Air || 10240 || 64 || 920
 
  |-
 
  |-
  | [[Walljump]] ([[Hi-Jump Boots]]) || ? || ? || ? ||  
+
  | PAL || Water || 2457 || 131072 || 1900536
 
  |-
 
  |-
  | [[Shinespark]] || 14.? || 2 || N/A || 7.07168 for first frame, then 14.? for all frames after (before crashing occurs); subpixel speed per frame is either random or uses an indiscernible pattern
+
  | PAL || Lava/acid || 2764 || 32768 || 475128
 
|}
 
|}
  
 
== Compared with Run Speed ==
 
== Compared with Run Speed ==
  
[[File:GalamozJumpSpeed.png]]
+
[[File:GalamozJumpSpeed.png|617px]]
  
 
[https://pastebin.com/GEyywzs1 Writeup from FreyasSpirit on why this chart is non-linear]
 
[https://pastebin.com/GEyywzs1 Writeup from FreyasSpirit on why this chart is non-linear]

Latest revision as of 16:28, 6 January 2023

Introduction

There are two memory addresses for vertical speed. The first can either have a value of 1 or 2, where 1 is for rising and 2 is for falling. The second is for the vertical speed, and is always used regardless of the first's value.

Rising speed starts with a value which decreases by 7168 subpixels per frame. After the value goes under zero, the first address will switch from 1 to 2, and Samus will start to fall.

The values can be read as "pixels.subpixels."

The maximum amount of subpixels is 65536. You simply divide the decimal (subpixel) amount by 65536 to find the fraction of pixels involved.

"Ramp" means the amount of frames the source takes to reach the amount listed in the column.

"HGBFS" stands for "height gained before falling starts."

Crouching before jumping will cause Samus to begin her jump eight pixels higher than if she did not crouch.

Moonfall is a glitch that underflows the fall speed, allowing you to continuously gain speed without hitting the cap. When doing a moonfall, the address used for direction has a value of 0.

The below give values in the various mediums of (air, water, lava/acid). For water and lava/acid, it should be assumed Samus does not have Gravity Suit equipped: With Gravity Suit, these mediums behave as air (for purposes of vertical speed).

Speed Values

Acceleration

In the various mediums of (air, water, lava/acid), Samus experiences a different acceleration. This changes Samus' speed downwards by this same amount every frame. There are a couple exceptions, for example if she is at her fall speed cap (see next section) or when changing directions (where her speed is first zeroed).

Region Medium Acceleration
NTSC Air 0.07168
NTSC Water 0.02048
NTSC Lava/acid 0.02304
PAL Air 0.10240
PAL Water 0.02457
PAL Lava/acid 0.02764


Falling

When falling, there is a maximum fall speed allowed for the pixel value. If Samus' fall speed hits this pixel value, falling further will not increase speed. The fall speed cap ignores subpixel. Since Samus' speed is usually zeroed upon hitting the peak, there is a "usual" value for the subpixel at the fall speed cap. This can be different, though: For example, if Samus falls from air into water, the subpixel will most likely be different.

On NTSC, the fall speed cap is 5 pixels. On PAL, the fall speed cap is 6 pixels.

Since there is a "usual" subpixel value for the fall speed cap, these are recorded below. These are, in essence, when falling from zero speed while fully immersed in the medium.

Region Medium Usual Fall Speed Cap Ramp
NTSC Air 5.02048 46
NTSC Water 5.00000 160
NTSC Lava/acid 5.01792 143
PAL Air 6.06144 39
PAL Water 6.02361 161
PAL Lava/acid 6.02036 143


Rising

For jumping, Space Jump and Spring Ball behave as if jumping from the ground (even if performing a mid-air spring ball jump). A walljump, though, is slightly different.

Note with Speed Booster equipped, jumping with a non-zero dash speed changes the initial velocity. The relationship is somewhat complicated, see the next section.

Region Medium Jump type Velocity Ramp HGBFS
NTSC Air Normal 4.57344 46 111.06144
NTSC Air Hi-Jump 6.00000 56 167.37888
NTSC Air Walljump 4.40960 44 100.07168
NTSC Air Walljump with Hi-Jump 5.32768 52 141.03072
NTSC Air Bomb Jump 2.49152 27 35.62464
NTSC Water Normal 1.49152 56 49.57344
NTSC Water Hi-Jump 2.32768 80 101.16384
NTSC Water Walljump 0.16384 8 1.08192
NTSC Water Walljump with Hi-Jump 0.32768 16 4.16384
NTSC Water Bomb Jump 0.04096 2 0.06144
NTSC Lava/acid Normal 2.49152 80 108.61184
NTSC Lava/acid Hi-Jump 3.32768 101 175.64000
NTSC Lava/acid Walljump 2.40960 76 99.20736
NTSC Lava/acid Walljump with Hi-Jump 3.32768 101 175.64000
NTSC Lava/acid Bomb Jump 0.04096 3 0.05888
PAL Air Normal 5.55552 39 112.24064
PAL Air Hi-Jump 7.13056 48 169.29952
PAL Air Walljump 5.25600 36 101.16384
PAL Air Walljump with Hi-Jump 6.28928 43 142.39680
PAL Air Bomb Jump 3.19456 23 36.28672
PAL Water Normal 2.06400 57 59.48028
PAL Water Hi-Jump 3.00000 82 121.34712
PAL Water Walljump 0.19456 9 1.21316
PAL Water Walljump with Hi-Jump 0.39168 17 5.04168
PAL Water Bomb Jump 0.04864 3 0.07271
PAL Lava/acid Normal 3.19456 80 130.33492
PAL Lava/acid Hi-Jump 4.13056 101 211.10104
PAL Lava/acid Walljump 3.06964 75 119.06316
PAL Lava/acid Walljump with Hi-Jump 4.13056 100 211.10104
PAL Lava/acid Bomb Jump 0.04864 3 0.06964
Any Any Shinespark 14.xxxxx 2 N/A

Note shinesparks have a cap on the pixel value of 14 (in both NTSC and PAL, in any medium). The first frame will be 7 pixels, and all remaining will be 14 pixels. The subpixel, though, continues to accelerate with a quadratic relationship with respect to the given acceleration values in region and medium above. Thus, for example, on NTSC in air, the subpixel acceleration is: 7168, 14336, 21504, 28672... This gives subpixel veloctiy values of 7168, 21504, 43008, 6144... For most RTA purposes, this is effectively random: Some frames will move Samus 14 pixels, and some 15 pixels.

The subpixel pattern does follow a closed loop, readily determined by the above. The length of the loop is as follows:

Region Medium Jerk (subpixels) Length of loop (frames) Distance before next loop (pixels)
NTSC Air 7168 128 1848
NTSC Water 2048 64 920
NTSC Lava/acid 2304 512 7416
PAL Air 10240 64 920
PAL Water 2457 131072 1900536
PAL Lava/acid 2764 32768 475128

Compared with Run Speed

GalamozJumpSpeed.png

Writeup from FreyasSpirit on why this chart is non-linear

See also