Along my childhood games, there is still a Pokémon game that I haven't ruined by overanalyzing it. This will change today! The details behind Pokémon Mystery Dungeon map generation are surprisingly simple, so let's quickly examine them...
Tbf that would make for an amazing clip, and let's be real, you would have had to reset the Mt Steel anyway knowing how the dungeon generally goes in runs.
@@icecreamsamwich WAIT WHAT. Oh, that's...not good. I suppose RTDX changed this so that Monster Houses only start appearing once Uproar Forest is unlocked.
@@CesarTorres61296 11:09 They're talking about the failsafe in the video. Not when monster houses will naturally start spawning in dungeons. However DX did remove the one-room monster houses that did naturally spawn in silver trench
YEssssssssssssssssssssssss I wondered how they generated the dungeons so nicely for so long, even tried writing my own routines to emulate it, thanks for this video! And your take at the beginning isn't controversial in the slightest everyone who played those agrees they're superior to the mainline games don't @ me
Yoooo! I didn't know you were an MD fan! I've been following you for ages! Idk if you are aware of the advancements in the ROM hacking scene, but it'd be amazing if you wanted to join our group! Having someone as skilled as you around would be super helpful! :D
All right, one more comment from me. To start, the bit at the beginning about liking the Mystery Dungeon games more than the mainline series I have to say I completely agree with. I grew up on Pokémon games, but the ones that really left an effect on me emotionally are the Mystery Dungeon games, especially Explorers. The writing is absolutely fantastic, sorry is compelling and leaves me really caring about the characters.
@@Metalocif true, I think the only one sadder than that is the partner theme from the fourth game, but then again I haven’t played the second one in years
@@marz8386 agreed, specifically in the writing departement. like when do you actually cries playing a main series pokemon game, only real man cries playing PMD
I actually recognize generator 0x05 from my times playing other Mystery Dungeon games - that's one of the possible generations in Shiren the Wanderer. It's not seen in the main storyline, only in the bonus dungeons. The big room with the monster house is usually a themed monster house which is way deadlier - instead of filling it with monsters from the floor you're on, it selects a theme, like powerful monsters, monsters with ailment attacks, ghost monsters, etc. and puts them all in there, using all three possible levels. It's why all of the monsters were already generated - in Shiren, monster houses generate with all monsters already placed, but asleep, and entering the monster house wakes up all monsters on the floor. Usually running into this sort of room setup meant that if the stairs didn't spawn in the non-house room, you were screwed, since third-level monsters could very easily wipe the floor with you even up to the 50s. Countless times I've entered a seemingly normal room only to see "It's a Power House!" and immediately took a boulder to the dome for 200+ damage.
I feel like it just bailing out to a monster-house if it fails a floor too many times is because the giant monster-house generator has no chance of failing to generate itself, so the game won't ever get caught in an infinite loop.
yeah, but the line or plus arrangement wont fail either-- even with nonstandard rng deviations the lack of dummy rooms means that there's always a strong connection
Technically, there IS a chance that someone's luck is so bad that every floor is a one room monster house. It may not happen in this timeline, or the next, but somewhere out there, someone got so boned by RNG that they drop the game by the second dungeon for being too hard. (Sorry to mislead a bit, I know it's not actually possible to have it happen every floor, just wanted to meme a bit)
well, not entirely. the problem with getting into extremely tiny values of RNG like this is that there are a limited number of RNG states the game can be in, and "every floor is a monster house room" is probably rare enough that *no* values of RNG exist that can cause it.
I love this video, it's like my childhood "Mystery" has been unlocked. Especially "small" stuff like 17:18, finally explaining why there were so many wonder tiles all the time, it's bloody satisfying for some reason. 441-0 like dislike ratio is insane and deserved.
@@endymallorn Shiren was actually the second, the first was a Dragon Quest spinoff about Torneko from Dragon Quest 4, strangely we only got the second Torneko game in North America, on PS1. Shiren DS is a remake of the first Shiren game for SNES, but there's also a few other DS ones, the only other DS one to get localized was Shiren 5, which only got localized when it was ported to Switch/PC, which is the second time that one was updated and rereleased. But yeah there are some artifacts from the Shiren games in the DS PMD games, I commented about this in one of the other vids, but the PMD exclusive moves Wide Slash and Vacuum Slash are from the Shiren games, down to the animations, and the behavior of being able to pick up money by dashing on it and swapping is actually a real dev-intended mechanic from the Shiren games, just purposeless in PMD. In Shiren you can throw money to do fixed damage, or pot shenanigans. A lot of the items also have equivalents to some capacity that share animations, such as most PMD seeds/berries corresponding to Shiren grasses/herbs, and most PMD orbs corresponding to Shiren scrolls. Most of the held items are also renamed but shared between games. Despite that, the games feel quite different to play, and most Shiren games usually have a bunch of unique mechanics or new spins on mechanics. Such as Night Mode in the later games, and surprisingly deep and interesting crafting mechanics involving using enemies as living cauldrons. The Shiren games are overall harder but encourage very creative item abuse, in true roguelike tradition. Similar to Nethack, it's entirely possible to just, get out of any situation with the right items on hand.
I'm designing my own Mystery Dungeon game, so I suspect that this video will be not only entertaining and educational, but helpful specifically for that as well. Thanks in advance.
The Tiny Woods with 200+ dead ends is just what it feels like to go back to the old games after playing RTDX. As usual from your channel, this video was everything I ever could've hoped to learn about the topic in a very easy to digest format. Love your work dude :)
I think i can see how the 0x05 could be useful for testing. A simple layout with a monster room you know you find either by spawning in there or entering it, both situations that are rare in the base game and sorta out of the way to test otherwise.
I have no experience with them but I gotta say the music here gives me a fuckin headache who decided to make a song where every instrument is an off tune whistling noise
Outstanding video! As a PMD speedrunner and someone who has also made an implementation of the dungeon algorithm for a school project (lol), it's great being able to see the steps propely visualized alongside everything else. Definitely looking forward to more pmd content!
Kid me was right! I noticed the "rooms on the outside with hallways in the middle" layout in a couple of the dungeons in the dark future in PMD2 as a kid, and I was right that something was up with that! I presume that means PMD2 uses a similar algorithm?
Yeah! Every single normal algorithm seems so familiar, especially those late-in-the-story dungeons like the one you mentioned. This truly makes a lot of sense.
This is really fascinating! Once you get to the late game you start recognising patterns on the floors (especially when you have to do the same dungeon multiple times) but I never realised how clever the algorithm is!
Holy! This algorithm is something I've been super interested in learning about for years. Explorers specifically, but best I can tell it's the same algorithm. My gut feelings were right on some things, like how it uses 1x1 dummy rooms. I never got very far with my own research though.
Dungeon generation can still fail in Explorers, though usually not because of the connectedness test iirc. It's a lot rarer as a result, and doesn't feature Monster Houses (at least in dungeons that don't naturally have them, like Apple Woods), but it can still happen. Another wrinkle that wasn't brought up here: if generation fails on a mission target floor, the mission is unclearable because none of the mission-related mon spawn.
YES Mystery Dungeon Reverse Engineering! What I've been waiting for, there's no one that seems to care as much and I know you'll figure out extraordinary stuff! 🥳
Dungeon generation in these games is really interesting to think about. I don’t really understand all the technical stuff in this video but I understand enough of it to find it interesting Especially the failsafe monster house lol
@@yosoyysoyyo Not all genres follow a strict set of rules it meets more than a few that you find in most other roguelikes. Besides, it was directly inspired by rogue in the first place
I love this analysis of the map structure algorithms. PMD is one of my fave games when I was a kid and played it a LOT back then. I always thought that there was some sort of pattern with the map layouts which is why I sometimes think that if I see a certain pattern with the paths or room shapes I would have an idea where to move to get to the exit asap. Now it really makes sense. The reason why I had that gut feel with the maps in PMD was due to the algorithms you mentioned in the video. There's basically a pattern in the map generation.
These deconstruction videos are so interesting!! Also, I appreciate you leaving the text on the screen long enough to read without having to pause the video 🙏
At 9:35, there's an unreachable room(1x1 dummy), which should be an invalid layout. Instead, it's deleted. What's up with that? Nice vid! I'm 80% they reused the algorithms for the ds, and the switch, but Super has funky floors that don't fit these categories.
at a guess the "strongly connected" check only ensures that all the big rooms are connected and throws out dummy rooms if they're invalid? since on maps that are like 80% dummy rooms it could increase the generation time by like 5× if all dummy rooms had to be connected
I asked the same question and I found the answer when I started to attempt recreating the dungeon generation algorithm, so here's the explanation, copy-pasted from my own comment : "Turns out every floor in a dungeon has a 'connectivity' value that tells the game how many connections it should generate on that specific floor. This leaves some rooms unconnected, and every dummy 1x1 room left unconnected will be deleted in the step immediately following path creation (this is what happens around 9:40 and 10:05, the deleted 1x1 rooms were actually left unconnected because the floor's connectivity value was not high enough for the game to reach them, thus why they end up getting deleted after all paths are created) Explorers of Sky actually improved on this system by using this step to attempt connecting unconnected rooms to adjacent connected rooms, saving a lot of the maps that would be candidates for yeet in BRT/RRT, however unconnected 1x1 dummy rooms still get deleted the same way." @@samario7935 In a way you were kinda right, the game only checks for unconnected big rooms and doesn't look at unconnected 1x1 dummy rooms, but that's because they all get deleted before the 'room verification' step-
Really interesting information and a good breakdown of the algorithm. The RNG is surprisingly simple, might include it in my RNG collection :P Few things: - How is it determined which room will be the shop/monster room? - How are the numbers from the RNG used to create the level layout? - I guess the end was a teaser, as it makes no sense in the context of dungeon generation. I'm looking forward to it
This video is AMAZING!!!! I love this series so much and always wanted to know more about how the generation actually works, thank you SO MUCH for making this!!! :DDDD
Not rescue team, but when I was doing a randomizer of Explorers of Sky, I made it to Mt Bristle (or as the randomizer called it, Hilarious Backwater). No matter how many times I entered, the first floor was always two big rooms, one of which was a monster house. I assume that Rescue Team and Explorers use similar, if not the same algorithms for dungeon generation, and I just happened to get 0x05. It took me ages to get to floor 2, only to find out that floor was the One Room Monster House (0x02). It took so many attempts to get through, I was beginning to think that the randomized title for chapter 3 (Final Chapter) was accurate. Luckily, I got to floor 3, beat the rest of the dungeon easily and beat up the boss Rattata. Mystery Dungeon is fun.
First off this is a really good and well made video. Many props to you because Mystery Dungeon was a big part of my childhood. I had no idea how complex this was Second, I think 0x04 is used in the Explorers games. The layout reminds me of a few dungeons when your in the future. (I think in Chasm Cave?) Thrid, I love how many "failsaves" the game has. Fail to generate a room 10 times in a row? Have a monster house! Generate ??? Type hidden power 100 times? Here's fire type. And lastly, I would love to see a video explaining some of the unused moves/moves that trigger orb effects.
This is an incredibly cool and informative video, fantastic work! I'm actually surprised attack AI and enemy AI are affected by the RNG seed, I always imagined there was pathfinding of some sort that wouldn't need RNG. That'd be an interesting video to see a full explanation on!
Pokémon AI has some randomness, like deciding whether to turn at a junction, choosing which room exit to go to after entering a room, and choosing which move to use. If you're interested, about a month ago I made a video on how partner/enemy AI works.
As a matter of fact, I've been working on a roguelike game on my own and I've used this video as a reference on how to make the map generation algorithm.
After getting my memory refreshed about your brute-forced passwords vid by recently seeing a vid on the Justin Bailey code in Metroid, I'm so glad to see you're still uploading stuff!!!
This is a highly curious and necessary video deserving of more attention! I wonder, considering some quirks are present in red and blue here, how algorithms might have been altered in later installments... nonetheless, witnessing the generators and everything in work bridges the gap to seeing how several general floor types can come to be, as I'm sure some have noticed a handful of these through extensive play
I am a game developer who is currently creating a PMD fan game at the moment. I have all ready found some documentation of how these games generate their dungeons but this? Nothing like this. From the bottom of my heart, I thank you for documenting how dungeons are generated in a nice easy to follow way. Thank you so so much! It makes my life so much easier! :D
I too preferred this series of games more than the mainstream one! In the end, when you mention the storyline and stuff, you forgot one BIG thing that made us love those games: the ost :)
I've always wondered for years about how the PMD games' procedural dungeon generation worked, and I'm glad I finally have an answer to that question! Thank you so much for finally answering my questions, although I'm glad the theories I made on it all over the years were mainly true!
Great video! I love PMD and see how the game works behind the scenes is always fun. I wonder how the game works with rooms that need to generate specific items such as friend bow.
It's not much, but it was all that was needed for a game of its time. After playing the everliving shit out of this game, you tend to start noticing a bit on how the algorithm works, but still, it's cool to see it all laid out and how everything works together. Thanks for deconstructing my favorite game of all time.
The controversial opinion here would be if you liked the pmd series but liked the mainline series even more. Thanks for this in-depth analysis, I remember wall items being a thing but never knew there were bananas!
This is so so interesting! I always wondered how they generated the dungeons, and I never expected it to have been done exactly like this with several algorithms. I guess it kind of makes sense though, as it allows for more variety and combining them all into a single algorithm might be messy. I wonder how different/similar the algorithm is in Explorers of Time/Darkness/Sky. Also, the game ending up generating a full room monster house if it fails to generate a valid dungeon 10 times is kind of evil, thank god it seems to be very very rare lol
There's a hard item limit, huh? I know there's a limit on how far away a thrown item can drop before it can't and just gets deleted, but that one is new.
This is really cool, thank you for doing all this research into how the dungeon mapping works. I wonder if EOS and the other two use a similar LCRNG, or if they use something more unpredictable? it seems to me like there isn’t any sort of initial seed generation for red and blue rescue team, but there might be something like that for the exclusively DS titles
Having recently played around the randomizer in the Explorers games, the 2 room layout with one of them being a monster house was carried over into that game, and pops up during random dungeon generation to obliterate the player.
You know, I have to ask. You said at the end of the video that you would be covering more Pokemon Mystery Dungeon content in the future. Any chance that will come more to fruition soon? I came back to this old video of yours in sort of a nostalgic way because like you, I also consider PMD to be superior to the main series. I hope to see more content like this from you in the future!
This is helping me so much in my attempted recreation of a dungeon. If I might ask: could you elaborate on how paths are made between rooms? I'm not understanding entirely 😅
"Long processing times were partially fixed in the DS, the fix was that the DS was faster" lmfao yeah I played Red Rescue Team for the first time after years of playing Blue and the load times (and even lag when walking through dungeons) is incredible
In Explorers of Sky, generating a one-room monster house takes a long time because the game creates a one-room monster house, checks if the floor is valid and fails (because they're aren't two rooms). The game does this 10 times before activating the 'panic' case and creating... a one room-monster house. So it does actually get the correct layout, but wastes time creating the layout again and again. Since I haven't looked into RRT/BRT, I have no idea if this is the case in those games.
this is so cool!! will you be covering how wonder mail works as well?? been playing blue rescue team lately and i wonder how mail is generated/what characters mean which dungeon/reward/etc
Btw, if you aren't already planning this, I need you to deconstruct the codes you use to save yourself from a dungeon you fainted it. I'm immensely curious how those generate.