SMB3 Roulette & Card Matching Games Explained

  Рет қаралды 349,789

Retro Game Mechanics Explained

Retro Game Mechanics Explained

Күн бұрын

Ever wonder why the roulette game in Super Mario Bros. 3 seems so difficult? It's all explained right here.
LINKS
Support the channel on Patreon: / rgmechex
Join the RGMechEx Discord Server: discord.rgmechex.com
Follow RGMechEx on Cohost: cohost.org/RGMechEx

Пікірлер: 1 100
@FluffyTheGryphon
@FluffyTheGryphon 8 ай бұрын
I knew it! I knew there was a random delay in that damned game. My whole life, I've tried to master that game, but there's always been something odd happening with it not slowing and stopping right. I originally thought it was just some frame lag. I feel vindicated now.
@georgeyreynolds
@georgeyreynolds 8 ай бұрын
And now that's in virtually every free android match 3 game. Lolz
@DarrenDignam
@DarrenDignam 8 ай бұрын
Last one always felt like chance
@Sauraen
@Sauraen 8 ай бұрын
I don't think that was a mistake--it's effectively a slot machine, it's supposed to give you an illusion of control about winning (based on the first two) and then take away your agency (third one).
@2yoyoyo1Unplugged
@2yoyoyo1Unplugged 8 ай бұрын
So if i account for that, i can pretty much win every time
@Oneiroclast
@Oneiroclast 8 ай бұрын
You can guarantee the first, get the second about 50% of the time, and you can't do anything about the third.
@random832
@random832 8 ай бұрын
One hilarious thing is, the Nintendo Power Strategy Guide for Mario 3 included a diagram of all eight possible configurations. So someone noticed this flaw early on.
@Wendy_O._Koopa
@Wendy_O._Koopa 7 ай бұрын
They decided to market it as a feature, not a bug.
@xxEzraBxxx
@xxEzraBxxx 7 ай бұрын
@@Wendy_O._Koopa To be fair, NOA nor Nintendo Power would have not known how the game was programmed, so many "bugs" were featured as tricks and tips out of ignorance of it being unintended
@Wendy_O._Koopa
@Wendy_O._Koopa 7 ай бұрын
@@xxEzraBxxx I still have that Strategy Guide, and the wild thing is (well, _another_ wild thing) that the diagrams aren't screen shots (which back then meant physically using a camera to take a picture of the TV) they're hand drawn. Which means (I'm speculating) that they assumed there were going to be hundreds, thousands, maybe millions of combos; and were writing them down by hand (so as not to waste film). Soon they discovered that there were only eight, and they didn't have to figure out any "tips _or_ tricks," just post those few... only they didn't have pictures. Anyone can draw a Super Mushroom, right? Well, for some reason they're green... like dark green stems and light green caps, and orange and red spots. To be fair SMB3 Super Mushrooms _are_ orange and red... but not like _that._ And the 1up chests? they're just blocks that say 1up. The flowers and stars look alright, the coins for some reason are rings with either 10 or 20 written inside of them. I used to think Sega stole Sonic's rings from my bracelets, but maybe it was from Nintendo Power? _Freaky._
@ITR
@ITR 7 ай бұрын
@@Wendy_O._Koopa I highly doubt they would start writing them down by hand or even take photos of it if they thought there would be hundreds of combos. The only way it makes sense to begin drawing them down is if you happened to notice you got duplicates first, or had some suspicion there were a manageable amount
@Wendy_O._Koopa
@Wendy_O._Koopa 7 ай бұрын
@@ITR First of all, you realize that by "writing them down" I mean in some form of shorthand, right? Like FSEF2M-1M2EM1-SFSMFS where E=Extra Life and 1 & 2 equal 10 & 20 coins, etcetera. And, yes I guess it makes sense that they suspected they had a manageable amount; but the best way to find out how many is to just take notes as you go. I know this isn't the original drawing, because it reuses all it's assets, the Mushrooms may look strange, but it's the same strange looking Mushroom each time.
@ericpeterson6520
@ericpeterson6520 8 ай бұрын
I wonder if the last 3 cards was actually an easter egg, or if the minigame was originally going to have one fewer column, the shuffling code was written for that, and then they forgot to change it after adding the last column (e.g. maybe when designing the graphics they realized they had more screen real estate than they initially guessed)
@hokostudios
@hokostudios 8 ай бұрын
It would be really odd for them to have one less column, assuming the plan was always to be able to match every card. That might not be the case, of course; but hard to really make any calls on it given it's a pretty odd quirk to begin with.
@ferociousfeind8538
@ferociousfeind8538 8 ай бұрын
I was thinking perhaps they were intending on randomizing the number of cards involved in the rotation, which could add a bit of random spice of the number of cards involved is set to something between 2 (doing some swaps) and 18 (cycling the whole set of cards)
@feronanthus9756
@feronanthus9756 8 ай бұрын
its a pairs matching game so having 3 less cards wouldn't really work since thatd give us an odd number of cards.
@ericpeterson6520
@ericpeterson6520 8 ай бұрын
@@feronanthus9756 ​ @hokostudios Yeah that's a good point lmao
@novamaster0
@novamaster0 8 ай бұрын
Actually, according to the Cutting Room Floor, the game was originally going to have a 'wild card' this would make sense if it was 15 'cards' and a wild card, then adjusted to 18 by just putting 3 cards at the end
@AlexxForest
@AlexxForest 8 ай бұрын
These videos are always right to the point, are laid out in an understandable manner despite their complexity, and never use obnoxious music or flashy images. Please never change.
@MLife1000
@MLife1000 8 ай бұрын
Agreed 💯
@MarioMastar
@MarioMastar 8 ай бұрын
Yes! Very easy to watch where even if you don't understand math or know how programming works, it still is fairly easy to understand and if you DO know how those work, it's a nice bonus on rewatch. These youtubers make WAY better teachers than actual professors at college.
@Alexander_Grant
@Alexander_Grant 7 ай бұрын
I beg to differ, I wish he instead would create clickbait titles, put his face on the thumbnail with him looking shocked and an arrow pointing to a blurred out section of code. I think something like "The Reason You Never Beat This Minigame!" or "Why You Always Were Terrible At This Popular Game." Those are my favorite videos, this one is also missing a animation of a mouse clicking a like and subscribe button with that sweet sound effect. I'm also really disappointed there wasn't a 2 minute Nord VPN ad and a 4 minute Raid: Shadow Legends ad in the middle of it.
@MusicByproduct
@MusicByproduct 7 ай бұрын
The illustrations are really well done too and often go the extra mile to look smooth or informative, but without drawing too much attention away from the narration. This is such a perfect channel.
@yutubyuku
@yutubyuku 7 ай бұрын
I immediately went to the author's patreon page and contributed some. Please stay like this!!!
@slightlyevolved
@slightlyevolved 8 ай бұрын
Ever since I was a kid, I knew about the 8 card arrangements. I also thought it was just that they had hard coded those eight boards and the only RNG was to determine which of the eight you got.
@niemand7811
@niemand7811 8 ай бұрын
I only ever encountered seven boards. And I had them figured out by myself.
@musaran2
@musaran2 8 ай бұрын
Yup. Noticed and noted them all myself. Maaaybe I spent too much time on that game.
@MarioMastar
@MarioMastar 8 ай бұрын
Ironically it seems they must've wanted to keep that cause every remake of SMB 3 from then on did keep the 8 configurations and given they were all written from the ground up and it seems unlikely they would deliberately keep unnecessary code with such a glaring bug, but also... the fact that you could memorize the 8 decks is challenging yet fair enough for any casual player and we all generally agreed the roulette minigame was bull, but... given the end of level cards are super easy to match and all you get are lives, it never really bothered us. Yet another case of turning a bug into a feature (hello SMB wall jump)
@emptiester
@emptiester 7 ай бұрын
The boards were published. Probably nintendo power.
@TBPony
@TBPony 7 ай бұрын
​@@emptiesterI had the published boards on Nintendo power
@Skawo
@Skawo 8 ай бұрын
Fascinating! I always thought the Card Matching game just used hardcoded sets and wasn't determined by an algorithm. The weird thing is, in New Super Mario Bros. Wii, the equivalent maching game in Toad Houses actually _does_ use hardcoded sets (or rather, they're defined by the level data).
@Eventlesstew
@Eventlesstew 8 ай бұрын
Interesting
@arielgomez4951
@arielgomez4951 8 ай бұрын
You are both right, its random but that randomness only allows 8 possible sets,
@Skawo
@Skawo 8 ай бұрын
@@MarioMasta64...this video literally explains that it doesn't.
@MarioMasta64
@MarioMasta64 8 ай бұрын
​@@Skawoonly 8 sets are actually created. i even made a tool that helps you win the game with a max of 1 wrong answer so that you can get every item
@Skawo
@Skawo 8 ай бұрын
@@MarioMasta64...but they are not hardcoded. An algorithm creates them. That's the whole point.
@yodal_
@yodal_ 8 ай бұрын
As a PBS kid, that opening thank you message put a smile on my face.
@ToastyKen
@ToastyKen 8 ай бұрын
On one hand, your videos make me nostalgic for the good old days of programming in assembly and telling the CPU exactly what to do without any intermediaries. On the other hand, this video shows exactly why programming in assembly isn't so great, and modern programming paradigms with like, unit tests and stuff, results in better quality. :D
@P-nk-m-na
@P-nk-m-na 8 ай бұрын
ahh, the good ol' days...and by good i mean significantly more frustrating...
@SnoFitzroy
@SnoFitzroy 8 ай бұрын
yeah as someone who struggles to get anything working in Python or Lua, I respect the effort of ASM devs but not necessarily the grind due to how stuff like this happens all the time - like at least modern languages flag syntax errors for example
@Skawo
@Skawo 8 ай бұрын
@@SnoFitzroy Assemblers flag syntax errors too.
@THEmuteKi
@THEmuteKi 8 ай бұрын
While true, I think the point worth noting is that the goal of modern tools is to try to get logic errors to be present as synatx errors. Or at least more broadly to turn runtime to compile-time errors whenever possible. It's a big part of why I like functional programming.
@mazionach
@mazionach 8 ай бұрын
Yeah modern programming is good and all, but has your code even only worked when your cpu is cold enough?
@RupeeClock
@RupeeClock 8 ай бұрын
It's entirely possible that they implemented the algorithm, but decided that having true total randomness for the card layouts wasn't what they wanted, and made intentional changes to limit the possible outcomes to just eight sets. It's hard to know what really happened, but it's fascinating to learn they weren't simply hard-coded layouts!
@Mainyehc
@Mainyehc 8 ай бұрын
Considering their past experience with SMB2 Japan/The Lost Levels being rejected by Nintendo of America and them having to repurpose Doki Doki Panic because the other game was just too damn hard, and how SMB3 is not exactly the easiest of games and is a big one, they may have decided that giving a couple extra easy-to-attain power-ups for your inventory was a nice way of smoothing out the experience a bit. Also, the fact that the N-card game rarely appeared for those who didn’t know exactly how to trigger it made it more difficult… As a player who never had access to Nintendo Power but who had quite a lot of hours of gameplay, I quickly realized there was a limited number of arrangements and, over time, developed my own strategy to identify which of them it was, and figured that starting from the corners was an easy one (stars usually bunch up there). I developed a sort of a “feel” for it, and kind of have a mental model of how they’re structured, so I usually clear the board in a couple of attempts.
@MarioFanGamer659
@MarioFanGamer659 8 ай бұрын
@@Mainyehc It was more rejected because it was SMB1 but with new graphics, different levels and few new elements (aka "Mission-Pack Sequel") and not necessarily because it was too hard (though it's still a contributing factor, just not the only one). What's even further funny is that SMB2 (the international version) originally was a Mario game before it was repurposed as a promotion to Fuji Television.
@christophermcclellan8730
@christophermcclellan8730 8 ай бұрын
I had exactly the same thought. Bug or a clever way to limit it to just a few layouts by commenting out a few lines? It appears the feature was completely implemented and changed during play testing.
@random832
@random832 7 ай бұрын
@@Mainyehc N-card game appeared at regular intervals [it was just every 80,000 earned points], the white mushroom house and treasure ships were the ones with esoteric activation requirements.
@jonwallace6204
@jonwallace6204 7 ай бұрын
I also imagine this shuffle code routine probably predates SMB3, they reused it, but didn’t need all the features and didn’t bother modifying it, instead choosing to find parameters that produces the 8 variants.
@idkissausername1667
@idkissausername1667 8 ай бұрын
i genuinely have no idea what he ever talks about in any of his videos i just think learning about the inner mechanations of my favorite childhood games is neat
@cadencase5216
@cadencase5216 13 күн бұрын
Jun, 6th, 2015.
@GGCrono
@GGCrono 7 ай бұрын
To quote a certain coolkid: That's a hell of a mystery no one thought was a mystery and didn't even really need solving but damn if it didn't just get solved so nice work.
@cadencase5216
@cadencase5216 13 күн бұрын
May, 15th, 2006.
@realMoistNugget
@realMoistNugget Күн бұрын
@@cadencase5216 Please elaborate.
@cadencase5216
@cadencase5216 Күн бұрын
@@realMoistNugget Dec, 12, 2020.
@sixft7in
@sixft7in 8 ай бұрын
I feel that the LFSR should be used to determine the number of videos it takes before the LFSR is mentioned again. Just for the sake of consistency.
@strangejune
@strangejune 7 ай бұрын
Good call.
@revenevan11
@revenevan11 4 ай бұрын
Lol glad I'm not the only one who had this kind of meta thought about if when he posed the question 😅
@underrated1524
@underrated1524 8 ай бұрын
Perhaps the most interesting facet of all is the fact there's a similar dynamic to the Mario 3 card shuffle in New Super Mario Bros Wii's "Power-Up Panels" minigame, with only a single-digit number of possible panel configurations for each Toad House. Perhaps they liked how the limited number of configurations had become compelling, satisfying "insider knowledge" among veteran players, and hoped to replicate that in the Wii title?
@BinaryHedgehog1
@BinaryHedgehog1 7 ай бұрын
There may be something to that idea. Japanese gaming culture is very collaborative, and finding and telling people about secrets is a major aspect of it. Some games (like Tower of Druaga or the original Siren) are even intentionally obtuse to foster this kind of collaboration
@maker0824
@maker0824 8 ай бұрын
This channel is right at the edge of my ability to understand, and I love it.
@HUYI1
@HUYI1 7 ай бұрын
It's 25% something I understand, I work with codes so it's a bit easier to understand, the nes is the basic regarding understanding code
@revenevan11
@revenevan11 4 ай бұрын
Love your pfp! I'm right there with you in terms of understanding level, but I can follow assembly pretty well because of watching Ben Eater and from playing games like TIS-100 (iirc that's what it's called) that use a sort of pseudo-assembly.
@unspeakablevorn
@unspeakablevorn 8 ай бұрын
The shuffle methods actually aren't great even as described, without the bugs. If you arrange just the first 15 cards in 5 columns by 3 rows, the two operations can be described as: triple swap: move all the cards in one column up, taking the top one and looping it back to the bottom. rotate: move all the cards in the leftmost column to the right side of the tableau, then triple swap this column. because of this, there are only 3^5 * 5 = 1215 possible layouts of cards even if done perfectly: you have five columns of fixed content, each in the same circular order but with possibly different starting points, and the list of columns is also always in the same circular order with possibly different starting points. The added three cards at the end throws this pattern a little out of obviousness because the columns in the shuffle method are no longer lined up on the screen.
@AJMansfield1
@AJMansfield1 8 ай бұрын
Much more intuitive explanation as for why the answer is 1215 compared to the way I calculated it (using MAGMA to calculate the order of the generated permutation group, lol).
@musaran2
@musaran2 8 ай бұрын
It strikes me as pointless. Either the purpose is to genuinely shuffle, and repeating a dumb random swap (or draw) does the trick. Or it is to be gameable, and it should show the shuffle or drop other hints.
@oc-steve
@oc-steve 7 ай бұрын
Thanks for explaining that. Good video, but I thought the maths on the permutations was off.
@kackers
@kackers 5 ай бұрын
yeah i noticed this, given that only 15 cards get "shuffled" and the triple swap is between every 5th card, there are 5 fixed sets of triplets that never leave their groups (columns in your description) if the triple swap was between every FOURTH card instead, then triplets would be able to mingle (e.g. cards in positions 1 5 9 could be swapped and then 5 9 13). The rotation of cards then would also create a different triplet at the end (after a single rotation the triplet that contained cards 7 11 and 15 would contain 8 12 and 1 which would not be able to mix otherwise) - it would take many shuffles but at least in theory any card could end up anywhere of course this assumes a correctly coded algorithm and sufficient repeats - i'm not certain on the maths of the combinations here with the set rotations and repeat limits etc. but i'm pretty sure it's a damn sight more possible sets than 1215 picking 3 cards to swap that are each 5 apart in a set of 15 seems like such an obvious basic maths thing that makes me think it was intentionally to limit the possible outcomes
@johnmoser3594
@johnmoser3594 4 ай бұрын
@@kackers The word you're looking for is coprime.
@AzureLazuline
@AzureLazuline 7 ай бұрын
So, the first slot you can get correct all the time, easy. The second slot is 19/32 = 59% if you time it right in the middle of the possibility space. The third slot is 16/64 = 25% chance to win, if you're going for the star, with every position being equally likely and no strategy can improve it. So *14.8% chance total*, with perfect timing! It's actually amazing how many people in the comments say they could "get the star every time" as a kid, it really shows that memories get seriously inaccurate if you let them sit for too long 😄 (And this is one reason why gambling is dangerous, you always think you've "figured it out" even when it's purely random...)
@aaendi6661
@aaendi6661 7 ай бұрын
They must be confusing the roulette game, with the end-of-level cards. Ironically stars are the easiest to get in the end-of-level cards.
@digitrev
@digitrev 8 ай бұрын
I wonder if they changed the roulette logic when they ported the game over to All Stars. I feel like it was a lot easier to match the roulette than pure random chance would suggest. Or maybe I just always went for the mushroom because it felt like that was easier to get.
@kerbe3
@kerbe3 8 ай бұрын
All stars was the only version I had growing up, I was too young for the NES era. I was positive that the roulette stopped on the icon one step to the right (for the top and bottom parts) and left (for the middle part) of whatever was in the center when you pressed the button.
@michaelcalvin42
@michaelcalvin42 8 ай бұрын
@@kerbe3 I had the same impression as a kid. I remembered the roulette game being more consistent. It would definitely be interesting to see if the code is any different in All Stars, or if this is a Mandela Effect (read: faulty human memory.)
@jokuemt
@jokuemt 8 ай бұрын
all-stars code is nearly 1:1 to the original nes version, apart from the hardware/16bit stuff and other things they added like saving.
@EebstertheGreat
@EebstertheGreat 8 ай бұрын
If the roulette had really been that easy, you would have been getting your chosen item pretty much every time. Timing games like this correctly is significantly easier than most people realize. For instance, arcades sometimes have this game with a circle of bulbs lighting up one at a time, like the light is racing around the circle. You have to hit a button when a certain bulb is lit up. If you disable the random delay that is inserted after pressing the button, you can quickly learn to get it right every single time. In fact, try picking any light that isn't the jackpot light and stopping on that one every time. You'll find it is remarkably easy. And those games are way faster than this roulette. So unless you were successful nearly every time, my guess is you just had a false impression of how the game worked.
@michaelcalvin42
@michaelcalvin42 8 ай бұрын
@@EebstertheGreat That's the thing. I definitely remember getting it right nearly every time. But that could be a false memory; I could just be forgetting all the times I got it wrong.
@SoushinSen
@SoushinSen 8 ай бұрын
I love what you're doing for people who are interested in programming. I'm not one of them so I don't understand much, but I think it's really cool
@JonSmith-hk1bq
@JonSmith-hk1bq 7 ай бұрын
Makes sense for the roulette. I used to get the first two rather routinely, the third was random. I just timed for when the item I wanted (the star) was in the middle. Looking at this, it actually makes sense. The first one is entirely skill based. The second, you'll get it about 59.357% (19 / 32) of the time assuming your timing is anywhere near decent. And the last one is 25% no matter what. So the odds of getting the best item, the star are about 100% * 59.375% * 25% = 15%. So you'll average about .742 lives every time you play the game if you go for the star since it's worth five lives. But if you go for the mushroom, the odds are 100% * 59.375% * 50% = 29.7% since the mushroom makes up half of the slots. However, you only win 2 lives, so the lives per game fall back down to .594. Still best to go for the star.
@cadencase5216
@cadencase5216 13 күн бұрын
Nov, 15th, 2016.
@Badspot
@Badspot 8 ай бұрын
The different card rotating and swapping steps makes me think they had some kind of animation planned but didn't get around to implementing it.
@cadencase5216
@cadencase5216 13 күн бұрын
Nov, 1st, 2006.
@GamingSpirit79
@GamingSpirit79 7 ай бұрын
0:45 I love that sweet reference to PBS's "Thank you" message! You're very welcome!
@IAMJARRICO
@IAMJARRICO 3 ай бұрын
same
@SomeGuy712x
@SomeGuy712x 8 ай бұрын
Wow, I always figured there was some RNG with the timing of the regular spade game, so that part doesn't surprise me too much. However, with the N-spade's board layouts, I always assumed they were hard-coded in as well, and never even considered the possibility that they were the result of oversights in the shuffling routine. That also explains why many of the possible layouts often share certain characteristics, like how the 10-coin cards are often diagonal from each other, and the 20-coin cards are often neighboring each other. And yes, I did notice that the last three cards were always mushroom, flower, star on every layout way back then, when I read a Nintendo Power guide that showed all eight possible layouts. This made it even easier to memorize the patterns and fully clear the N-spade game consistently.
@TurboGhast.
@TurboGhast. 7 ай бұрын
I think that the last three cards being identical on every layout makes it possible to devise a strategy that consistently full clears the card minigame without flipping a non-match for information (meaning that the single mistake the game allows can be used as a defense against misclicks).
@BrownR87
@BrownR87 7 ай бұрын
I can't get over how great your content is. Not just the great examination of the code, and the outstandingly clear explanation at you go, but the visuals that really bring it all together. I love it!
@Bisqwit
@Bisqwit 7 ай бұрын
Excellent analysis! Fascinating how this kind of overslight regarding the card game slipped into production.
@MrMegaManFan
@MrMegaManFan 8 ай бұрын
I honestly thought the card matching game routine was even simpler than that. I thought there were just a set number of layouts and the game cycled through them. The fact every single card layout was shown in a book sent with my Nintendo Power subscription as a kid convinced me as much. Who knew that that the fact there were so few card layouts that you could print them all in a strategy guide was due to bad coding? Wow.
@eharris6347
@eharris6347 7 ай бұрын
@mrmega Thank you That’s how an old lady had those card game answers in a notebook I use to copy She loved Mario She stayed up all night playing Mario games on the NES
@darvil82
@darvil82 8 ай бұрын
Awesome video. It's always pretty funny to see games misbehaving like this because of oversights from the developers!
@pskry
@pskry 8 ай бұрын
I like to imagine that during late playtesting they found the card game to be highly frustrating and went in last minute to gimp their glorious algorithms on purpose.
@MrCheeze
@MrCheeze 8 ай бұрын
The triple swaps made me wonder about that... but there's no way that the rotate failing to use the result of the randomizer was on purpose.
@pskry
@pskry 8 ай бұрын
I'm a software engineer myself. You'd be surprised what we do when the business changes their mind last second.
@wonderguardstalker
@wonderguardstalker 8 ай бұрын
Highly frustrating? Not sure this makes sense. Matching cards is just matching cards
@drachefly
@drachefly 7 ай бұрын
Then just allow more misses, or reduce the number of different cards. Get rid of the coins, say.
@TheJacklikesvideos
@TheJacklikesvideos 7 ай бұрын
@@drachefly abysmal "solutions"
@rando.m.e
@rando.m.e 8 ай бұрын
I love how you put the subtitles to the side when there's something to see that would normally be under it.
@DavidXNewton
@DavidXNewton 7 ай бұрын
Wonderful explanation - I love how the mistakes interact to so drastically reduce the number of possibilities! It seems strange that nobody noticed the error, after working that hard to get a random shuffle. And I love LFSRs - they sound like they should never work, but somehow can produce a random-looking loop of numbers
@smcgamer1
@smcgamer1 8 ай бұрын
Your videos are awesome as always, but one thing I've always enjoyed in particular is the backgrounds to each video, customized for the style of the game in question, plus the game-accurate fonts used. My favorite of all is definitely the SNES hardware videos; since they're not tied to a game at all, we get this awesome dark gray background with the very specific font used; all reminiscent of the CRT TVs themselves and the fonts they'd use for the OSD. This gives that whole series the feeling of explaining the Retro Game Mechanics of no game at all, seeing the style of the underlying hardware when there really wasn't a particular style of pure SNES hardware design. The font and color were excellent choices, and I loved the entire feeling of that. *spoilers* EDIT: I never knew the 8 layouts of the card game weren't intentional, and those programming oversights are hilarious. Generate a random number and then never actually use it.
@cadencase5216
@cadencase5216 13 күн бұрын
April, 5th, 2011.
@smcgamer1
@smcgamer1 13 күн бұрын
@@cadencase5216 I'm sorry, I don't understand what that date refers to.
@cadencase5216
@cadencase5216 13 күн бұрын
@@smcgamer1 It was a cheesy attempt at being cryptic. It's the date you joined KZbin.🤷‍♂️😅
@smcgamer1
@smcgamer1 13 күн бұрын
@@cadencase5216 True, that is the correct date.
@jhsevs
@jhsevs 7 ай бұрын
I was intrigued at the beginning of the video, because as a kid, I always sucked at remembering the 8 card games, but I used to nail the roulette almost every time. I had to press the button perfectly every time. It felt like a small time window, but it didn’t feel frame perfect. 3 frames makes sense. You had to time your presses exactly right from the start. But you only had one try, if you waited too long to press the button on the 2nd or 3rd segment, there was no chance of re-timing it. Or, I guess I was just some kind of superhuman.
@TheRealShedLife
@TheRealShedLife 7 ай бұрын
omg so glad I found this channel. I did a little 8 bit programming in the 80s and I'm still fascinated by it. Love your illustrations in real time, with the numbers swinging through their places as the processor moves through the code.
@canaDavid1
@canaDavid1 8 ай бұрын
Even if the shuffling routine was made perfectly, it would not be very random. Consider the 1st, 6th, and 11th card. If there is a triple swap with any of them, it includes them all. This means that those three cards will always be separated by 4 cards. This is the same for all the 5 triples. Then we get only 3⁵×5 = 1215 unique positions (choose which triple has the first card, and the rotation of each of the five triples). This does not overcount.
@ghb323
@ghb323 8 ай бұрын
10:24 I was learning how shuffling algorithms work a while ago, and came across the Fisher-Yates shuffle. The problem is that it cannot generate EVERY possible permutation using pseudo-random number generator if the number of possible RNG seed states (2^n, where n is the number of bits) is less than NumberOfItems factorial. This means, for example, if you use a 16-bit RNG, you cannot have more than 65536 possible arrangements.
@ghb323
@ghb323 8 ай бұрын
Another problem is that even if you have more RNG states than the number of arrangements, it actually has to exceed the number of arrangement by "at least several orders of magnitude" else certain permutations happens at a higher probability than others. This is according to Wikipedia on Fisher-Yates shuffle on Pseudorandom generators. I can't link it here because youtube's anti-spam/scam is false-positive prone and will delete my comments.
@ghb323
@ghb323 8 ай бұрын
When doing n factorial and you increase n, it grows "exponentially fast", thus you need a massive memory if you are shuffling a large number of items.
@MarioFanGamer659
@MarioFanGamer659 8 ай бұрын
@@ghb323 I'd mention that factorial doesn't just grow "exponentially fast" but in reality, it grows even faster than that because at some point, the numbers added to the factorial are larger than the base. That being said, I doubt shuffling a number of items requires a lot of memory or at least any more than double the size of the list.
@ghb323
@ghb323 8 ай бұрын
@@MarioFanGamer659 Yeah, that’s why I wrapped it in quotes. Wikipedia stated it grows faster than exponentiation.
@ghb323
@ghb323 8 ай бұрын
@@MarioFanGamer659 You could use hardware RNG, but be careful that this relies on physical phenomenon and is subject to degradation and could eventually be in a state it outputs uneven distribution of random numbers(some values occurring more often than others). On emulators, they may falter since they themselves might use PRNG to emulate the hardware RNG or use the computer’s rng.
@donchaput8278
@donchaput8278 8 ай бұрын
REALLY enjoy these videos! Thanks for all the hard work on these!
@_graybee
@_graybee 8 ай бұрын
great video! I'm very appreciative of your excellent captions
@mazionach
@mazionach 8 ай бұрын
Any day RGME uploads is a great day! The moment I saw the JSR followed by AND I KNEW that was gonna be the problem, I've done that while making homebrew way too many times lol
@VinsCool
@VinsCool 8 ай бұрын
To be fair this is a mistake easy to make when you write code to return a value in the accumulator, it's not unlikely they had this in mind and legitimately forgot to also load the value after returning from the subroutine. I know I have made this mistake for that exact reason, haha!
@THEmuteKi
@THEmuteKi 8 ай бұрын
I must have recognized way back when that there were clear differences in timing to get a specific outcome on the roulette but I didn't realize just how bad the variance is. Wow.
@sierranicholes6712
@sierranicholes6712 7 ай бұрын
man i just love these videos. they remind me why i got into coding, it's such an interesting way of problem-solving and i love imagining the thought process of the people writing these games.
@sea4874
@sea4874 7 ай бұрын
I didn't know the card shuffle game was supposed to be pure random. I wrote them down out of curiousity, and I had a hunch they were a set, and I did get a set, but I only found out now they did some extra work with the card shuffle game. It's really fascinating how games and applications were programmed back in the day, nowadays we high level programming languages, but watching videos of how the old program code works, it's like you're thinking how the machine would see the numbers, instead of just translating your concept into text that can be translated into compiled code.
@7thangelad586
@7thangelad586 8 ай бұрын
These discussions are so informative. I wonder if you could show us in any NES baseball game how the game decides where the ball ends up when you’re batting :)
@proxy1035
@proxy1035 8 ай бұрын
man i love these kinds of videos, especially when they contain some kind of fixable programming oversight/mistake. wonder what other NES/Gameboy/etc games have stuff like that
@haodkuma9449
@haodkuma9449 7 ай бұрын
Great video, hope you show more related with SMB3, i love this game, and I am learning ASM
@Tharronis
@Tharronis 8 ай бұрын
I can't believe the 8 arrangements weren't hard-coded, wow. Mind blown.
@emptiester
@emptiester 7 ай бұрын
Algorithms are computationally cheaper than hard coding.
@oldvlognewtricks
@oldvlognewtricks 7 ай бұрын
@@emptiester Not always. Case in point: if your algorithm is bugged and produces fewer configurations than you were planning to generate, so hardcoding eight arrangements would take less data.
@vibaj16
@vibaj16 7 ай бұрын
@@emptiester "computationally cheaper" doesn't usually mean "less memory", which is almost always the only benefit of using an algorithm instead of hard-coding.
@blender4464
@blender4464 7 ай бұрын
True but honestly i suspect that they made it properly, but ended up changing their minds and tweaking it to allow a manageable set. This just strikes me as intentional.
@georgef551
@georgef551 8 ай бұрын
Back in the day, I didn't think the roulette game was all that hard. I almost always could get the star (and it's 5ups). You just had to know exactly when to stop the wheels. (On a CRT, that was easy being there's no video lag.) In spite of the few patterns that existed, I never was that good at the card matching game.
@ipaqmaster
@ipaqmaster 8 ай бұрын
I love the LFSR videos. Its fun to see how different each implementation is
@kabuto3907
@kabuto3907 7 ай бұрын
Fun fact: even if (just) the first fix was applied to the shuffle logic as explained at 18:09 , there would not be 15^3 = 3375 possible outcomes as a result, but only 225. The second change at 18:21 would increase this to a mere 1050 instead of 216000. That's because the triple-swap is symmetric to rotations of multiples of 5, i.e. triple-swap + rotate 5 has the exact same outcome as rotate 5 + triple-swap. So the first case effectively ends up with 15 cases of rotation plus 2 triple-swaps at arbitrary offsets with 5 cases each (order does not matter, thus cases total and not 25) (plus the third triple-swap at fixed offset of 0), thus 225 total. The second case is a bit more complicated but similar. Only the last suggestion would increase the number of cases as intended - to 88990.
@Michael_Beanflip
@Michael_Beanflip 7 ай бұрын
Fun fact: tRump lost the election
@AAjax
@AAjax 8 ай бұрын
Great presentation, interesting and infuriating at the same time - I always blamed myself when I failed on the roulette stage.
@JMPDev
@JMPDev 8 ай бұрын
Props to you already using the new patreon logo! Regardless of how people feel about it (I’m personally not the biggest fan of the blob) that is the kind of attention to detail I’ve come to expect from this channel
@Liggliluff
@Liggliluff 8 ай бұрын
Time flies, already another one? Last change was in 2020
@aquietdragon5671
@aquietdragon5671 Ай бұрын
Now I know why hearing the sound of the mini-game at 8:08 caused me 36-years-old anxiety
@MemoGGG16
@MemoGGG16 7 ай бұрын
I love the editing! Thank you!
@checkitout134
@checkitout134 7 ай бұрын
Learning so much about the OG SMB3. Nice to know the mechanics of the card-match and roulette games haha Do you know if the code is any different for the SM: All-Stars or SMA4 variants? An explanation or mini-follow up video would be awesome ^^
@legoboy7107
@legoboy7107 7 ай бұрын
All-Stars code is nearly identical to the NES version, the games in All-Stars are essentially direct ports with some tweaks and of course new sprites and sound. No idea about Mario Advance 4, though I'd assume it's a port of the All-Stars version but I don't know that. Edit: Just checked TCCF, Advance 4 is a direct port of All-Stars, so it should still be the same unless Nintendo specifically decided to change it.
@nonix81
@nonix81 8 ай бұрын
I find this interesting in the fact as a kid, I could pretty much time the roulette to give me a Star almost every time. I was never able to figure out the N-Spade patterns though. 🤔
@cycloneblaze
@cycloneblaze 7 ай бұрын
That card-shuffling animation you made was _very_ smooth.
@slicendyce2
@slicendyce2 5 ай бұрын
Just discovered this channel. I too always wondered why I could never master the timing of that roulette game. But it all makes sense now. Yes, the delay of the last row was noticeably longer. Mind blown by the "not so random" card matching game. Like others, I feel it was on purpose though.
@Goombachi
@Goombachi 8 ай бұрын
Do you know if the All-Stars version of the roulette is any different? Anecdotally, it always felt easier to me, but I don't know if that's just confirmation bias.
@capnkatie
@capnkatie 7 ай бұрын
mario 3 all stars is nearly 1:1 the code of the nes version, its probably identical honestly
@MartyNES1
@MartyNES1 7 ай бұрын
The roulette game may have been more random than what it seems, but if you have good timing you can consistently win. I remember as a kid hitting A immediately when the game starts and then hit A just slightly before the previous image stops. It lines up 3 mushrooms, but hey it's better than not winning. I'm sure theres a way to time the star but I never cared to figure it out.
@andrasfogarasi5014
@andrasfogarasi5014 Ай бұрын
Even if the order of triple swaps and rotations was completely arbitrary, the algorithm could still only generate 1215 permutations. To see this, let us examine the possible moves: Rotate (ROT) Triple swap from position 1 (TS1) Triple swap from position 2 (TS2) Triple swap from position 3 (TS3) Triple swap from position 4 (TS4) Triple swap from position 5 (TS5) Let us notice that in the following table, any sequence on the left side of an arrow produces the exact same permutation as the one right of it: ROT-TS1 -> TS2-ROT ROT-TS2 -> TS3-ROT ROT-TS3 -> TS4-ROT ROT-TS4 -> TS5-ROT ROT-TS5 -> TS1-ROT ROT-ROT-ROT-ROT-ROT -> TS1-TS2-TS3-TS4-TS5 Let us take an arbitrary sequence of moves. If we find a subsequence that is in the left column of our table, we will replace it with the corresponding sequence in the right column. For example, the sequence TS1-TS3-ROT-ROT-TS1-ROT will become TS1-TS3-ROT-TS2-ROT-ROT after we apply the rule ROT-TS1 -> TS2-ROT. Let us note that no matter what rule we apply, the number of ROT moves will either decrease, or a ROT move will move right in our sequence. As such, if we apply the rules recursively, we will eventually be left with a sequence where no rule can be applied anymore. This sequence will still produce the same permutation as the original. What will our sequence look like after we can no longer apply any rules? It will consist of a number of triple swaps followed by at most 4 ROT moves. This is because if there was a ROT move before a triple swap or if there were more than 4 ROT moves at the end, a rule could be applied. We will finish by realising that the order in which we perform triple swaps doesn't actually matter. TS1-TS2 will produce the same effect as TS2-TS1, for example. As such, the only thing that matters is how many times we have performed each type of triple swap. Furthermore, performing the same triple swap three times does nothing. As such, any arbitrary sequence of moves may be reduced to the following, in this exact order: No more than 2 TS1 moves. No more than 2 TS2 moves. No more than 2 TS3 moves. No more than 2 TS4 moves. No more than 2 TS5 moves. No more than 4 ROT moves. There are a total of 3^5 * 5 sequences of this form, or a total of 1215. You may take some time trying to convince yourself that they do not contain duplicates. I believe this can most easily be seen by examining where the first 5 cards end up after any arbitrary shuffle. As such, the video from around 12:20 is wrong. One shuffle can only produce 1215 outcomes. Furthermore, a single shuffle will actually produce every possible outcome with an equal probability. The subsequent shuffles are completely pointless. But the video is right in saying that there are a lot of duplicates.
@AbnormalAbnorman
@AbnormalAbnorman 3 ай бұрын
"No one-a cheats-a Super Mario!" -Dorkly Mario, "Toad House is Rigged"
@mrgreatbigmoose
@mrgreatbigmoose 8 ай бұрын
0:20 With the 3 part roulette, I found the first to be random. But in actuality, I always managed to match the second if I hit one early...press the button on star and i would get the mushroom every time. For the final slide, there was a pixel error where the two slides met...6 pixels would flash in succession. Press the button when the pixel lined up and it worked every time. You can actually see it on screen. So yes there was randomness, but defects in the game made it easier.
@BagOfMagicFood
@BagOfMagicFood 8 ай бұрын
So wait, if the second and third bars' slip amounts are frozen while playing, is there any correlation that would allow you to predict how much the third bar will slip from how far the second bar slipped?
@jeromefournier5233
@jeromefournier5233 8 ай бұрын
not really, because the info that is now in the second rng slot(second bar) is generated from the info that is now in the third slot (third bard) and the fourth slot, and even then the second bar only use 5 bits of the second slot rng value. Even if you knew the 5 bits, you can't use this info without the fourth slot values to try to get the third slot values
@GalacticRod
@GalacticRod 7 ай бұрын
That card shuffle/folding animation was oh so good. Chef's kiss
@marblemaster1
@marblemaster1 7 ай бұрын
I had always assumed that the 8 arrangements were hard coded! I guess you learn something new every day.
@ShelbyAQD
@ShelbyAQD 8 ай бұрын
What's funny about this is that I never learned the matching game layouts as a kid, so never cared for that game, but I could fairly consistently win the slot game. Regardless of how the code should make it unpredictable, it usually is a fairly simple timing minigame. Stop the first real when the picture you want is in the center. Stop the second just before the picture you want is fully centered. Stop the third just as the picture you want is leaving the screen. The RNG does beat it sometimes, but this method served me very well as a child.
@SnoFitzroy
@SnoFitzroy 8 ай бұрын
i played SMB3 once on the NSO emulators and checked out mentally right after failing the spinny minigame. It was so far off of a match I actually couldn't believe I did so poorly. Feels good knowing this specific instance isn't just me being bad at video games for old people!
@jansenart0
@jansenart0 8 ай бұрын
Absolutely fantastic breakdown! Insane how much work was lost because of that error!
@jakint0sh
@jakint0sh 5 ай бұрын
Okay so I used to watch PBS Kids a LOT when I was little, and ooooohh my god the “Viewers like you, Thank you!” I swear is ripped directly from those childhood memories
@IanZamojc
@IanZamojc 8 ай бұрын
That's weird, I found the roulette felt really consistent and I won it a lot.
@AshleyTMDW
@AshleyTMDW 8 ай бұрын
Yeah the roulette was consistent for me too and the card matching was never a strong suit
@rruhland
@rruhland 8 ай бұрын
@@AshleyTMDW”strong suit” I see what you did there
@QuasarEE
@QuasarEE 8 ай бұрын
If the 3rd wheel is effectively random, then you will win 1/3rd of the time at least if you consistently get the first 2 wheels. It's probably confirmation bias.
@IanZamojc
@IanZamojc 8 ай бұрын
@@QuasarEE Perhaps, but it just didn't feel as unwinnable as the video claims it is.
@Liggliluff
@Liggliluff 8 ай бұрын
(8:05) I assume that is to add the human element. The game will continue to randomise until the player continues. So you have the pressing the button to the map and dialogue adding randomisation. Having the second and third wheel not affected by the timing you press the button does have an affect on using save states, and that's kinda interesting.
@sofyankarim
@sofyankarim 7 ай бұрын
Brilliant animation with the cards. Great work!
@archivewarrior8535
@archivewarrior8535 8 ай бұрын
The opening “Brought to you by … viewers like you. Thank you” (0:40) reminds me of PBS Kids, which I used to watch all the time when I was young
@lilylyons8885
@lilylyons8885 8 ай бұрын
3:18 🏳️‍⚧️
@AkaBigWurm77
@AkaBigWurm77 7 ай бұрын
There was a time when I was young when I had all the card layouts mesmerized and I was pretty good at the match game too. We had an official SMB3 Strategy guide that had them all too, wish I still had that.
@AtomicBLB
@AtomicBLB 7 ай бұрын
I love these old school video game breakdowns. When I was a kid I'd spam the A button on these card games and I'd get 2-up the vast majority of the time. When I tried to do it again last year when I was humoring speedrunning it and practicing/needing lives I just could rarely re-create my childhood experience.
@robert36902
@robert36902 7 ай бұрын
Great job with the explanation and animations!
@wigglebot765
@wigglebot765 8 ай бұрын
Really interesting and informative vid, it’s crazy how two separate mistakes combined just enough to ruin the whole rng process for card matching
@Kylefassbinderful
@Kylefassbinderful 8 ай бұрын
I think it's a crime that this channel only has 196k subs. I find all these videos really interesting despite not really knowing how to code.
@Wyrenth
@Wyrenth 8 ай бұрын
Fascinating to know the code behind both mini-games. For the roulette wheel, I always thought that it would determine your chances of a win based on the top wheel -- so if you got a mushroom, the chances were much higher compared to if you got a star, and that the game would just "give" you the prize if you rolled a win no matter when you pressed the button as opposed to the delay and such involved. And likewise, I thought there really were just eight arrays of cards that were chosen at random instead of broken code that made a true shuffle fail to operate properly.
@TheNoSwearGuy
@TheNoSwearGuy 8 ай бұрын
Just having this for my own purposes, at 3:49, "Roulette_Run" is Roulette_Run in program 22, at 8:18, "Randomize_Roulette" is right after JSR Read_Joypads and before PRG022_CF7C, at 13:07, "Card_Shuffle" is Card_Shuffle in program 22, and at 15:50, "Randomize" is Randomize in program 30.
@batlrar
@batlrar 7 ай бұрын
I have positively zero reason to doubt this because you've looked at the actual code, but I always thought the roulette was all down to timing! I had a rhythm down that would win it what I thought was far more often than not, but that could have been just confirmation bias. Seeing the bare bones of it here, it doesn't seem like there's any way my timing was that good, nor would the timing I had correlate to one specific result!
@HmmmmmLemmeThinkNo
@HmmmmmLemmeThinkNo 18 күн бұрын
Also, I forget if i've said before, but I see and appreciate your use of dyslexic-friendly fonts in your title and end screen
@thezipcreator
@thezipcreator 8 ай бұрын
thank you for making the subtitles not clash with the any of the actual text
@StupidMarioBros1Fan
@StupidMarioBros1Fan 8 ай бұрын
Since they weren't mentioned, do the SNES & GBA versions have identical code for these mini games or did you simply not cover them for this video because it was already getting lengthy? I don't remember having so much trouble with the roulette as a kid with the newer versions but I'm not sure if that's proof of them being easier or I was just _that bad_ at the timing that the delays ended up helping. lol
@MarioFanGamer659
@MarioFanGamer659 8 ай бұрын
Chances are, RGME will make an appendix on Cohost as he did it with previous videos.
@grussser
@grussser 8 ай бұрын
Thank you, very interesting video. I also want to say that I can see that you are not using clickbaity titles and thumbnails and the videos are very to the point without stupid jokes and trying to mix-in the ad with the video content. This is very much appreciated even though it puts you at a disadvantage in the toxic world of youtube algorithm. Thanks for staying true to quality.
@RetroSho
@RetroSho 8 ай бұрын
The video I didn't know I needed. Brilliant.
@IAMJARRICO
@IAMJARRICO 3 ай бұрын
bro that intro brings me back... AND ALSO I KNEW IT! THERES A DELAY BEFORE IT STOPS
@Lunar994
@Lunar994 8 ай бұрын
That explains a lot, because I can get the first two panels to match if they're in the middle, but that was never the case for the last one.
@BryndanMeyerholtTheRealDeal
@BryndanMeyerholtTheRealDeal 7 ай бұрын
Nice PBS reference with the Viewers Like You bit
@kwanholloway4112
@kwanholloway4112 7 ай бұрын
His intro saying viewers like you, thank you. Reminds me of channel 13 back in the day lol.
@General12th
@General12th 8 ай бұрын
Hi Retro! These videos are so good.
@MindWandererB
@MindWandererB 7 ай бұрын
That's fascinating. Now I want to see the same thing for the SMB2 slot machine game. I mastered that one to where I could nearly always get 5UP, nothing, 5UP, nothing etc., and it's such an odd pattern I always wondered why it worked out that way.
@kargaroc386
@kargaroc386 8 ай бұрын
So many games that make IBM's RANDU, the worst RNG ever, look awesome in comparison.
@KenBlaze
@KenBlaze 8 ай бұрын
Subscribed. Great content.
@zeldafreak1975
@zeldafreak1975 7 ай бұрын
I used to do a clacking maneuver with my fore and index fingers. When i got the timing right, it was a star every time lol Good nostalgic video.
@ericsbuds
@ericsbuds 8 ай бұрын
thank you for the great explanation!
@rich1051414
@rich1051414 7 ай бұрын
That explains so much. I could always get the first two segments, but that last one screwed me every time. Now I know why.
@DigiTheInformer
@DigiTheInformer 8 ай бұрын
your animation is astounding.
@Poyo77750
@Poyo77750 18 күн бұрын
Thank you for explaining the lfsr! I can finally make one.
@KimFareseed
@KimFareseed 8 ай бұрын
9:14 Growing up with the old Nintendo Power SMB3 guide, I did have all the tables available to check with. Never did beat the NES version though. Had to wait for the GBA version to beat it. Being able to save the game made quite a difference.
@funniflow
@funniflow 7 ай бұрын
That shuffling animation was so smooth
MissingNo.'s Glitchy Appearance Explained
21:20
Retro Game Mechanics Explained
Рет қаралды 1 МЛН
Atari's Quadrascan Explained
20:57
Retro Game Mechanics Explained
Рет қаралды 184 М.
CAN YOU HELP ME? (ROAD TO 100 MLN!) #shorts
00:26
PANDA BOI
Рет қаралды 36 МЛН
Ну Лилит))) прода в онк: завидные котики
00:51
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 23 МЛН
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 34 МЛН
Super Mario 3D All Stars Switch Game Prices
0:39
Retro Video Game Pickups
Рет қаралды 22 М.
EarthBound: The Place. (Recreation)
1:09
AnnoyedSlice78
Рет қаралды 17 М.
Pac-Man Ghost AI Explained
19:34
Retro Game Mechanics Explained
Рет қаралды 1,3 МЛН
Intro to Hypercubing
5:59
HactarCE
Рет қаралды 2,6 М.
SNES Audio System Overview - SPC700 Series pt. 1
13:13
Retro Game Mechanics Explained
Рет қаралды 65 М.
NES Sprites, OAM, and the Battle for Priority - Behind the Code
19:17
Displaced Gamers
Рет қаралды 40 М.
How Frightened Ghosts Decide Where to Go
29:47
Retro Game Mechanics Explained
Рет қаралды 237 М.
Why Some 1-Ups Don't Flicker Before Disappearing
11:46
pannenkoek2012
Рет қаралды 499 М.
Minecraft RTX 203% CLUCK KENT #Shorts
0:29
Jake Fellman
Рет қаралды 22 МЛН
Пьяный дед продал внука в Roblox! 😱 @titwow
0:28
Я знаю плохое слово🙊 #minecraft #майнкрафт
0:30
ШОРТЫ ВЛАДУСА
Рет қаралды 2,7 МЛН
Спаси Ламбу или У...ри!  в BeamNG Drive
0:57
BeamNG_Shorts
Рет қаралды 1,6 МЛН