I spent way too long on this experimenting, testing, and trying to crack the code. And somehow... I did. All with the help of Toad. Please like the video, it helps me out a lot.
I made a terrible mistake in the video: I forgot to include the funny dk sound. For this, I'm deeply sorry. I'll put in two (plus interest) in the next video. Again, I am really sorry for taking advantage of funny dk sound. I will do my best in the future.
@@relaxalax I thought I was going insane that I had missed it somewhere in the video, thank you for the clarification and we forgive you ;) (also great video your stuff always makes me smile and I hope nothing but the best for you seriously you're the man)
Btw the reason toad changes which card you get after a rotation is (probably) because he does an rng call each time he starts a new rotation to choose which one to do. Remember that rng is usualy the same for most stuff so any object that calls rng will change the rng everything else that calls it afterwards.
I wouldn't even be surprised if this was left in intentionally. Nintendo's in-house devs love to include tricks for gaming supposedly random stuff, such as the Toad Houses in NSMBWii
@@JumboDS64 I would believe you if it was something you could do relatively easily, but since you'd need to sit there for hundreds of toadtations to get the hand you need, I'm willing to bet it was probably just not noticed, or they just didn't care to remove it.
True. Ever since the way he was characterized in Luigi's Mansion, I imagined he isn't as courageous as his brother and looks up to him for inspiration.
@@CysmaWinheim As a younger brother myself, I have a similar relation to my older sibling. They're demonstrably better than me at everything, but it doesn't inspire jealousy in me but admiration.
@@CysmaWinheim| Yup. From what has been displayed in the games, the brothers' relationship is as fallows: 1. Luigi looks up to Mario b. Luigi wants to prove to his brother he can be courageous 3. Mario already considers Luigi his equal 4. Mario is unaware of how Luigi sees him 5. The brothers are extremely loyal to one another Personally, I head-cannon that Mario is the kind of guy who dotes on others, and growing up he always fought Luigi's battles for him. Until Princess Peach entered the picture and became the person Mario focused on. Luigi's lack of confidence is because he's used to having his brother step in, and he doesn't believe he can handle things on his own.
If you stay on this channel long enough you will realize that Alax has an absurd hate boner towards Luigi, like he genuinely can't talk good about him ever.
@@massgunner4152 ive been watching for almost as long as the channel has existed, when it was a smash 4 channel the hate is ironic, its just a stock internet joke to wildly punch down on luigi compared to mario, yet many of those same people will cite luigi as their favorite brother
As soon as you mentioned toad, I realized something. The way the DS works is like the GBA before it, where it loads up a list of random numbers based on a seed when a game is loaded, and then uses the number at the front of the list for anything that uses rng and then deletes it, moving on to the next one. So, when toad comes out onto the floor, he randomly decides what path to take to the other side, burning a number from the list, which is why your hand changes the way it does every toadtation.
That's how rng works in general. Yeah, some games may do some extra calculations to get an even more random number, but they all have the same base. Randomness is not real in a computer
I've actually been recently messing with Picture Poker, and while I haven't done anything like a decompilation with it (yet), I do have some insights into it that might be helpful. Your intuition that it uses a 30-card deck is correct (though with some implementation weirdness I'll get to). I had originally read that online, and was able to confirm that using memory watch. I also read, but didn't independently confirm, that Luigi's strategy is always to keep any matched cards and replace any unmatched ones, which sounds like the most likely strategy from what I've seen. I also did find the memory locations to look at Luigi's hand, as well as the status of the deck, and could probably figure it out again if you wanted to use that yourself. I didn't spend much time analyzing the RNG algorithm, but your observations do make sense based on what I did look at. My guess about the toadtation thing is that Toad has a handful of paths he can take around the casino, and every rotation, he calls the RNG function to choose which one to use. This has the effect of incrementing the RNG state, which causes the shift in the output cards you're seeing. As for the Schrodinger's Luigi, I think I know what's happening there. You see, the game doesn't really treat the deck as a single shuffled entity. Instead, the game essentially keeps six stacks of cards, one for each face value, and randomly chooses which stack to draw from whenever it needs another card. This explains the toadtation system as well, as the value of the card isn't decided until the card is actually drawn. The Schrodinger's card almost certainly happens when the game randomly chooses a stack that's already been depleted. I noticed that all of the examples you provided of the phenomenon were cards turning into the value of the card that "fell off the front." I don't remember exactly how the game handled the situation, so I'm not sure why sometimes it rounds up and other times rounds down, but I can look into that. Lastly, I just want to give a quick warning: Luigi's initial five cards are chosen at the same time as your five initial cards are, so some hands simply won't be possible even when manipulating toadtations if Luigi drew a card you need. Also, discarded cards aren't "shuffled" back into the deck until after the end of the entire round, so neither you nor Luigi can draw a discarded card as a replacement card.
wow amazing! great job! i believe if you created a video with your findings (just add subtittles or something), it'd be a great idea (if you have the time). TY
Thanks Luigi for enabling my gambling addiction! I probably spent more time playing his casino games than the main game itself (looking at you New Soup DS)
I played this game so much as a kid, I legit started to get a feel for how Luigi played. It got to the point where I could consistently clean house. After years of shelving the game though, I lost my feel for it, but I'll never forget how Luigi taught me to become a poker master.
I always find it interesting when a madman spends their free time deciphering something that they love with a passion, like those Zelda UA-camrs who have been going feral for 5 YEARS about the Zonai. By madman, I mean that what they do is insane and I respect them for pulling it off.
I like the fear quirk only happens with the unknown and generally scary things but if he knows whats going on he can just chill harder then anyone, enjoying gambling to take the stress off but he's the dealer so he gets the excitement for free forever, probably secretly rooting for you but if you lose that's just the game.
6:47 me aggressively trying to convince my friends that Mario's third brother Ravingu has always been available in every mainline Mario game with a very specific button code
The Luigi mini games in 64 DS only took up a few minutes of my childhood because I didn’t know where to unlock Luigi for the longest time, but once I found him (and Wario by extension), it was over
honestly this was a pretty fun video, luigi's casino is something of our childhoods but it's not ever really talked about to this degree, the Toadtations is a really huge discovery though so i think with a breakthrough like this it could lead some more discoveries further down the road, who knows maybe for other games like the roulette wheel toad acts as a sort of hint for that
@@Maxwell_theOne then you’re a jimmy a secret neutron level genius, congratulations LOL. No seriously though, a year later and I still remember being amazed that someone was able to figure this out. If that was you, then I applaud you, seriously, good job.
ok but in all of this: why is Luigi (supposedly owner of Luigi's casino) the croupier at the tables, a job probably tiring and difficult? shouldn't a owner be in charge of the personnel and administration? as you said, Wario is the most probable owner of a casino, so what if Wario is the real owner, and is using Luigi's handsome looks, and kind nature as a face, while relegating the man himself to the soulles job of dealing cards and ripping off costumers? in this essay I will
It's actually quite simple to explain why this happens if you understand how RNG works in Super Mario 64 (Pannenkoek made a great video on this, you might be able to understand this explanation without having watched it, but watching it first might make it easier to flow) We can infer that at the start of every Toadtation a single RNG call is made, presumably to pick between several different preset paths. This eats up one of the values in the RNG cycle. The length of the RNG cycle is 65,114, and nothing else but drawing cards and Toadtations seem to be calling the RNG function. So at 11 seconds per Toadtation it would take ~8.29 days (without drawing any cards) to get through a full cycle of the RNG values. You would not, however, have to wait the full RNG cycle to get what you want, as any possible hand would occur several times within it. Using my simple implementation for instance, I found 20 five star hands (5 pairs of them were back to back, and there was 1 place where a set of 4 appeared back to back), and the largest distance between any of them was 23,559. So the longest you'd actually ever have to wait _(in this implementation)_ is ~3 days. (my implementation is definitely is *not* how the game actually does it, because I searched the entire list and could not find the pattern as shown in the video at 9:07 for any longer than 7 cards)
I get where you’re going, but you are making an assumption that the RNG formula is exactly the same. It could be minor, but the simulation is a little imperfect.
@@BinaryHedgehog1 I didn't just blindly assume it uses the same algorithm. The fact that each Toadtation cycles the cards that you get by 1 proves that it has to be using a linear congruential random number generator (LCRNG), which is the same type of RNG that Super Mario 64 uses. The developers already had a working RNG algorithm so it seems rather silly for them to make an entirely new, and probably worse, one. Where I must have gone wrong in my simulation was not the RNG algorithm itself, but how I used its output to generate the cards. I simply took the output, multiplied it by 6, divided by 65536, and then rounded down. This gives me an integer from 0 to 5 to correspond to the cards Cloud to Star. I also tried an function that took the modulo 6 of the output but that didn't line up either.
@@notbaconzzzzzzz Sorry, the language used was harsh and vague. My point was less how the RNG worked and more what formula it’s using to change the number, and I’m basing this off an assumption that SM64DS was mostly written from the ground up using very little SM64 code. In other words, my problem isn't with how the numbers are called, it's in what order the numbers appear.
This will sound strange but I have been waiting for ANYONE to make such an extensive video about this specific minigame. I'm glad it finally happened. I knew it was just a matter of time. Both me and my dad were obsessed with playing this
The minigames in New Soup and 64 DS were honestly the best part of those games. I'm glad to still see some love for them, especially Luigi's gambling for kids.
honestly that's pretty fascinating and I have a good feeling it'll spur someone who knows how to properly rip apart the code and find out more detail regardless it's pretty brilliant of you to figure out it's tied to Toad's rotations on the top screen, meaningless flavor for most players but a handy dev tool for cycling the RNG like that.
the system where each player is dealt 5 cards, and then allowed to exchange them, is in a really popular poker variant (usually played outside of casinos i think) called 5 card draw
I don't recall the last time I saw the floating Ganondorf Amiibo, but seeing him again made me smile, he was my favourite character when I began watching you! This video was fuckin hilarious though, I loved it sm.
I am a huge fan of this. I can tell you had a blast making it, and I definitely wouldn’t be opposed to seeing more videos like this. It’s just fun seeing old games from my childhood trying to be cracked, especially ones as simple as this one.
Programmer here. So the way randomness works is you don't really have true randomness. PCs and consoles could try to use some unreliable inputs, like small variants in voltages to the hardware components, but that is just going to be different for each user, and there's no guarantee you'll get randomness out of it. It may be consistent for different users in different ways, and you have bi way of knowing how that impacts randomness. So randomness needs to come from the deterministic, consistent, reliable mechanisms inside the CPU. The solution is a mathematical formula that spits out series of numbers one after the other which look sufficiently random and don't have an obvious pattern to them (at least you have to go through an insane amount of numbers to find the point where they start repeating). So anything that needs randomness just pulls the next number from this formula. It's likely the cards are being dealt entirely with RNG this way and no deck is being simulated. Since there are only 10 cards and you may assume the deck is shuffled between each hand this isn't something you'd notice in normal play. My guess is Toad himself is pulling a single value from the RNG every "toadation" he does. Could be used to randomize how long he waits before walking again, could be used to randomize his next action, who knows. I haven't played the game in a while. So when toad does a "toadation" that is one number the RNG won't provide for a card since it is used by Toad instead, so everything shifts over by one. As for the changing cards... it could be like you said where the game cheats to modify your hand. Or maybe some other random factor outside of the RNG is used to modify the hand occasionally. There are other sources of randomness and early consoles specifically tended to get creative since there was no built-in randomness function so they needed to invent their own. For example the time or exact position a user interacts with a touchscreen can be a good source of pseudorandomness. By the way the time you power the console or the time you spend idle on the title screen or something is probably used to "seed" the RNG so it will generate a DIFFERENT sequence of numbers each time you power on the game.
So that’s how you decrease the odds of getting a Mario by manipulating the z position of a funny mushroom man in an alternate reality with Yoshi flowers and unlocking Waliwigi through TOR browsers.
I don't understand why your not more popular. Your videos consistently have good humor and great outlooks. Your music is also always fantastic. Keep up the great work Alax. 💖
Can't say I was expecting this sort of video from you, but speaking as someone that played the hell out of this minigame as a kid (and made some pretty serious in-game bank with it iirc), this was quite the treat.
Luigi is the guy who wishes he could be his heroic brother saving princesses, but he has a super padded bank account cuz he has like, 4 money making side hustles Money cant buy happiness but it aint bad for second place
This is some insane learning and check of the code behind a simple minigame from a 2006 ds game Also the rng is in my eyes 1 in a 100 unless you crack the code by betting or waiting out the rotation of the background in real time while the game is on and likely the game is checking and deciding which card to put out and the sheets are like a bingo board but with one card different from the line so yeah crazy for something so simple
if it's based on an RNG seed (most likely) then i'd imagine the full card sequence is 65,536. or in the ballpark... it can be complex. and that's also assuming it's an unsigned 32-bit integer, which is most likely but not certain. so it'd be a nightmare, basically. maybe someone could do it, like how people who do speedrun attempts of Peach's Target Test can advance RNG one number at a time on the character select screen, then find exactly where in the sequence they currently are, then advance to a specific place to manipulate RNG for Bob-Ombs and stuff. But in Melee, narrowing down the exact position in the RNG sequence usually requires being able to see the past 15-25 characters selected by the RNG on the CSS. For this game, it may take a lot more data than that to narrow it down. Maybe not impossible though edit: the more immediately practical application would be being able to know what Luigi's hand is. i don't actually know the rules of Poker but i'd imagine just beating him would require a decent amount less manipulation than, say, being dealt 5 of a kind every hand.
I absolutely love this video! It’s so unapologetically RelaxAlax and I’m all here for it!!! 👏👏👏 I hope someone decompiles this soon so we can get part 2 🤞🤞
I am so happy for clicking on this video. Perhaps one day we'll figure out the green plumber's game, finally putting him out of business once and for all
Amazing video, this is...insane. The fact that these discoveries were even made just goes to show the nuances of the programming in this one tiny minigame.
so obviously I'm way late to the party here and other comments have stated the same, but what seems to be happening is that rather than keeping track of a deck of cards, the game is making an RNG call every time a new card gets dealt. What this means is that when something random needs to happen, it calls a function that inputs the most recent number used for a random outcome, and goes through a randomization process to output a new number. If you imagine the possible results are 0-99, then the sequence may be that the first random number generated is 55, then 21, then 94, then 74, etc. When called to deal cards, each number from this RNG sequence gets translated into a card value. Say, 0-16 deals a cloud, 17-33 deals a mushroom, etc. So when reloading from a save state, you get the same RNG sequence each time, which translates into the same cards each time. Except, as happens with many games, this RNG sequence is used for all randomness the game needs, not just this one sequence. So when Toad finishes an animation in the background and the game needs to determine which random background animation to play next, it calls that same sequence, eating a number and advancing the RNG, causing the observation that the first card in the sequence disappears and the rest get pushed up a placement. As for things like the Shrodinger's Luigi, there might be a bug in how the RNG numbers are processed in different card slots. For instance, let's say that when the third card in your hand is being dealt, RNG values 50-65 are Luigi, and 66-83 are Mario, but then when a card is being dealt to the second slot in your hand, the RNG values are instead processed as 50-66 is Luigi while 67-83 are Mario. That means if the RNG sequence includes the value 66, then which card that gets interpreted as will vary depending on which slot it's generated for.
Toad: he thinking about it two hard isn’t he? Luigi: yup. He actually considered watching your walk cycle to break this game. Toad: ( starts laughing, stops and looks at Alex, and then back to Luigi.) ho you’re serious. Luigi: yup. Toad: wow. What a try hard.
In Toad's mushroom houses In Super Mario Bros. 3, all boxes contain all prizes. Each box is like a hidden roulette wheel that shows what it has when you click it.
I spent way too long on this experimenting, testing, and trying to crack the code. And somehow... I did. All with the help of Toad.
Please like the video, it helps me out a lot.
I made a terrible mistake in the video: I forgot to include the funny dk sound. For this, I'm deeply sorry. I'll put in two (plus interest) in the next video. Again, I am really sorry for taking advantage of funny dk sound. I will do my best in the future.
@@relaxalax If it means we'll get DK galore in the next one then all is forgiven
@@relaxalax watch out the Genshin player Are CoMinG
@@relaxalax I thought I was going insane that I had missed it somewhere in the video, thank you for the clarification and we forgive you ;) (also great video your stuff always makes me smile and I hope nothing but the best for you seriously you're the man)
The amount of cosmic power you have unlocked terrifies me.
Took hours for Alex to learn the lesson the Courier learned in a second: the game was rigged from the start
i'm imagining toad with a benny suit, that is a mod i would play
Luigi "Benny" Mario.
rigatoni*
Fallout New Vegas
@@pixelator5312 BAPPITY BOPPY, MARIO! YOU PIZZA SHIT!
Btw the reason toad changes which card you get after a rotation is (probably) because he does an rng call each time he starts a new rotation to choose which one to do. Remember that rng is usualy the same for most stuff so any object that calls rng will change the rng everything else that calls it afterwards.
Hey, what’s up!
@@lagswitch4322 Hi :D
This would be correct
I wouldn't even be surprised if this was left in intentionally. Nintendo's in-house devs love to include tricks for gaming supposedly random stuff, such as the Toad Houses in NSMBWii
@@JumboDS64 I would believe you if it was something you could do relatively easily, but since you'd need to sit there for hundreds of toadtations to get the hand you need, I'm willing to bet it was probably just not noticed, or they just didn't care to remove it.
"verifiably true that luigi is worth less than mario in the lore" nonsense, its luigis casino, he's just humble and loves his bro!
True. Ever since the way he was characterized in Luigi's Mansion, I imagined he isn't as courageous as his brother and looks up to him for inspiration.
@@CysmaWinheim As a younger brother myself, I have a similar relation to my older sibling. They're demonstrably better than me at everything, but it doesn't inspire jealousy in me but admiration.
@@CysmaWinheim| Yup. From what has been displayed in the games, the brothers' relationship is as fallows:
1. Luigi looks up to Mario
b. Luigi wants to prove to his brother he can be courageous
3. Mario already considers Luigi his equal
4. Mario is unaware of how Luigi sees him
5. The brothers are extremely loyal to one another
Personally, I head-cannon that Mario is the kind of guy who dotes on others, and growing up he always fought Luigi's battles for him. Until Princess Peach entered the picture and became the person Mario focused on. Luigi's lack of confidence is because he's used to having his brother step in, and he doesn't believe he can handle things on his own.
If you stay on this channel long enough you will realize that Alax has an absurd hate boner towards Luigi, like he genuinely can't talk good about him ever.
@@massgunner4152 ive been watching for almost as long as the channel has existed, when it was a smash 4 channel
the hate is ironic, its just a stock internet joke to wildly punch down on luigi compared to mario, yet many of those same people will cite luigi as their favorite brother
I can't believe Toad's been trying to help us cheat-out the smug Luigi for ten whole years
Toad is silently helping us get the winning hand and is a fellow card counter like us but uses pacing for some reason
actually it's been 18 years🤓
@@lucasf4rt523 16 years
@@Lou-yf1jo super mario 64 came out in 2005
@@lucasf4rt523 SM64 released in 1995 on the N64
Sm64DS was on 2005.
Nsmb was 2006
Luigi once hit me with 5 of a kind with luigi cards... you got to respect the luigi
He once beat me with a 5 of a kind. Was very impressed.
Why is Dr.Mario allowed in smash, but not degenerate gambler Luigi?
Facts
People already complain about rng in smash enough
That misfire REALLY makes sense now
casino luigi would definitely make for a nice skin or echo.
Luigi Side b is enough of a gamble as is (i can control when it misfires I swear)
the luigi casino minigames stole hours and hours away from my childhood, thanks for the video alax!
Luigi =Darby?
@@wienerman-pn1em is that a jojo reference???
As soon as you mentioned toad, I realized something. The way the DS works is like the GBA before it, where it loads up a list of random numbers based on a seed when a game is loaded, and then uses the number at the front of the list for anything that uses rng and then deletes it, moving on to the next one. So, when toad comes out onto the floor, he randomly decides what path to take to the other side, burning a number from the list, which is why your hand changes the way it does every toadtation.
This has nothing to do with the console. Thats just the way those games got programmed.
That's how rng works in general. Yeah, some games may do some extra calculations to get an even more random number, but they all have the same base. Randomness is not real in a computer
@@sergioabrb Randomness is not real anywhere
"All chaos is ordered." - Toby Fox
@@blamethefranchise1473 Whether that is or isn't true is philosophical and unprovable.
I've actually been recently messing with Picture Poker, and while I haven't done anything like a decompilation with it (yet), I do have some insights into it that might be helpful.
Your intuition that it uses a 30-card deck is correct (though with some implementation weirdness I'll get to). I had originally read that online, and was able to confirm that using memory watch. I also read, but didn't independently confirm, that Luigi's strategy is always to keep any matched cards and replace any unmatched ones, which sounds like the most likely strategy from what I've seen. I also did find the memory locations to look at Luigi's hand, as well as the status of the deck, and could probably figure it out again if you wanted to use that yourself.
I didn't spend much time analyzing the RNG algorithm, but your observations do make sense based on what I did look at. My guess about the toadtation thing is that Toad has a handful of paths he can take around the casino, and every rotation, he calls the RNG function to choose which one to use. This has the effect of incrementing the RNG state, which causes the shift in the output cards you're seeing. As for the Schrodinger's Luigi, I think I know what's happening there. You see, the game doesn't really treat the deck as a single shuffled entity. Instead, the game essentially keeps six stacks of cards, one for each face value, and randomly chooses which stack to draw from whenever it needs another card. This explains the toadtation system as well, as the value of the card isn't decided until the card is actually drawn. The Schrodinger's card almost certainly happens when the game randomly chooses a stack that's already been depleted. I noticed that all of the examples you provided of the phenomenon were cards turning into the value of the card that "fell off the front." I don't remember exactly how the game handled the situation, so I'm not sure why sometimes it rounds up and other times rounds down, but I can look into that.
Lastly, I just want to give a quick warning: Luigi's initial five cards are chosen at the same time as your five initial cards are, so some hands simply won't be possible even when manipulating toadtations if Luigi drew a card you need. Also, discarded cards aren't "shuffled" back into the deck until after the end of the entire round, so neither you nor Luigi can draw a discarded card as a replacement card.
This is awesome insight man thank you! I’ve been looking for more people to look into this mini game. Have you decompiled it yet by any chance?
wow amazing! great job! i believe if you created a video with your findings (just add subtittles or something), it'd be a great idea (if you have the time). TY
Childhood memories with New Super Mario Bros. As a kid, I was admittedly addicted to playing these once I hit the maximum amount of coins.
max coins? is this the original nsmb or nsmb2
Thanks Luigi for enabling my gambling addiction!
I probably spent more time playing his casino games than the main game itself (looking at you New Soup DS)
I played this game so much as a kid, I legit started to get a feel for how Luigi played. It got to the point where I could consistently clean house. After years of shelving the game though, I lost my feel for it, but I'll never forget how Luigi taught me to become a poker master.
It's pretty cool, the sorts of subtle patterns the human brain can learn.
I also had this experience! I had so many coins, then years later I booted the game up again and had no memory as to how I won every time
@@louchiessame
i recently got a dsi and got my dad to let me buy new super mario bros. i bought it yesterday and now i have a gambling addiction at 13.
I always find it interesting when a madman spends their free time deciphering something that they love with a passion, like those Zelda UA-camrs who have been going feral for 5 YEARS about the Zonai.
By madman, I mean that what they do is insane and I respect them for pulling it off.
There is a thin line between Madness and Brilliance.
Veeeeerrrrryy thin…
I like the fear quirk only happens with the unknown and generally scary things but if he knows whats going on he can just chill harder then anyone, enjoying gambling to take the stress off but he's the dealer so he gets the excitement for free forever, probably secretly rooting for you but if you lose that's just the game.
He does clap when you win and shrug when you lose, so he is rooting for you!
luigi truly is powerful
6:47 me aggressively trying to convince my friends that Mario's third brother Ravingu has always been available in every mainline Mario game with a very specific button code
It's easier if you give them a complex code that's not even possible with two hands.
The Luigi mini games in 64 DS only took up a few minutes of my childhood because I didn’t know where to unlock Luigi for the longest time, but once I found him (and Wario by extension), it was over
Serperior needs HUGS
How dare you rig my casino.
Liugi
Luiig
Igiul
Luggi
Lucas
“Keep being stupid. It will work eventually” is the perfect motto to live life by
"Poker: The Among Us Of Rich People" is such a cursed sentence I can't
Be careful Alax. Luigi doesn't like it when you poke holes in his operation, and we all know how ruthless the green man can be.
run
@@jebdeb5181Oh Shit
My bad for not paying you back 😭😢
So that's wat happened to him?😊
Mr L is coming for him.
@@jebdeb5181YOU’RE TOO SLOW!!
Can’t wait for Alax to get a gambling addiction
I can.
Then stop being patient
honestly this was a pretty fun video, luigi's casino is something of our childhoods but it's not ever really talked about to this degree, the Toadtations is a really huge discovery though so i think with a breakthrough like this it could lead some more discoveries further down the road, who knows maybe for other games like the roulette wheel toad acts as a sort of hint for that
magmarxio cameo
If you actually figured this stuff out on your own, you are a secret jimmy neutron level genius.
Huh. Guess that’s me.
@@Maxwell_theOne then you’re a jimmy a secret neutron level genius, congratulations LOL. No seriously though, a year later and I still remember being amazed that someone was able to figure this out. If that was you, then I applaud you, seriously, good job.
What a Nerdtron
INTO THE STARS, FUELED BY CANDY BARS
@@ProfessorIdiot123RIDES A KID WITH A KNACK FOR INVENTION.
I loved this minigame as a kid, just being able to play with a videogame character and seeing them in front of you was so charming
omg you gotta learn about night at the inventory
ok but in all of this: why is Luigi (supposedly owner of Luigi's casino) the croupier at the tables, a job probably tiring and difficult? shouldn't a owner be in charge of the personnel and administration? as you said, Wario is the most probable owner of a casino, so what if Wario is the real owner, and is using Luigi's handsome looks, and kind nature as a face, while relegating the man himself to the soulles job of dealing cards and ripping off costumers?
in this essay I will
where's the essay commenter
Perchance
@@livenishikireactionTEN YEARS IN THE JOINT MADE YOU A FUCKING ESSAY
@@livenishikireactionhe was executed, in this essay i will
i died psychologically when you just casually put dimes in the gba slot like it's nothing
I think those are euros
Those actually look like Canadian toonies
they use Looney Tunes as currency in Canada
I think it’s Canadian currency.
oh ok
Luigi has the suave energy for dealing poker. Wario would just watch people throw their money into his slot machines.
It's actually quite simple to explain why this happens if you understand how RNG works in Super Mario 64 (Pannenkoek made a great video on this, you might be able to understand this explanation without having watched it, but watching it first might make it easier to flow)
We can infer that at the start of every Toadtation a single RNG call is made, presumably to pick between several different preset paths. This eats up one of the values in the RNG cycle.
The length of the RNG cycle is 65,114, and nothing else but drawing cards and Toadtations seem to be calling the RNG function. So at 11 seconds per Toadtation it would take ~8.29 days (without drawing any cards) to get through a full cycle of the RNG values.
You would not, however, have to wait the full RNG cycle to get what you want, as any possible hand would occur several times within it. Using my simple implementation for instance, I found 20 five star hands (5 pairs of them were back to back, and there was 1 place where a set of 4 appeared back to back), and the largest distance between any of them was 23,559. So the longest you'd actually ever have to wait _(in this implementation)_ is ~3 days.
(my implementation is definitely is *not* how the game actually does it, because I searched the entire list and could not find the pattern as shown in the video at 9:07 for any longer than 7 cards)
I get where you’re going, but you are making an assumption that the RNG formula is exactly the same. It could be minor, but the simulation is a little imperfect.
@@BinaryHedgehog1 I didn't just blindly assume it uses the same algorithm. The fact that each Toadtation cycles the cards that you get by 1 proves that it has to be using a linear congruential random number generator (LCRNG), which is the same type of RNG that Super Mario 64 uses. The developers already had a working RNG algorithm so it seems rather silly for them to make an entirely new, and probably worse, one.
Where I must have gone wrong in my simulation was not the RNG algorithm itself, but how I used its output to generate the cards. I simply took the output, multiplied it by 6, divided by 65536, and then rounded down. This gives me an integer from 0 to 5 to correspond to the cards Cloud to Star. I also tried an function that took the modulo 6 of the output but that didn't line up either.
@@notbaconzzzzzzz Sorry, the language used was harsh and vague. My point was less how the RNG worked and more what formula it’s using to change the number, and I’m basing this off an assumption that SM64DS was mostly written from the ground up using very little SM64 code.
In other words, my problem isn't with how the numbers are called, it's in what order the numbers appear.
This will sound strange but I have been waiting for ANYONE to make such an extensive video about this specific minigame.
I'm glad it finally happened. I knew it was just a matter of time.
Both me and my dad were obsessed with playing this
Wake up babe new Alax video❤
🕺🎶
Yes, honey 😞
Mathmaticians after 100s of years of staring at spirals to find another number than can't be divided cleanly.
Always knew Toad was up to something but could never quite figure it out
The minigames in New Soup and 64 DS were honestly the best part of those games. I'm glad to still see some love for them, especially Luigi's gambling for kids.
calling the nsmb series just new soup will never get old
Hearing Alax call Poker “Among Us” for rich people is the real life equivalent of gaining Insight in Bloodborne for me.
12 minutes to master everything my childhood was about
1:30 Warior was removed as CEO of the Casino after refusing to pay out a Jackpot.
honestly that's pretty fascinating and I have a good feeling it'll spur someone who knows how to properly rip apart the code and find out more detail
regardless it's pretty brilliant of you to figure out it's tied to Toad's rotations on the top screen, meaningless flavor for most players but a handy dev tool for cycling the RNG like that.
the system where each player is dealt 5 cards, and then allowed to exchange them, is in a really popular poker variant (usually played outside of casinos i think) called 5 card draw
Ok but one question
Who asked transformers kid?
@@DrDavidTheTrustableOne is there a point to your reply or did you do it just because you thought the insult was cool in your head
1:50 Maybe Wario was the original owner/manager but then Luigi bought the place? Idk.
I just wanted to say that the spade with the power-up eyes looked really good and like an actual asset to a Mario game. that is all
Yea
Luigi: "how did you break my casino?"
Player: *looks at toad*
Toad: "huh?"
Toad: What did i do?
This was oddly satisfying to learn the Ai of Lugi's Casino of all things
Please nintendo, bring back luigi's casino, better than las vegas or monaco
I don't recall the last time I saw the floating Ganondorf Amiibo, but seeing him again made me smile, he was my favourite character when I began watching you! This video was fuckin hilarious though, I loved it sm.
You fly higher than your guardian angel. Into the fire, dancing with danger. You place your bet with no regrets in this game of...
LUIGI CASINO!!!
I am a huge fan of this. I can tell you had a blast making it, and I definitely wouldn’t be opposed to seeing more videos like this. It’s just fun seeing old games from my childhood trying to be cracked, especially ones as simple as this one.
Toad was never delivering drinks. He was sneaking in the cards you could use to win. You are just awful at signaling for him
Where do you go for eight dollar eggs stop going there
Nobody let him know you can just keep quitting out of the game every time Luigi gives you a shit hand
And Luigi still hasn’t blinked.
To answer that, we need to talk about parallel flushes
Programmer here.
So the way randomness works is you don't really have true randomness. PCs and consoles could try to use some unreliable inputs, like small variants in voltages to the hardware components, but that is just going to be different for each user, and there's no guarantee you'll get randomness out of it. It may be consistent for different users in different ways, and you have bi way of knowing how that impacts randomness. So randomness needs to come from the deterministic, consistent, reliable mechanisms inside the CPU.
The solution is a mathematical formula that spits out series of numbers one after the other which look sufficiently random and don't have an obvious pattern to them (at least you have to go through an insane amount of numbers to find the point where they start repeating). So anything that needs randomness just pulls the next number from this formula.
It's likely the cards are being dealt entirely with RNG this way and no deck is being simulated. Since there are only 10 cards and you may assume the deck is shuffled between each hand this isn't something you'd notice in normal play.
My guess is Toad himself is pulling a single value from the RNG every "toadation" he does. Could be used to randomize how long he waits before walking again, could be used to randomize his next action, who knows. I haven't played the game in a while. So when toad does a "toadation" that is one number the RNG won't provide for a card since it is used by Toad instead, so everything shifts over by one.
As for the changing cards... it could be like you said where the game cheats to modify your hand. Or maybe some other random factor outside of the RNG is used to modify the hand occasionally. There are other sources of randomness and early consoles specifically tended to get creative since there was no built-in randomness function so they needed to invent their own. For example the time or exact position a user interacts with a touchscreen can be a good source of pseudorandomness.
By the way the time you power the console or the time you spend idle on the title screen or something is probably used to "seed" the RNG so it will generate a DIFFERENT sequence of numbers each time you power on the game.
I remember sitting there for like10 hours straight one day playing luigi poker when I was 7 or 8. totaly relatable
So that’s how you decrease the odds of getting a Mario by manipulating the z position of a funny mushroom man in an alternate reality with Yoshi flowers and unlocking Waliwigi through TOR browsers.
0:02
"I'm flat broke!!! Why is rent impossible?!? WHY ARE EGGS 8 DOLLARS!?!?!-"
alax: 5 stars, just like you gotta rate this video.
me: just like you gotta rate Mr.Puzzles.
I don't understand why your not more popular. Your videos consistently have good humor and great outlooks. Your music is also always fantastic. Keep up the great work Alax. 💖
Can't say I was expecting this sort of video from you, but speaking as someone that played the hell out of this minigame as a kid (and made some pretty serious in-game bank with it iirc), this was quite the treat.
Looking Cool, Alax
I literally have more than a thousand coins in the Card Game.
Got them with risk management and sometimes the biggest luck you've ever seen
Luigi is the guy who wishes he could be his heroic brother saving princesses, but he has a super padded bank account cuz he has like, 4 money making side hustles
Money cant buy happiness but it aint bad for second place
This is some insane learning and check of the code behind a simple minigame from a 2006 ds game
Also the rng is in my eyes 1 in a 100 unless you crack the code by betting or waiting out the rotation of the background in real time while the game is on and likely the game is checking and deciding which card to put out and the sheets are like a bingo board but with one card different from the line so yeah crazy for something so simple
if it's based on an RNG seed (most likely) then i'd imagine the full card sequence is 65,536.
or in the ballpark... it can be complex. and that's also assuming it's an unsigned 32-bit integer, which is most likely but not certain.
so it'd be a nightmare, basically. maybe someone could do it,
like how people who do speedrun attempts of Peach's Target Test can advance RNG one number at a time on the character select screen, then find exactly where in the sequence they currently are, then advance to a specific place to manipulate RNG for Bob-Ombs and stuff.
But in Melee, narrowing down the exact position in the RNG sequence usually requires being able to see the past 15-25 characters selected by the RNG on the CSS.
For this game, it may take a lot more data than that to narrow it down. Maybe not impossible though
edit: the more immediately practical application would be being able to know what Luigi's hand is. i don't actually know the rules of Poker but i'd imagine just beating him would require a decent amount less manipulation than, say, being dealt 5 of a kind every hand.
Luigi Gambling is easily the best kind of gambling
I absolutely love this video! It’s so unapologetically RelaxAlax and I’m all here for it!!! 👏👏👏 I hope someone decompiles this soon so we can get part 2 🤞🤞
First video I’ve seen from your channel - subscribed! Love the style and humor :)
I really enjoyed this one! It was interesting to hear your process, and it was entertaining to watch, as always!
Good to know this mini game
1. Doesn't use a predetermined deck
2. Doesn't passively advance RNG unless Toad moves
I wonder what algorithm it uses?
I laughed hysterically multiple times throughout this video. Well done, ★★★★★.
I was playing Luigi poker yesterday for nostalgia. I feel spied on.
4:22 edging luigi😊😊😊
So the moral is that, when gambling, memorize the rotations of the waiter in order to win. Sweet, gonna spend all my savings tomorrow
the man never misses, love to see the content as usual
I only recently learned that this is the casino used in super mario sunshine
This man risked falling into gambling's rabbit hole just for entertainment, what a mad lad
That intro with "stay with me" playing in the background was Noice 🎉
Dealer Luigi for Smash!
I am so happy for clicking on this video. Perhaps one day we'll figure out the green plumber's game, finally putting him out of business once and for all
Anyone else want's Luigi's casino back in the next Mario game?
Amazing video, this is...insane. The fact that these discoveries were even made just goes to show the nuances of the programming in this one tiny minigame.
What an amazing video! I hope somebody takes advantage of this to make a speedrun of some kind
Hey look! A baba!
1:40 maybe he isn’t scared cuz he isn’t getting killed there lol
You’ve done the work we didn’t deserve but desperately needed. I’ve always wondered how this game worked!
so obviously I'm way late to the party here and other comments have stated the same, but what seems to be happening is that rather than keeping track of a deck of cards, the game is making an RNG call every time a new card gets dealt. What this means is that when something random needs to happen, it calls a function that inputs the most recent number used for a random outcome, and goes through a randomization process to output a new number. If you imagine the possible results are 0-99, then the sequence may be that the first random number generated is 55, then 21, then 94, then 74, etc.
When called to deal cards, each number from this RNG sequence gets translated into a card value. Say, 0-16 deals a cloud, 17-33 deals a mushroom, etc. So when reloading from a save state, you get the same RNG sequence each time, which translates into the same cards each time.
Except, as happens with many games, this RNG sequence is used for all randomness the game needs, not just this one sequence. So when Toad finishes an animation in the background and the game needs to determine which random background animation to play next, it calls that same sequence, eating a number and advancing the RNG, causing the observation that the first card in the sequence disappears and the rest get pushed up a placement.
As for things like the Shrodinger's Luigi, there might be a bug in how the RNG numbers are processed in different card slots. For instance, let's say that when the third card in your hand is being dealt, RNG values 50-65 are Luigi, and 66-83 are Mario, but then when a card is being dealt to the second slot in your hand, the RNG values are instead processed as 50-66 is Luigi while 67-83 are Mario. That means if the RNG sequence includes the value 66, then which card that gets interpreted as will vary depending on which slot it's generated for.
0:22 don't call me out like that
Toad: he thinking about it two hard isn’t he?
Luigi: yup. He actually considered watching your walk cycle to break this game.
Toad: ( starts laughing, stops and looks at Alex, and then back to Luigi.) ho you’re serious.
Luigi: yup.
Toad: wow. What a try hard.
Genshin virginpact
*Genshit virginpact
Loved that awkward "...whelp." look at the ending. This video was awesome!
First
Oh, boy! Finally! a new New Soup episode!
honestly I like to think luigi runs the casino so well because he’s not as afraid of living people as he is of ghosts
In Toad's mushroom houses In Super Mario Bros. 3, all boxes contain all prizes.
Each box is like a hidden roulette wheel that shows what it has when you click it.
Floating ganondorf amibo
Nice
Also great video very enjoyable for watching whilst washing dishes
I love how you made up terminology when it comes to how the mechanics work!
I love the use of Card Party for the POKER segment.
"Poker: Among Us for Rich People"
love the stay with me soundfont remix at the beginning of the video, it really seems like something i would make
I need to keep it a buck fifty with you chief, i have never been more engaged in a video about gambling in my life