MZM Real Numbers

This is where you can talk about general things, but keep it civil and sane.

MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 12:37 am

I feel bad about leaving you Metroid Fan Mission people out of the list of folks who hear about all my crazy opinions and discoveries and whatnot, sooo... Copy and paste go!

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 149 frames for Speed Boost to kick in fully, at which point Samus's speed is 160.
12 to get to 96, then 120 frames until it starts increasing by 8s again for 6 frames, then another 14 until it starts increasing by 8s, then another 3 until it hits 160 and Samus starts flashing.
Samus is 57 positional units wide. That means she can move 7 units (1.75 pixels) when in a one-tile-wide space. I feel this is a common mistake in fangames, when the morph ball can't enter a 1-tile-tall hole in a wall because the morph ball is a whole tile tall.
Morph Ball is 61 units tall. Samus is 125 units tall (which is 3 less than two tiles, as the morph ball is 3 less than one tile).
Her vertical position does not change when she morphs/unmorphs, meaning she is positioned by her bottom.

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

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.
Wall-jump and space-jump have the same start values as the most similar jump.
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 10.
Vertical fall speed must be >= 70 before space jump will work, and the key must be released and pressed again at/after that point.
Morph Ball is the only jump that will work repeatedly without releasing the jump button.
Spin-jump and regular jump both share the horizontal speed of 64.
Morph ball's horizontal speed is only 48, 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.

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. (not checked with memory viewer)
It takes 2 frames to morph or unmorph in the air.
15 frames to start climbing if you hold up, and another 21 to finish. Samus moves up completely and then to the side.
Those 21 frames consist of this motion: 24 up, 24 up, 24 up, 8 up, 8 up, 8 up, 4 up, 4 up, 21 up, and then 4 left in each of the remaining twelve times.
1 frame to start climbing if you use arrow+jump.
Samus sits still for 6 frames before ascending when wall-jumping.
Horizontal momentum is set to 0 when landing.
It takes 400 frames for a pick-up to disappear.

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

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've marked the ones I didn't check via Memory Viewer, which are the ones that may be wrong.



Further edit: Well, since this is my first recent topic here, I should say more. I used this site as a reference:
http://tasvideos.org/PJBoy/Dump.html#Me ... mAddresses
And I made a ton of Codebreaker codes for MZM while I was at it.

Image

I skipped Ridley. Figure that one out. ("You cheated" isn't good enough, although it's true. I *did* collect 0 items and ended the game in 18:37 with no missiles, super missiles, or power bombs.)

Also, I made a bunch of codes! Incidentally, Samus learned how to teleport while I was playing.

830013E9 **** - teleport on Y axis, where **** is the hex for Samus's location in pixels from the top-left corner.
830013E7 **** - teleport on X axis.

I used VisualBoyAdvance's memory viewer to make teleporting easier. ("05 17" in the memory viewer would be 1705 in a code to put Samus at that position.)

Always Shoot Up (enabled that temporarily to try getting into Imago's room without fighting the plant)
33000A3C 0003
Always Shoot Down
33000A3C 0004

This one was just fun to look at. You know how when you fire a missile at something that it can't hurt, it bounces off? Well, your beam weapons and bombs can bounce out of your arm cannon harmlessly!
33000A3D 0003

The "Always Shoot X" codes I've found actually only modify your first weapon fired. But what if you fire another while that's still on the screen? Copy and paste the "Always Shoot X" code and change a small part to modify the second weapon instead.
83000A3A 0D02 - Always Shoot Super Missiles on the first on-screen shot
83000A56 0D02 - Always Shoot Super Missiles on the second on-screen shot
And if you see what's different there, you can also use these for the next several shots (assuming the first two are still on the screen)
A73/A8E/AAA/AC6/AE3/AFE/B1A

Everyone knows moonjumping is fun. Well, here's my moonjump code:
D0000020 0001 (this line technically means "if you're pressing A, do the next line")
330013EC 00FF (this modifies Samus's vertical momentum variable. Change 00FF to, say, 0088 for a slower speed.)
D0000020 0001
330013ED 0000 (this modifies Samus's vertical direction variable.)

How about always being able to shinespark in an area that's just a few tiles wide?
330013DC 0077
Last edited by DeProgrammer on Sat Jun 06, 2009 2:19 pm, edited 9 times in total.
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 12:39 am

I'm going to use a bit of this in my engine. Okay?
Thanks for sharing.
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 12:43 am

Totally fine with me. No credit necessary for the simple task of watching numbers change as I advance frame by frame through MZM. :)
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 12:44 am

Okay thanks.
But I must ask... why did you learn this?
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 12:47 am

To make my own upcoming Metroid engine more accurate, of course. Edit: Added a ton to the first post.
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 12:55 am

Jesus........... You did that all?
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 12:58 am

Yeah, I did all that, and this, and this, and the Meteroids game in this, and a few million other things. But those aren't things that I did in the last 3 days like what this topic is about. :)
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 1:02 am

You my friend are worthy of praise. Glad to have you back!
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 1:08 am

Well, that was a much-needed self-esteem boost, complementary to the nice wantedness boost I received earlier! But no, I think only God is worthy of praise.
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 1:13 am

Okay how about this. You are one of the best programmers I have ever met ( I think that is the right word, I don't know English is hard for non natives) on this site.
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 1:17 am

If the others had been doing it for over 7 years, they'd probably be better than me. Haha.

Anyway, I'm sure I'll come up with some other tiny but possibly significant details later, such as how many frames it takes you to climb a ledge or to morph, or how long normal enemies or Metroids stay frozen.
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby MetroidMaker on Thu Jun 04, 2009 1:25 am

So in there you mention and engine. Any demo's planned?
Image
Do not eat Phazon mushrooms..
User avatar
MetroidMaker
 
[SC_TOP5] [SKS]
 
Posts: 1946
Joined: Sun Oct 26, 2008 3:34 pm
Location: On a creepy ship called the Olympus

Re: MZM Real Numbers

Postby DeProgrammer on Thu Jun 04, 2009 1:45 am

First post appended with new information (I put it at the end of the first section).

It's probably going to be a while before we get any kind of demo out. I'm just starting to work on a new physics engine, and then I'd have to do at least some of the graphics and likely the music code--and that makes up a major part of the whole thing--in order to get a playable demo out.
User avatar
DeProgrammer
 
[SKP]
 
Posts: 151
Joined: Tue Nov 18, 2008 10:56 am

Re: MZM Real Numbers

Postby Dark__Echoes on Thu Jun 04, 2009 7:43 pm

DeProgrammer wrote:Well, that was a much-needed self-esteem boost, complementary to the nice wantedness boost I received earlier! But no, I think only God is worthy of praise.

I'm not sure if ONLY God is worthy of praise, but he DOES need more then people give him. =\
And man... You are VERY patient. Did you figure this out all in one go, or were there at least some breaks in between?
Image
User avatar
Dark__Echoes
 
[SC_TOP5] [MC_3] [SCC]
 
Posts: 914
Joined: Wed Apr 09, 2008 2:24 pm
Location: Under your table.

Re: MZM Real Numbers

Postby Elpizo on Thu Jun 04, 2009 8:25 pm

Dark__Echoes wrote:I'm not sure if ONLY God is worthy of praise, but he DOES need more then people give him. =\
And man... You are VERY patient. Did you figure this out all in one go, or were there at least some breaks in between?

Not to start a religious debate, but sure He is. Who do you think granted us talent and giftedness? He allows us to grow and discover.
Anyway, to get back on the rails asap:

You, sir, DeProgrammer have worked some pretty neat stuff right there, I've been wanting to know that sort of information for quite a while, just with a few different games. Care to give us a brief walk through on how you did this? I'm guessing you did some sort of frame-by-frame analysis. Or did you look at the code?
Reminds me of how someone cracked the source code for the original Metroid. ><; that was a MESS. It was crazy.
Image
User avatar
Elpizo
Global Moderator
 
[M] [V] [CM]
 
Posts: 945
Joined: Wed Apr 09, 2008 1:21 pm
Location: lol

Next

Return to General Discussion

Who is online

Users browsing this forum: DeProgrammer and 0 guests