Viewing Single Trivia
subdirectory_arrow_right Prince of Persia: The Forgotten Sands (Game)
▲
1
▼
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, is included in the self-source tab for this submission). 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.
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.
Zoid Kirsch tweet:
https://twitter.com/ZoidCTF/status/1591122506806882304
C code port of Kirsch's original BASIC implementation, posted by him on Usenet in 1989:
https://groups.google.com/g/comp.lang.c/c/Uw2mgfSPtbI/m/SXmTt6_pCB8J
Jack Mathews tweet:
https://twitter.com/jack_mathews/status/1591155796695732224
Robin Lavallee tweet:
https://twitter.com/robinlavallee/status/1591141684012003331
More detailed explanation of how the maze works:
https://wiki.metroidprime.run/wiki/Central_Dynamo
https://twitter.com/ZoidCTF/status/1591122506806882304
C code port of Kirsch's original BASIC implementation, posted by him on Usenet in 1989:
https://groups.google.com/g/comp.lang.c/c/Uw2mgfSPtbI/m/SXmTt6_pCB8J
Jack Mathews tweet:
https://twitter.com/jack_mathews/status/1591155796695732224
Robin Lavallee tweet:
https://twitter.com/robinlavallee/status/1591141684012003331
More detailed explanation of how the maze works:
https://wiki.metroidprime.run/wiki/Central_Dynamo
Comments (0)
You must be logged in to post comments.
Related Games
Metroid Prime Hunters
New Play Control! Metroid Prime 2: Dark Echoes
Metroid Prime: Trilogy
Metroid II: Return of Samus
Super Metroid
New Play Control! Metroid Prime
Metroid Dread
Metroid Prime: Federation Force
Metroid Fusion
Metroid: Zero Mission
Metroid Prime 2: Echoes
Metroid Prime 3: Corruption
Metroid: Other M
Metroid
NES Remix 2
Super Smash Bros. for Wii U
Nintendo Land
Metroid II: Return of Samus DX
Famicom Mini Collection
Metroid Dread
Super Smash Bros. Melee
Nintendo World Championships: NES Edition
Super Smash Bros. Ultimate
Super Smash Bros. for Nintendo 3DS
Super Smash Bros. Brawl
Ultimate NES Remix
Super Smash Bros.
Harvest Moon
NBA Courtside 2002
Dance Dance Revolution Mario Mix
Mario Party 9
Pokémon Stadium 2
Mario Tennis Open
Trauma Center: Under the Knife
Duck Hunt
Mario Strikers Charged
Super Spike V'Ball
Tetris & Dr. Mario
Mario & Wario
Mole Mania
Fire Emblem Fates: Conquest
Donkey Kong Bongo Blast
Super Mario World 2: Yoshi's Island
Nintendogs + Cats: French Bulldog & New Friends
Sonic Rush Adventure
Kirby's Avalanche
Pokémon LeafGreen Version
Pokémon Moon
Pokémon Mystery Dungeon: Explorers of Darkness
WarioWare D.I.Y.