Metroid Prime
Metroid Prime
November 17, 2002
Add Trivia

According to one of the game's tech leads Jack Mathews, shortly after Metroid Prime shipped, Nintendo told Retro Studios that a "bad batch" of GameCube CPUs shipped, and apparently this game was the only game that misbehaved on them. Upon seeing videos of the issue, it became clear to them what was going on:

"All animated objects were freaking out... 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 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 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. 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."

In retrospect, he wondered if it was possible to instead rig up the GameCube so it stayed in the freezer and let the wires run out to connect to the TV to save time running back and forth.

On the more technical side, Mathews explained:

"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, 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."

When a player called Nintendo of America's support hotline about this animation problem, they would send them a new copy of the game disc with this updated code.

When this story was posted to Twitter in 2022, one user posted an older video of a graphics glitch positing that the issue is "caused by the ANCS file using the wrong CSKR for the suit model", and that it might be possible to simulate the issue outside of the hardware and software conditions it originally happened in. Mathews replied:

"I don't know if it was writing out less than we were putting in the write-gather, or throwing away and reusing from the buffer, but sort of along these lines, with more jittering and triangles all over the place. This example has coherent skinning, just a bad mapping... I think the WG pipe was a 96 byte circular buffer. So when it wouldn't stall, it would write bytes over earlier entries in the buffer before they could flush to main memory. These would still be four-byte aligned writes, so I think the way to emulate it would be to take blocks of anywhere from 4-32 bytes (a multiple of four) and move them back by 96 bytes in the skinning buffer."

Mathews also talked about how it would have been a bigger hassle to rewrite the skinning pipeline to use the locked cache, because it would have been a rewrite by taking the risk of adding new code and may have net slowed things down. Adding the NOPs wouldn't break anything and just moved the stalls from the memory controller to the PPC chip.
person MehDeletingLater calendar_month September 16, 2023
According to one of the game's tech leads Jack Mathews, the way the developers were able to keep the game at 60 FPS with four different visors was to make one visor the "baseline," and make sure the others perform as well or better, with tech or design:

• The baseline for all the other visors is the Combat Visor, which provides an unmolested view of the world. It has Samus' Arm Cannon, lightmaps, and allows for plenty of combat. In Mathews' opinion, it's the most beautiful visor, because it's the one the player sees the most.

• The Scan Visor has the baseline elements of the Combat Visor, plus more UI, markers, a zoom window, etc., but it doesn't have the Arm Cannon, projectiles, and their lights. All that performance goes to the visor, which is why everything seen through the scanning window has a low quality blur. According to Mathews, the design of the visor needed a slightly zoomed scan window, but they didn't have the performance to re-render everything or render at a higher resolution, so they just did a digital zoom which blurs things.

• The Thermal Visor does have combat and particles, so the visor's performance comes from the lack of static lightmaps. All world lighting is turned off, and the post-process filters are just a palette lookup. The palette used for the visor was created offline. "Hot" objects used the Z component of the screen-space normal. "Cold" objects used the red component of their albedo texture.

• The X-Ray Visor (created by programmer Ted Chauviere) also has combat and lets the player see through enemies and Samus' Arm Cannon. Everything else, while purported by the game to be see-through in the visor, is essentially the same, and "invisible" objects are just models turned on and off. They also rendered with a white-to-black "fog" so they don't need to render far-away objects, and it's rendered at a lower resolution and blurred. The details of how this fog works involves obscuring the main view and showing depth buffer and normals/normalmaps only (with some trickery for invisible objects), but according to Mathews converting the GameCube depth buffer to something linear on the GPU was extremely expensive, on top of there being no normal maps on the GameCube.

• The Morph Ball Camera also essentially works as a visor, but instead of gun and particles, world shadows are projected on the ball surface (this effect was created by fellow lead technical engineer Andy O'Neal), a projected shadow under the ball, and a constant dynamic light.
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. 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. This trick, which the game's speedrunning community called the Scan Dash, allows for a larger horizontal distance traversal than a normal jump. Using this momentum can let Samus catch the edge of the cliff beside her ship in the Landing Site and get the Space Jump Boots early upon landing.

According to programmer Zoid Kirsch, creative use of the game physics and movement that results in acquiring items out of order allows for creative exploration of the game world. While sequence breaks like this are a crucial part of the Metroid series, this trick would actually be patched out in later releases of the game.
person MehDeletingLater calendar_month September 16, 2023
If Samus speeds through a Morph Ball puzzle or boosts through a Morph Ball tunnel, sometimes there's a little door blocking the way. According to programmer Zoid Kirsch, these doors were designed to resemble and serve the same purpose as the regular big doors that open once the force field over them is shot and the room behind them is fully loaded.

When they first started making the 2D-styled Morph Ball areas, they were connected to various rooms with tunnels. They worked well until testers started beating the load times of the next room and would fall out of the world. Kirsch had to go throughout the game and add the Morph Ball doors into every tunnel that crossed rooms to ensure that Samus won't roll out of the tunnel and fall into the void before the room is loaded. Because the testers were already conditioned to wait at the big doors after the force field was shot, no players ended up backtracking and waited for the small doors to open, rendering them a successful change. Ideally, players shouldn't see the small doors very often as the load system tries to get the next room loaded, but they might bump into them if they are quick enough.
In the last few months of the game's development, the team invited friends of family to do "white paper" playtests of the game where they would play without help and the developers would monitor their progress. According to programmer Zoid Kirsch, they learned a lot from these observations:

"We'd often see testers get stuck in rooms that had [Morph Ball] tunnel exits--they won't notice them. This resulted in putting big spotlights over those entrances to make them stand out as a path. Our testers often couldn't figure out how to get up to the bridge leading to the Arboretum. After they acquired the [Morph Ball] and returned to the Main Plaza in the Chozo Ruins they didn't notice the steps in the back to cross the bridge. 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."

These tests with new players helped improve the game greatly, because they provided clear feedback in how to communicate the game world to the player, resulting in a lot of simple design changes that were incorporated throughout the game.
According to programmer Zoid Kirsch, when the team first started working on Phendrana Drifts in Metroid Prime, they created a particle system that shows snow gently falling. When the snow effect was first implemented, they noticed large empty streaks in the falling snow, and quickly realized that the snow was basically a 3D plot of the deficiency of the default random number generator that came with their compiler.

They switched to a using a better random algorithm via a linear congruential generator that was still fast, but generates a far better distribution of numbers, allowing the snow to look much more evenly distributed. This moment was what helped the developers realize just how bad their default random number generator was and that they had to make use of a better one.

When this story was originally posted to Twitter in 2022, several other developers replied with similar shorter anecdotes about working with RNG, such as Robin Lavallée, a programmer on Surf's Up for the Nintendo DS, and Tom Leonard, the lead programmer on Thief: The Dark Project.
person MehDeletingLater calendar_month September 16, 2023
subdirectory_arrow_right Prince of Persia: The Forgotten Sands (Game)
According to programmer Zoid Kirsch, when he first started programming and learning BASIC, one of the first programs he wrote at the age of 13 was a maze generation algorithm that could generate a maze of any size with a single solution (a C code port of Kirsch's original BASIC implementation, posted by him on Usenet in 1989, can be found here). During the development of Metroid Prime, when designing Central Dynamo, the room in the Phazon Mines with the Power Bomb upgrade, he used the same algorithm to add a randomly generated maze for the Morph Ball that players would have to solve.

One of the game's tech leads Jack Mathews expressed concern that this algorithm would eventually generate an impassible maze, so to ensure that the maze was of sufficient length, he wrote a tool that would generate and then solve the maze, picking 300 random seeds that the solver indicated at least 75% of the maze was required to be traversed. This results in 300 different mazes that can be generated in Central Dynamo. 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.

When this story was originally posted to Twitter in 2022, programmer Robin Lavallée commented that he wrote a similar algorithm for the Wii game Prince of Persia: The Forgotten Sands, where all seeds were equally likely, and the solution would be stored as he built the maze.
person MehDeletingLater calendar_month September 16, 2023
According to programmer Zoid Kirsch, the reason why Metroid Prime had elevators were because, as a mainstay of the 2D Metroid series, they were used for three primary technical reasons that were also present in the series' first 3D game: world maps could only be up to a certain size, sound banks needed to be changed, and the transitions helped to clear up any memory fragmentation.

1. 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. When this story was originally posted to Twitter in 2022, Robin Lavallée, a former lead programmer at Ubisoft, suggested that Retro Studios could have shifted floating points where after a certain distance, everything would be shifted back closer to origin, citing this as something done during the development of Assassin's Creed IV: Black Flag. However, Kirsch replied back that the team deliberately avoided doing this out of concern that it would cause bugs. Instead, Samus moves consistently through the world as it loads around her.

2. 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. 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.

One of the game's tech leads Jack Mathews hardcoded the different elevator cutscenes into the game. It's not a "room" at all, nor is it a prerendered video file, but it's coded directly in C++ and does not run through the usual game systems for camera control, etc. They also feature crossfades since it had fixed rendering, one of the only places the developers could afford to render overlapped scenes.
The size of Metroid Prime's save data is under ~60 bytes in size. According to programmer Zoid Kirsch, the reason why the save data is so tiny is because each room in the game has a set of "world layers" that define which objects spawn when the room is loaded (e.g. world layers change Flaahgra's room from having a boss to Chozo Ghosts and an Artifact when returning later). World layers are also used for items like Energy Tanks or Missile Expansions; when they are picked up, 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 the next time the room is loaded.

A world layer state is represented by a single bit in the save data, and since there are only a few hundred world layers in the whole game, it ends up requiring just under ~50 bytes to represent them all, with the remaining bytes in the save data representing health, missile count, etc. When Nintendo asked Retro Studios how many memory card blocks Metroid Prime was expected to take up, Kirsch said: "One!" A GameCube memory card block is 8 KB, which was much more space than needed to save the game.
Attachment To help development reach its finish, Retro Studios licensed out a PHP-based bug tracker called Mantis, working with Nintendo of America's product testing division to find bugs and the team's producers would enter bug reports.

Eventually, Metroid Prime went gold on October 29, 2002 at 2:21 AM, less than a month before the release date to give time to manufacture game discs. Programmer Zoid Kirsch described it as one of the most memorable days of his life, commemorating it by getting the development team's signatures on a magazine poster. Notably, none of the developers signed on Samus because they had a large amount of respect for the character.
person MehDeletingLater calendar_month September 16, 2023
Attachment According to programmer Zoid Kirsch, when rooms are streamed in behind doors, it's loading a compressed copy of the room (i.e. geometry, textures, models, game data). After the compressed copy is loaded into internal memory, space is allocated to decompress the room into, meaning memory is needed for both the compressed and decompressed copy. Since the GameCube has 24MB of RAM, the developers found that having both compressed and decompressed was too expensive to work with (see top image).

To solve this problem, they licensed an open source decompression library (Kirsch does not remember specifically what library but it might have been Lempel–Ziv–Oberhumer) that allows allocation of a single decompressed sized block, then loads the compressed copy into the upper section of the memory block, and decompresses it in place overwriting the compressed copy (see bottom image). This library fixed many issues with memory fragmentation and basically allowed the size of the game's rooms to be much larger.
person MehDeletingLater calendar_month September 15, 2023
According to programmer Zoid Kirsch, one of the design goals during Metroid Prime's development was to make sure the player immediately know if they are damaging enemies or not as objects and creatures are often only vulnerable to specific types of damage, and those types need an indicator.

The GameCube did not have shaders as they are known in modern-day consoles, rather it had a TEV (acronym for TExture enVironment unit) that could blend colors, and Kirsch realized the game needed a consistent design for the color blends. He worked with senior designers to pick particular yellow and red colors, whether hitting blocks, bosses, or enemies, to ensure that it was clear when the player was shooting in the right area to damage them. Whenever the player is not doing damage, Samus' shots are reflected off what she's shooting, creating a consistency that helps players understand clearly what's happening.
Whenever Samus approaches a Bombu, the screen fills with static to show electrical interference with her visor. According to programmer Zoid Kirsch, as the game's developers worked on this detail, a big issue that came up was the memory use of the noise texture since the GameCube only has 24 MB of RAM. If they used a low resolution texture (64x64) to save memory then the static effect would come out blurry and not crisp.

To solve this problem, one engineer came up with the idea to use the memory holding the Metroid Prime code itself, and they discovered that machine code is sufficiently random to pass as a static noise texture. In the final game, whenever Samus' visor is affected by electrical noise in-game, the player is actually seeing the bits and bytes of the Metroid Prime software code itself being rendered on the screen.
person MehDeletingLater calendar_month September 14, 2023
subdirectory_arrow_right Metroid Prime: Trilogy (Game), New Play Control! Metroid Prime (Game)
In Metroid Prime, the wait time for doors between different rooms to open can sometimes last a long time, because it acts as a buffer to allow the room past the door to load in. In most cases, two rooms can be loaded in at once, the one Samus is in, and the one she is going to (on rare occasions three rooms can be loaded in), and in rooms with multiple exits, only one door can be open at a time.

According to programmer Zoid Kirsch, the game's developers 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 it is loaded. Most times, the room should already be loaded by the time Samus gets to the door, but some gameplay elements like the Morph Ball make it so she can get there much faster. On the GameCube and Wii disc copies of Metroid Prime, this means you will have to wait for the disc to be read and finish loading the room for the door to open, but on a digital copy like the Wii U Nintendo eShop release of Metroid Prime Trilogy, the load times are much faster since the game is stored on the console's internal memory with no other changes to the game.
Attachment If the player manages to scan the projectiles that the Omega Pirate fires, the description will consist of placeholder text that reads "This is an Elite Space Pirate" on the first page and "Elite Space Pirate description 3" on the second. Not only does the later Japanese release retain this oversight, but it also introduces a second one, in that the placeholder text is still in English.
Attachment The North American physical release of Metroid Prime: Remastered has reversible cover art. In the same way that the North American release's cover art was remade, the reversible cover art features a remake of the artwork used for the Japanese release of the original game. Likewise, the Japanese physical release contains reversible cover art featuring the North American remade art.
Attachment An unused version of the Phazon Suit can still be found in the games files, which takes a more blue/turquoise color scheme as opposed to the final black-and-red version.
Senior Artist Mike Sneath commented on it, saying:

"Yes you are right that is what was another version of the Phazon Suit which was done by another artist Gene Kohler. Gene made all the suits with the only exception being the black phazon suit. That suit you mentioned was cut because if I remember the Art Lead Todd Keller didn't feel the suit felt evil enough. That was the whole idea about liquid Phazon is that it transforms things into being aggressive and destructive and Todd wanted that to be reflected in how the suit look. That is all I can remember with regards to that suit you mentioned and I hope I got the story right on that as it was a long time ago but I believe that is why it got cut." [sic]
Attachment A fully-textured model of a Ripper from earlier Metroid games can be found among the Phazon Mines files. The hook on the bottom suggests that they may have been used as grapple points. They were probably replaced with Gliders, which serve the same purpose, and are found in the Phazon Mines as well as in Phendrana Drifts.
Originally, Samus was going to give an opening monologue establishing the back story for the game. Though the narration was cut in the final product, a clip with Jennifer Hale (Samus's voice actor) giving this narration can still be found on the game's disc. This was also the inspiration for the narration in the "Opening / Menu (Metroid Prime)" music for Super Smash Bros. Brawl.
Attachment The hand symbols on the icons for each beam type in Metroid Prime evidently represent the gesture Samus must make with her hand in order to switch between beam types. This can be seen by switching beams while using the X-ray visor.
keyboard_double_arrow_leftFirst keyboard_arrow_leftPrev Page 1 of 2 Nextkeyboard_arrow_right Lastkeyboard_double_arrow_right

Related Games