Metroid Prime Dev Stories

In honor of Metroid Prime’s 20th Anniverary, we have compiled the Metroid Prime development stories that Zoid Kirsch & Jack Mathews shared on Twitter. These are amazing, behind the scenes stories that have been compiled here for posterity and easy reading. Enjoy!


Zoid Kirsch @ZoidCTF  Metroid Prime’s 20th release date anniversary is on November 18th. Each day until then I’m going to tweet out a little story about its development.

 

Metroid Prime Dev Stories #1

I spent so much time working on doors. In Metroid Prime, you may have noticed that doors can sometimes take a long time to open–that’s because the room behind the door is still loading! There is at most two “rooms” loaded at once–the one you’re in and the one you’re going to.

This is why in rooms with multiple exits, only one door can be open at a time. We went with the design of the blue force field on the doors that fades when shot to indicate the door is “ready” to open, but has to wait until the room behind is loaded.

Most times the room should be already loaded by the time you get to the door, but things like the morphball make it so you the player can get there much faster and beat the load times. Sorry, but you gotta wait for the disc to load I’m afraid!


Metroid Prime Dev Stories #2

In this clip as Samus approaches the [Scatter] Bombu, the screen fills with static to show interference with her visor. As we worked on this a big issue is the memory use of the noise texture. The Gamecube only has 24MB of RAM, so every texture has to be carefully considered.

If we used a low resolution texture (64×64) to save memory the “static” would be blurry and not crisp. One engineer on the team came up with a great idea: what if we just use the memory holding the Metroid Prime code itself! We quickly tried it out and it looked amazing.

When you see Samus’s visor affected by electrical “noise” in game, you’re actually seeing the bits and bytes of the Metroid Prime software code itself being rendered on the screen. Turns out machine code is sufficiently random to work great as a static noise texture!


Metroid Prime Dev Stories #3:

Red Means Dead. One of the design goals in Prime is to make sure the player immediately knows if they are doing damage or not. Objects and creatures are often only vulnerable to particular types of damage. How is that indicated? ¼

The GameCube didn’t have shaders as we know them now, it has a TEV (TExture enVironment unit) that could blend colors. I realized we needed a consistent design for the color blends. 2/4

As you can see in the clip below as I’m fighting the Baby Sheegoth. My shots are reflected when I’m not doing any damage, but there’s a red glow on the Sheegoth when I’m hitting the right area to damage it. 3/4

I worked with senior design to pick the particular red color, whether hitting blocks, bosses or enemies in the game. The same red was used ensure it was clear when the player is doing damage. It’s this consistency that helps players understand clearly what’s happening. 4/4


Metroid Prime Dev Stories #5

Going gold! [That is the day the final master is declared. It’s the last version that gets pressed onto the GameCube discs. At that point no more changes can be made.]

After a long and difficult development process, Metroid Prime went gold near the middle of October 2002, about a month before release date since they had to press the discs. It’s one of the most memorable days of my life. 1/2

On the day we went gold I took a magazine poster and got everyone’s signature to commemorate that day. The poster is still on my wall today. You may notice no one signed on top of Samus–that’s how much respect we had for the character. My signature is top center, it’s my poster!


Metroid Prime Dev Stories #6:

How does Metroid Prime save the game? The size of Metroid Prime’s save data is under ~60 bytes in size. How is it so tiny? Well, that requires explaining world layers: 1/5

Each room in Metroid Prime has a set of world layers–these define which objects spawn when the room is loaded. E.g. it’s world layers that change Flaahgra’s room from having a boss to Chozo ghosts and an artifact when you return later. ⅖

World layers are also used for items, whenever you pick up an energy tank or missile expansion, they are on a separate world layer that is disabled once the item is acquired. If that layer wasn’t disabled, the item would be there next time the room is loaded. ⅗

A world layer state is represented by a single bit in the save game. There are only a few hundred world layers in the whole game, so it ends up requiring just under ~50 bytes to represent them all. The remaining bytes in the save game are health, missile count, etc. ⅘

I remember when Nintendo asked how many memory card blocks Metroid Prime was expected to take up and I said, “One!” A GameCube memory card block is 8kb, that’s way more space then we needed to save the game! 5/5


Metroid Prime Dev Stories #7: (jack_mathews)

Metroid Prime Game Dev Story – The One Where We Fridged a GameCube. Shortly after Prime shipped, Nintendo told us that a “bad batch” of GameCube CPU’s shipped, and apparently Prime was the only game that misbehaved on them. We saw videos and it was clear what was going on. 1/7

All animated objects were freaking out. I’ll get into the techy reasons later, but the point was we needed to actually slow down some of our code, because it was running too fast for these CPUs to handle! We needed to be able to test this, but… 2/7

Nintendo only had one dev kit with this CPU. We couldn’t detect the CPU, and if we slowed it down too much, the game’s framerate would tank. If we didn’t slow it down enough, it would glitch. Even worse, we had to burn disks for this kit. So each test was hours. Even weirder 3/7

Was to see the problem, the kit had to be cold. Like, freezer cold. So we literally had to put the kit in the freezer, test the game for 15 minutes tops, then start all over. It was crazy. 4/7

We literally were running the kit from the break room freezer to the TV, and loading save games as fast as possible to as many places as possible in 15 minutes, then trying new code, re-freezing, and back. I’ll never forget it. 5/7

Techy stuff: Our skinning used the locked cache DMA to read in data and the write gather pipeline to write it out. Most of the Nintendo samples used the locked cache for both read and write, so my method was a bit faster. But it also hit memory bandwidth limits. As I recall, 6/7

The issue was that the write gather pipe on these broken CPU’s wouldn’t stall when it was full or properly report its status, so we had to keep inserting NOPs in the code to slow it down just enough to stop stalls from happening, but not so much to slow down the game. 7/7

In case you were wondering, when someone called support about this animation problem, Nintendo actually sent them a new game disc with this updated code! That’s how we did “patches” back in the old days! 8/7


Metroid Prime Dev Stories #8:

Why are there elevators between worlds in Metroid Prime? As a mainstay of the Metroid games there were also three primary technical reasons: world maps could only be up to a certain size, sound banks needed changed and memory fragmentation. 1/5

The world size limit was due to floating point precision. If Samus got too far from the origin her movement would start stuttering since the values would get too large. 2/5

For the sound banks, the MusyX sound system can stream music but it couldn’t for sound effects. Each world had a different set of sounds that were loaded while the elevator cut scene is running. 3/5

The GameCube doesn’t have any virtual memory and everything is allocated from the physical RAM. The elevator loads caused all memory to be freed between the worlds, cleaning up any fragmentation. 4/5

@jack_mathews hardcoded the different elevator cut scenes into the game–its not a “room” at all. They also feature crossfades since it had fixed rendering, one of the only places we could afford to render overlapped scenes! 5/5


Metroid Prime Dev Stories #9:

Central Dynamo’s Power Bomb Maze. When I first started programming and learning BASIC one of the first programs I wrote was a maze generation algorithm when I was 13. It could generate a maze of any size with a single solution. 1/5

When designing the room for the power bomb upgrade, I suggested a randomly generated maze for the morphball that players would have to solve. I quickly wrote up the algorithm I remembered from my early days. 2/5

I wanted to ensure that the maze was of sufficient length, so I wrote a tool that would generate and then solve the maze. I picked 300 random seeds that the solver indicated at least 75% of the maze was required to be traversed. 3/5

This results in 300 different mazes that can be generated in the Central Dynamo room. The maze also features two obstacles along the route in the form of water puddles that must be bombed to short out the nearby nodes and open the path. 4/5

The speedrunning community wrote up on how the maze works here, https://wiki.metroidprime.run/wiki/Central_Dynamo… There’s also a tool to determine which maze you have based on the starting positions. The community is amazing! 5/5


Metroid Prime Dev Stories #10

Use a good random number generator! When we first started working on Phendrana Drifts (the snow level) we created a particle system that shows snow. You can see the gently falling snow in this clip. ¼

When the snow effect was first implemented we noticed there were large empty streaks in the falling snow! It was was quickly realized that the snow was basically a 3D plot of the deficiency of the default random number generator that came with the compiler. 2/4

We quickly switched to a using a better random algorithm via a linear congruential generator. It’s still quite fast and generates a far better distribution of numbers. The snow fell into place and looked much more evenly distributed. 3/4

It wasn’t until we had plotted out the random number distribution with the snow effect that we truly realized how bad the default random number generator was. It was crazy that it was the snow that showed us to make use of a better one. 4/4


Metroid Prime Dev Stories #11:

White Paper testing. In the last few months of the project, we invited friends of family to do “white paper” playtests of the game. They would play without help and we’d monitor their progress. 1/5

We learned so much from these observations. We’d often see testers get stuck in rooms that had morphball tunnel exits–they won’t notice them. This resulted in putting big spotlights over those entrances to make them stand out as a path. 2/5

Our testers often couldn’t figure out how to get up to the bridge leading to the Arboretum. After they acquired the morphball and returned to the Main Plaza in the Chozo Ruins they didn’t notice the steps in the back to cross the bridge. 3/5

Originally both back steps were nearly the same color. We changed them to different textures and improved lighting. Our next set of testers noticed it immediately. The steps are directly ahead in the clip below. 4/5

These tests with new players helped improve the game greatly. They provided clear feedback in how to communicate the game world to the player. It resulted in a lot of simple design changes that we incorporated throughout the game. 5/5


Metroid Prime Dev Stories #12

Tiny morph ball doors. If you move quickly through a morph ball puzzle or boosted through a ball tunnel, you may have noticed that sometimes there’s a little door blocking your way. 1/4

When we first started making the 2D styled morph ball areas, they were connected to various rooms with tunnels. They worked well until our testers started beating the load of the next room and would fall out of the world. 2/4

I had to go throughout the game and add these little morph ball doors into every tunnel that crossed rooms. This ensured that Samus won’t roll out of the tunnel before the room is loaded, otherwise she will fall into the void forever. 3/4

Ideally you shouldn’t see them very often as the load system tries to get the next room loaded. But if you are quick enough, you might bump into these little doors that help you stay in the world. 4/4


Metroid Prime Dev Stories #13

Strafe jumping, i.e. getting the Space Jump early. When you are locked onto a target in Metroid Prime, pressing the jump button does a sideways dash. This lets the player easily strafe around a target and dodge incoming fire. 1/4

This sideways strafe jump sets a horizontal velocity on the player that continues to circle around the target while locked on. But if you unlock the target just as the strafe jump starts, Samus keeps the horizontal momentum without the lock on pull. 2/4

This allows a larger horizontal distance traversal than a normal jump. Using this momentum lets Samus catch the edge of the cliff beside her ship and get the Space Jump early upon landing. 3/4

Creative use of the game physics and movement that results in acquiring items out of order allows creative exploration of the game world. Sequence breaks like this are very much part of Metroid. 4/4


Metroid Prime Dev Stories #14 ( jack_mathews)

Metroid Prime Dev – 60fps Visors. I get asked a lot how we held 60fps with four visors. The short answer is to make one visor the “baseline,” and make sure the others perform as well or better, with tech or design. 1/7

The baseline, of course, is the default visor. This is an unmolested view of the world, it has the gun, lightmaps, and allows for plenty of combat. It has to be the most beautiful, because it’s the one you see the most. 2/7

Then we have the scan visor. It has the baseline, plus more UI, markers, a zoom window, etc. But it doesn’t have the gun, projectiles, and their lights. All that perf goes to the visor. 3/7

The thermal visor does have combat and particles. Where do we get perf? No static lightmaps. We turn off all world lighting, and the post-process filters are just a palette lookup. 4/7

X-Ray Visor (done by Ted Chauviere) also has combat and lets you see through things. Sort of. Only enemies and your gun are see-through. Everything else is pretty much the same, and “invisible” objects are just models turned on and off.

 

We also render with a white-to-black “fog” that also means we don’t render far-away objects, and it’s rendered at a lower resolution and blurred. 6/7

Bonus visor: Morph Ball Camera! This is pretty much a visor – instead of gun and particles, we have world shadows projected on the ball surface (RIP Andy O’Neal), a projected shadow under the ball, and a constant dynamic light. 7/7