YTread Logo
YTread Logo

How We Solved the Worst Minigame in Zelda's History

Jun 09, 2021
Finally, more than 10 years after release, we've finally figured out how to solve the

worst

minigame

in Wind Waker thanks to reverse engineering. Now, how is it possible? How does this work? And, most importantly, how is this important to begin with? Well, I'm going to break down all of that in today's video, but before I get into the actual details of how the RNG works in this video game, I'm going to break down what sploosh kaboom actually is, so if you don't know, sploosh kaboom is a

minigame

. . which can be found in the center of the unexpected island and is being played by a character named Salvatore and Salvatore has a bunch of mini-games spread throughout the wind generator.
how we solved the worst minigame in zelda s history
Now this specific version of the battleship uses squid, three squid to be exact. four squid, three squid and two squid, you now have 24 shots to find these three squid in an 8x8 grid. There are a total of three rewards that you will get by defeating these three squids. You will get one for completing the game the first time. the second for beating a second time and then once if you can beat their high score which is 20 then 19 or less now why is this bad? Well, even if you are able to take the best possible statistical shots you have. a very low chance of being able to beat this due to the limited amount of shooting the game offers and on top of that, especially in a speedrun, you want to spend as few times as possible here and this is 30 minutes, so on average of how much time we can sacrifice time on a fast run means that only about 1/4 of all runs passed this point, which means we basically spent two hours to complete a single attempt, which wasn't the most fun and definitely ended .
how we solved the worst minigame in zelda s history

More Interesting Facts About,

how we solved the worst minigame in zelda s history...

We've done a lot of reboots now, how do we get from this to reverse engineering? I think the first thing we need to break down is basically give you a broad understanding of how RNG is generated in Wind Waker, and in fact, I'm going to get a friend named Sea Sunday in the video and he's going to help me explain exactly how Wind Waker generates its RNG. The key discovery we made was that Wind Waker uses Waichman Hill's pseudo-random number generator and always starts with a fixed seed. Weichmann Hill starts with 3 numbers we call RNG state values ​​each time the generator is called the state numbers change and a random number is produced the state changes follow a predictable pattern based on multiplication and division of prime numbers these values they keep changing and are more random The numbers are produced until our period energy runs out and Waichman Hill has a period of about seven trillion values ​​before repeating itself.
how we solved the worst minigame in zelda s history
Now normally, software that uses a random number generator like this will start with unpredictable state values ​​that are often based on the current time we call. These initial values ​​are the rng seed, as they determine all the random numbers that R&G will produce in the case of Wind Wakers. However, we found that the console always uses a three-hundred seed during the Buddha process and never resets this seed with this in hand, we can predict. each RNG value that Wind Waker will use and the game will always receive this same sequence of random numbers from the Weichmann Hill generator, since the squid positions in sploosh kaboom are based on these random numbers, we can calculate what squid positions you would get for each point in the orange ease period, now just knowing what our energy values ​​will be that Wind Waker will use and the board you get for each one is not enough to resolve sploosh kabooms during normal play, the RNG function is called dozens of times per frame and the number The number of calls depends on what is on the screen, what the players are doing, etc., for example in the Splish Kaboom room we know that each rupee behind the board causes one orange call per frame.
how we solved the worst minigame in zelda s history
Lincoln Salvatori caused one orange call per frame each and the dashboard lighting caused two. calls per frame, so when a run hits sploosh kaboom about 30 minutes later, there's no real way to know where we are in an rng loop at this point, we had finally figured out exactly how the RNG worked, how the RNG and We had made great progress, however, there is a problem, as you can see towards the end of the video. On Sunday, there is a major problem and that is how many calls per frame does Orange make, for example, 20 times, a hundred times per frame, how could we? possibly manipulate RNG in this way, well actually we don't need to manipulate RNG because since the order will always be the same we didn't have to manipulate it, we just have to figure out where we are in the RNG cycles and that's where this new tool coming in was developing comes into effect, now this is a much more advanced part and I'll let Peter, the lead developer of this tool, explain exactly how this knowledge was taken into consideration to develop this application that we are currently in. using it to this day, okay, you see the tool in action, let's explain how it works, so there are about six hundred and four thousand possible squid designs and it turns out that the game generates them all with approximately the same probability, but let's say we magically knew that .
Only a handful of squid layouts are possible, let's say these 12 boards we will call our candidate boards. What we can do is generate a heat map of where the squids on our candidate boards are likely to be, so our game ignores which squids are which and just. pay attention to which cells actually contain squid, so here I have produced a heatmap for each plate individually, we can then average these heatmaps together to produce an overall heatmap, so this percentage in each cell indicates the percentage of holes containing squid at that location and since we assume that all these boards are equally likely, that is also the probability of finding a squid in that given cell, so here we average all these boards together and when we are done, we will find that this cell in particular Right Here has a 58 percent chance of containing the squid, so let's say the user shoots that cell and gets a miss.
So what we can do is discard every board that contains a squid in that location, which happens to be this one now. We've ruled out these boards as impossible, we can actually generate a new heatmap by averaging the remaining boards, so here we can see that happening and once we've done that, we now know that this cell here has a 60% chance of containing a squid let's say the user shoots that cell and gets a hit this time now we can discard any board that doesn't contain the squid in that location which would be these two and again we can calculate a new heat map that is compatible with the information we have now we can shoot this cell, let's say we have a hit, we can discard this board because it doesn't contain a squid.
Now we have two boards left and at this point we can shoot any of these 50/ 50 cells let's say we shoot here and miss, we can discard this board and now we know exactly what the layout of the squid is and now the user is free to shoot the remaining squid as fast as you can, so it's clear that the name of the game is limiting the set of possible boards, but how do we get Wilner to do that? We will need to understand RNG as mentioned before Wind Waker uses a fixed seed for its RNG, particularly the first random number.
The generators will always be the number 0.69 and in fact these will always be the first 10 random numbers it generates, so what are these random numbers used for and which ones will be used to generate this blue sky boom board? Well, it turns out we can. I don't know right away, this is not enough information, we actually need to know what normally happens in various frames of the game, let's say the first frame of the game required three random numbers shown here, since these three result in the next frame . The game could actually request four random numbers.
I'll say another options interview, so now in addition to those three calls, we also need to make an additional call for the lighting of that object, and so on, each frame in the game can use a variable number of calls depending on what is happening , from 0 to hundreds, so based on this, it's actually even more accurate than the perfect frame to manipulate which ones are in G value and used to generate the dashboard. Let's give a simple example. I'll put all the possible RNG step values ​​at the top and on the screen here and then show which ones are in the G values ​​and which frames they zoom into, so let's say the first frame of the game consumes its first 13 RNG values if magically if we teleported to sploosh kaboom in the second frame of the game then we would actually show this board here and actually generating that board would consume some random number as shown here but if we had shown sploosh kaboom just a single frame later, then we would actually have gotten a totally different board frame, then another board frame, then another board and okay, so far this sounds pretty perfect, but like I said before, it's worse than that if there had been a little more . happening on frame four then maybe it would have required a few more random numbers and we would have even used a different board so you can't even do a perfect frame setup by restarting the game to get to that 100 100 100 RNG State and then get there to sploosh kaboom, it's a particular number of frames, no, it's much more precise than that, but you might be thinking, okay, we don't need to know exactly when we appeared, so swoosh kaboom, like we said before, we just need to be able to have a set limited possibilities for the board, so let's look at how we could do it.
Let's say instead of just having a specific RNG value that we want to display to cast kaboom, we're going to have. a range of possible RNG values ​​with a probability distribution over them, we'll show it here on the y-axis with a probability distribution, so let's see what board we would get if we spawned to do sploosh kaboom at each of these RNG step counts . here we can see that for each RNG step count you get a completely different board. It's not that if you appear in RNG coming out of step 15 you get a board similar to this board, you would appear in 14 steps, so given all these boards maybe we think that we are going to appear to make a boom around the RNG step 15 might be less it could be more it could be as little as 10 up to 20 probably nothing outside that region then we can do exactly what we want We showed earlier how to make a heat map and this time we will take a weighted average of all the boards under this bell curve, so We will first turn each board into its own heatmap ignoring where the squids are and then Let's average all the heatmaps together under the bell curve.
Okay, this sounds great so far. You might think we're in business. All we have to do is show this blushing Coulomb at roughly a hundred or a thousand orange steps and then we can produce a heat map like this and do the process shown before to try to beat Sploosh Kubo. Well, it turns out to be a little worse than that. We don't just show up for Sploosh Kabuemon like a thousand steps of RNG. It doesn't even appear in ten thousand or one hundred thousand orange steps. Top runners with world record pace usually show up to chaboom around the five point five million steps shown here.
Let's zoom in on this bell curve so it turns out that for a typical bell curve for when the best riders might show up to kaboom, there aren't just hundreds or thousands of boards, there are literally hundreds of thousands of boards that are possible and if we were to do the same averaging process that I showed before on all In these boards we would get a heat map that looks more like vests, it would be basically flat, sure the corners are a little less likely because it's harder for a squid to fit there, but this is basically the information we would get without them. any knowledge about the RNG, so this is clearly not going to work, we have to do something a little more sophisticated, so let's get down to what that more sophisticated thing is to explain this.
I'm going to watch a Linkous video. I am actually using the tool. I will apologize in advance. This will be the most complicated part of the video to try to make it a little easier to understand. I'm going to put a timeline at the bottom of the video. The screen all the way to the left of this timeline will be that critical moment when the game starts and we initialize the RNG to 100 100 100. I'm also going to put a little red cursor on the timeline that should correspond to where we are on the timeline of time. video, this video is already about 29 minutes into the run, right before Linkous gets the sploosh kaboom, so let's place the red cursor on thevideo, okay, I'll start playing the video and we can see what happens first. to the sploosh boom door, open it, the screen will go black and I will pause the video so it stops right when the screen goes black.
Upon entering the sploosh kaboom room is when the game generates the first board using the RNG. It's an extremely important moment, so let's mark it on our timeline. Now I'm going to start playing the video again and we're going to see Linkous play on this first board, so first talk, start the game and Linkous is actually going to throw. this first board filming totally arbitrary places just to know where the squid are good. Pause the video again. This is a key moment. Linkous is about to press a to exit the board after completing it and that turns out to be the exact one. moment when he generates the next board.
I know this sounds a little strange. You might expect him to spawn the next board at some point in the dialogue, but no, he actually spawns it right now. This is also very important, so let's mark it on our timeline. Okay, I'll start playing the video again, let's see what happens and then the cousin talks to We start another game and then we get on the board. Well, this is the first game we would really like to help Linkous win. Do we have enough information? Let's think about the information we have. I'm going to put Linkous in the top right corner and draw that axis that we had before for the RNG steps against probability, so we know that the link probably appeared to drop kaboom and the first board was generated around five point five million steps, that's only because that's what world pace runners in particular tend to do.
Note that this five point five million number comes from the duration between the start of the game and the first board that was generated, as shown here on the timeline. Also, there is some variability in when Linkous appears, so it will be indicated by this bell curve of our I think Linkous could have appeared in more or less, say a few hundred thousand steps, plus we also know the first board that was generated and that is this board here and we also know that certain orange step counts will generate certain boards, so this first board was all possible in some subset of the possible orange step counts, let's say, a argument mode, which was only possible in these four step counts, so the leftmost and rightmost match seem extremely unlikely given our bell curve of when we think the link has been shown. to sploosh kaboom, so let's just ignore those completely, we're left with these two matches and we can actually estimate their relative probability from this bell curve, so in particular we think this left match occurs in about five million three hundred eighty-nine thousand.
Two hundred and seventy-six steps have about a thirty percent chance, while the other match has about a seventy percent chance, so to reiterate, these two candidate RNG step counts are the only possibilities for when the could have generated the first board and these were its relative probabilities furthermore. we know the amount of time between the time the first board was generated and the second shown here on the timeline, as mentioned earlier in this blue Shaboom room the game uses about eight RNG calls per frame , so from this amount of time we can extrapolate a pretty good estimate of how many RNG steps occurred between the first board that was generated and then the second board that was generated.
By putting all this information together, we can produce an updated probability distribution for the RNG step count in which the second board was generated. These updates are a large bell curve on two small bell curves, each of these peaks is actually a small bell curve with a much narrower variation and there are two peaks because we are not yet sure which of the two counts of candidate steps was generated to emphasize the first board. The point is that the time between the second generation of the board and the first generation of the board has been a little longer than we would estimate.
Instead, we would estimate the peaks a little further to the right. This is what we actually have, given this probability distribution, we can do anything. Heatmap averaging process above to help Linkous get through this board, let's take a look at the video, so I'll play it now. It happens quickly, but notice how quickly the heat map shown at the bottom left shrinks on the actual board. Since Linkous takes shots after only a handful of shots, the tool actually knows the exact layout, so here we will also see Linkous intentionally shoot a bunch of missed shots because the pollution kaboom grants extra rupees for beating your own record, so you are intentionally trying to do it. make his record easier to beat on the next board okay let's make this small again so we're about to press a to exit this second board and we notice that that's exactly the moment when it spawns the third board the same as before, so Please note that in our timeline we now also know about the second board, so let's update our knowledge here, of course the second board itself can also occur only in certain specific RNG step counts .
Let's take a look at what they are here. We have three possibilities now. The far left and far right do not occur within our bell curve, so we can ignore them completely. I think it's also very important to note here that we just learned something very interesting, which is why this second board only occurs on the Wright bell curve. the peak is not at the peak of the left bell curve, which means that we now know when the first board was generated that was actually the candidate with a probability of 68.4%, which corresponds to the right peak.
Let's update our knowledge of that so that we now know exactly when the first dashboard was generated and when the second dashboard was generated, furthermore, we know the amount of time between the time the second dashboard was generated and the time the third was generated board, which is shown here on the timeline, so of course we can do exactly the same thing we did before. We can extrapolate the number of RNG steps between the second board generation and the third board generation and update our belief a second time. Note that we only have one bell curve peak because we know exactly when the second plate was generated.
Let's make the video big. again and here we can see Linkous play using the heat map information of this probability distribution, so first we get some rewards for being the second board and another reward. Now Linkous speaks to start the next game and watch how quickly he figures out exactly what went wrong. so first let's forget a single mistake, then we get a couple of hits and we already know it in a fairly small set, a few more hits we know it in one or two and now we know the exact board and we win and that's how the tool works.
Now, after this amazing breakdown from C Sunday and Peter going over how we figured out how RNG works, how this program works, and everything else you might be wondering, how is this even out loud in this speedrun? Well, I'm happy to say that it actually took a community vote on whether this should be allowed and won by a majority of two to three for this program to be allowed in official sprint races. Now I want to clear up a couple of questions that some people might have if you want to try and use this yourselves. or just in general why is this a lot first of all, first of all this is available to anyone, yes absolutely, it is publicly available and on the website anyone can access it.
I'll link it in the description of this video so anyone can try it out. Secondly, themselves, secondly, what is the program like, even knowing where you shot, whether it was a hit or a miss, or whether a squid was killed? So a lot of people think that it basically takes memory addresses from the game console using homebrew or using a screenshot tool, but it doesn't use any of that, in reality everything is done completely manually and this is the only reason why it is lets start with this because everything is done manually. Now you might be wondering, wait, but how did the program get updated so quickly?
Basically, it's just a lot of practice. Basically I hold my control room with one hand and then I put the other hand on the keyboard, so with one hand I hand it over, I'm shooting and I'm using my real fingers on my keyboard for a hotkey to hit or kill squid to that you can enter much faster if they were hits or misses, that's basically how you slow it down to do it so fast in the speedrun that you basically only practice with one hand on the controller, but obviously you can do it with two hands, it's a little bit more slow.
You may also be wondering which versions it claims to work on and I'm happy to say that this will work on all versions of the game, it will now work on every version of the GameCube game and each of them will be their HD and Gamecube release of the game, so any version can use it, anyone can use this program. It's absolutely incredible. I also want to quickly say that I think everyone who gathered here to make this possible served as a huge child. I'm going to put a list on the screen now of every person who helped with this and that includes everyone like Peter Christ gingko Trog Lang C Sunday shout out max the beautiful at the NSA who developed a tool that we were actually able to use to decompile the game code, the beautiful Dolphin developers who made it possible and the people developed a memory engine to read values ​​from memory while the game was running, everyone who came together to make this possible, thank you all so much.
This would not have been possible without everyone else and I want to be very clear that this was a huge community effort and could not have been done by one person. A big thank you to everyone who came together for this now. I quickly want to show you a clip of the result of all this hard work, so enjoy this clip quickly now, with all that being said, this is where I'll end this video if you want to see more breakdowns of glitches or RNG in Overall, feel free to leave a comment below suggesting what we might break down in the future because I really enjoy making this video.
It took me a long time, but I think it ended up working very well and I think overall having the images to improve. I understand these more complex things, you will definitely work as a foreman for the future, so feel free to leave any comments below to give me advice or suggestions or generally your suggestions as long as I can make a video in the future and I definitely will. Take a look at that, but anyway, thank you all so much for watching, don't forget to subscribe to the YouTube channel and if you want to see all these speedruns live when we created them with this tool in action, you can obviously check them out.
My Twitch channel on twitch.tv has a bar like a7, but without further ado, thank you all so much for watching. I love you so much and I'll see you in the next one later.

If you have any copyright issue, please Contact