MZM: Things You Don't Need to Know

On an unrelated note, P2D and MHQ should merge so I don’t keep copying and pasting all my topics.

Here is some data I’ve gathered about the MZM physics engine over the last few days.

MZM’s position variable accuracy is 1/4 pixel.
The horizontal speed values are 32 = 1 px/fm. (That means 8 speed units = 1 positional unit per frame.)
Most speeds increase by 8/fm and drop by 10/fm.
Normal jumps decelerate horizontally at the rate of 8/fm.
Samus’s normal run speed is 96.
It takes 144 frames for Speed Boost to kick in fully, at which point Samus’s speed is 160.

Positional units per frame when Samus is moving up/down slopes:
8x8 going up 45 degree
9x4 or 9x5 going up 26.565 degree
12x0 on flat ground
12x6 going down 26.565 degree
12x12 going down 45 degree
And when speed boosting:
12x12 going up 45 degree
16x8 going up 26.565
20x0 on flat ground
20x10 going down 26.565 degree
20x20 going down 45 degree

Spin-jump and regular jump both share the horizontal speed of 40.
Morph ball’s horizontal speed is only 30, including when the motion is caused by a bomb.
Morph Ball does not stop moving sideways until the peak of its jump is reached.
It also cannot change directions before it stops moving.
Spin-jumps never change speed except for the initial acceleration or when changing direction.
They do not slow down before direction changes.

Jumping data:
On ground, no high-jump: 192 (initial vertical speed; this value never shows up in the memory viewer because it exists for less time than one frame but it’s used to calculate the first frame of a jump.)
In water, no high-jump: 197
On ground, high-jump: 232
In water, high-jump: 237
On ground, spring ball: 212
In water, spring ball: 217
On ground, bomb jump: 174
Bomb jumps do not work at all in liquid without the gravity suit.
Rate of decrease in air: 10/fm
Rate of decrease in water: 5/fm
On ground: 8 speed units = 1 positional unit/fm
In water: 8 speed units = 1 positional unit/fm, but the distance is capped at 5 positional units/fm.
When the jump button is released, the fall starts immediately with a speed value of .
Vertical fall speed must be >= 70 before space jump will work, and the key must be released and pressed again at/after that point.

Shinesparking data:
Teleport 32 units up when you begin a shinespark
26 frames before Samus starts moving, starting with the frame after the one in which it detected that the player pressed the jump button.
Horizontal and vertical shinespark speed: 192
Diagonal shinespark–horizontal speed = 160; vertical speed = 96.
24 units per frame of motion at 192 speed units, so that comes out at 8 speed units per location unit per frame.
44 frames before Samus starts falling after she hits a wall/ceiling.

The charge beam counter goes up by 1 each frame until it hits 64, at which point the beam fired will be charged.
Missiles accelerate 1/fm/fm starting at 8 until they reach 20 units/fm, or 14/fm in each direction if fired diagonally. (This is in actual positional units. The acceleration counter for missiles goes from 0 to C.)
Super missiles accelerate 1/fm/fm starting at 12 until they reach 28 units/fm, or 19/fm in each direction if fired diagonally.
Beams (I am assuming all beams) move 32 positional units/fm, 22/fm in each direction if fired diagonally.
Enemies are frozen for 480 frames. The enemy starts flashing when 86 frames are left. Each flash lasts 2 frames.
Metroids stay frozen for 240 frames.
Takes 5 frames to morph, 6 to unmorph.
16 frames to start climbing if you hold up, and another 21 to finish.
3 frames to start climbing if you use arrow+jump.

I’m using this to make my engine more MZM-like, of course. :stuck_out_tongue:

Edit: Whoop, looks like some of my data may be wrong due to the frame buffering method I was using in VBA. Those 2-frame pauses were likely caused by triple-buffering, and so the Speed Booster probably starts flashing two frames earlier than I said, too.

I used this site as a reference:
http://tasvideos.org/PJBoy/Dump.html#Metro…ionRamAddresses
And I made a ton of Codebreaker codes for MZM while I was at it.

FM being frames???

Yes.

Interesting

congratulations DP, this is the weirdest knowledge base I’ve ever seen

Added a ton more info to the first post, including my Codebreaker codes… I’m keeping the topic at Metroid Fan Mission updated constantly, so I guess I’ll just copy and paste from there once in a while.

Stupid question, but how sure are you that it does calculations per frame and not per unit time?

There is no realtime clock built into the GBA–only in specific game cartridges such as Pokemon and Golden sun, apparently. Also, the GBA almost never runs at a speed other than (60/1.001) Hz. Timing processes on the GBA use VBlank–which is a memory location that stores how many lines of the screen have been drawn at that point. I’m totally sure it’s per-frame. :stuck_out_tongue:

Word :stuck_out_tongue: