Super Mario World - Random Number Generation

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2016
  • How does random number generation work in Super Mario World? It's all explained right here.
    LINKS
    Twitter (updates): / retrogamemechex
    Patreon (support): / rgmechex
    Discord (discussion): discord.rgmechex.com
    INLINE LINKS
    Learn more assembly instructions: Coming soon!
    SMW Yoshi Clips Explained: • Super Mario World Yosh...
    SMW Powerup Incrementation Explained: • Super Mario World Powe...

ความคิดเห็น • 556

  • @KairuHakubi
    @KairuHakubi 7 ปีที่แล้ว +563

    I always thought those birds looked unnaturally natural.

    • @DRSDavidSoft
      @DRSDavidSoft 5 ปีที่แล้ว +23

      @@RandomNameLastName811 Indubitably indeed!

    • @sabin97
      @sabin97 4 ปีที่แล้ว +22

      @@RandomNameLastName811
      it's truly true....

    • @gurbuzsanl3626
      @gurbuzsanl3626 4 ปีที่แล้ว +9

      Y'all dummy dumbs

    • @gunarcom
      @gunarcom 4 ปีที่แล้ว +28

      Someone put some heart and soul into those birds and it shows.

    • @General12th
      @General12th 2 ปีที่แล้ว +12

      I wonder if those birds were supposed to show up in more places and get more screen time, thus justifying the extra effort that went into them. Or maybe it was late in development and some programmer had a free hour to burn just for fun.

  • @nebularain3338
    @nebularain3338 4 ปีที่แล้ว +175

    I love this. Assembly is still the dark arts for many people, and it's often brushed over or dumbed down, so to have it explained this way is very helpful. More please!

    • @bojcio
      @bojcio 9 หลายเดือนก่อน +5

      Honestly, you can't explain assembly to non technical laypeople without dumbing it down a lot, its extremely abstract. As far as 99.9% of humanity is concerned assembly doesn't even exist and how computers work is literally the dark arts. What I'm saying basically there's no way to talk about assembly other then to go all out or dumb it down completely. People will either know what you're talking about or be completely clueless.

  • @CoTeCiOtm
    @CoTeCiOtm 7 ปีที่แล้ว +495

    11:54 What?!?!?! I am mindblown!! In all the years I have been playing this game, I have never, ever seen a 1-up come out by Kamek! I didn't even know that was possible!

    • @omikronweapon
      @omikronweapon 7 ปีที่แล้ว +38

      I don't even recall a thwimp. Can't be certain about the coins though. Very interesting.

    • @piratesephiroth
      @piratesephiroth 7 ปีที่แล้ว +14

      Yeah I've played the game enough to see that happening.

    • @CoTeCiOtm
      @CoTeCiOtm 7 ปีที่แล้ว +30

      OmikronWeapon I was playing yesterday and I actually got a Thwimp twice!

    • @mike309game
      @mike309game 7 ปีที่แล้ว +2

      i already got one

    • @trenzinhodaalegria8012
      @trenzinhodaalegria8012 7 ปีที่แล้ว +17

      I have but only once. Its VERY very rare.

  • @MrJibaku
    @MrJibaku 4 ปีที่แล้ว +220

    I’m too stupid to understand these videos, but still am entertained.

    • @ryanvandoren1519
      @ryanvandoren1519 4 ปีที่แล้ว +12

      Not stupid mate, just inexperienced.

    • @thecianinator
      @thecianinator 4 ปีที่แล้ว +5

      @@ryanvandoren1519 it's just a colloquialism, I for one have no idea what an "exclusive or" is and it's never explained in the video, but I know I'm not stupid. I'm just stupid at watching this video. I still like it though

    • @nebularain3338
      @nebularain3338 4 ปีที่แล้ว +7

      Do you have any programming experience at all? If not then you are not stupid. If you had been coding for 20 years and still didn't understand this, then "maybe" you would be stupid.

    • @halonothing1
      @halonothing1 4 ปีที่แล้ว +9

      Stupidity and ignorance are two very different things. And I assure you, you are not stupid. You simply don't understand what's being said. But believe me when I say you're capable of understanding it one day. Just don't worry so much about understanding it and just learn what you can when you can, but keep trying to learn. Never stop trying because you won't learn if you don't try. Just look up things you don't understand one thing at a time, and take as long as you need to understand them. If you find there's something else you need to know in order to understand what you've looked up, then take a step back and look that up. Don't worry about your end goal, just enjoy the journey and keep at it. I'm in the process of learning this stuff myself, so here are a few topics to get you started.
      6502 CPU, there's a good primer called EASY6502 which depending on your skill level, may or may not be helpful. But you will find it helpful at some point.
      Hexadecimal and binary numbers are the best place to start if you're completely new to this stuff.
      Logic gates/logical operations, like NOT, AND, OR, NAND, NOR, and XOR would be the next step. Windows comes with a calculator with a programmer mode that will let you play with these operations on hex and binary numbers once you understand them better. There's also a free program called logisim that will let you play with logic gates and make logic circuits so you can play with them and see how they work. It also lets you make more complicated digital circuits to the point where you can start to make parts of a CPU or even an entire CPU if you know enough. It's a great tool for learning about this stuff.
      CPU registers would probably be the next logical step after learning that stuff.
      This stuff alone should take you quite some time to get comfortable with. But like I said, don't be afraid to look stuff up. Consult multiple sites, videos and resources if you don't understand one. Take your time and be patient. And don't give up. Before you know it, you'll be learning about stuff you never would have imagined you would understand. Even if you just learn binary and logic gates it will probably give you a huge boost to your self esteem and your confidence in your ability to learn.
      Some of this may be helpful. Some of it may be useless to you. Some may not even interest you. Or none of it may interest you. But I hope you at least get something out of this post I've made. It's probably a bit all over the place, but my hope is it can at least get you started in the right direction.
      Finally, if you're looking for a video series to understand CPUs from a hardware level, Ben Eater has a great series here on TH-cam where he builds a CPU from the ground up using electronics and chips etc. It can be very helpful in understanding assembly language to understand how a CPU works like that as well.
      Best of luck to you in your endeavour. Enjoy the journey and be patient and persistent. I know I've already said that, but it's the most important advice I can give you.
      Cheers.

    • @evanaorrandomguywhodosenot3713
      @evanaorrandomguywhodosenot3713 3 ปีที่แล้ว +3

      @@halonothing1 OMG YOUR SUPER SMART

  • @LeviathanRX
    @LeviathanRX 4 ปีที่แล้ว +190

    My boss calls the RNG to determine whether or not I get a raise, it never calls back tho.

    • @BlazingShadowSword
      @BlazingShadowSword 4 ปีที่แล้ว +22

      It sounds like it's calling to the wrong area in the ROM. You might need to pipe through the floor to reach the ROM and break the block that keeps returning as a 0 for a raise. I warn you though, if you aren't careful you'll corrupt reality.

    • @PC_Simo
      @PC_Simo 3 ปีที่แล้ว +6

      Does he also call RNG to determine, whether or not he fires you?

    • @LeviathanRX
      @LeviathanRX 3 ปีที่แล้ว +7

      I dug through reality and broke the wrong block, now I'm laid off.
      oops

    • @imveryangryitsnotbutter
      @imveryangryitsnotbutter 3 ปีที่แล้ว +1

      @@LeviathanRX So YOU'RE the one that caused COVID!

  • @jdaster64
    @jdaster64 7 ปีที่แล้ว +262

    Looking forward to this series! I'm loving how many TAS-ers / glitch-hunters are doing this sort of fully-fleshed out explanation of glitches and game mechanics these days!
    Also, I love the "extended 1-up sound" in the intro.

    • @RyanFaeScotland
      @RyanFaeScotland 6 ปีที่แล้ว +8

      Well, that's my weekend viewing sorted. Thanks for the list. I' sure you've saw them but for anyone who hasn't DotsAreCool and SethBling also have some good stuff. It's Mario specific but also discusses how the SNES works.

    • @nedwork
      @nedwork 5 ปีที่แล้ว +3

      Me too.
      Edit: He actually “RGM” explained it in his latest vid. (rgm means retro game mechanics)

    • @phantazap
      @phantazap 4 ปีที่แล้ว +3

      If you're interested in pokemon glitches, one person I recomend a good bit is RETIRE.

    • @halonothing1
      @halonothing1 4 ปีที่แล้ว +2

      I agree. It's wonderful how many resources on this sort of thing are popping up on TH-cam. I wasn't aware of the other channels you mentioned though. So thanks for that. I'll be sure to check them out.

    • @jimmyhirr5773
      @jimmyhirr5773 3 ปีที่แล้ว +3

      Another recommendation: decino has a lot of videos about how Doom and Doom II work.

  • @marscaleb
    @marscaleb 7 ปีที่แล้ว +58

    I'm honestly surprised how few calls the game uses for random numbers.

  • @MellyMellouange
    @MellyMellouange 7 ปีที่แล้ว +19

    That was a good video about SMW's RNG. Actually taught me which address to use in order to make the seed different ~
    One of the sprites I made ticked the RNG every frame Mario is on the ground. Since it's a more dynamic element, it works well to make it less of a pattern.

  • @DavidVitez
    @DavidVitez 6 ปีที่แล้ว +13

    This wasn't just a good gaming video, this was a fantastic computer science video. *Subscribed!* The breakdown of the assembly and pseudo-code functions was really good and I especially loved the graphs of the random outputs and how you highlighted the important parts of the data via color and animation.

  • @eddievhfan1984
    @eddievhfan1984 6 ปีที่แล้ว +11

    BTW, if anyone was interested, the PHY and PLY instructions are to PusH the Y register onto the stack and PulL (pop) to pop the stack top into Y. This is the RNG subroutine saving the value in Y while it uses the register for other purposes, then restores the value of Y prior to going back to where the subroutine was called.

  • @Coolfolder
    @Coolfolder 5 ปีที่แล้ว +28

    2:16 "Click here to learn more assembly instructions" The hover-over text says "Coming soon!" and I'm looking forward to it! I know i could probably find this information elsewhere online but I enjoy how you explain things :)

    • @rm_steele
      @rm_steele 12 วันที่ผ่านมา

      still waiting?

  • @wilekrowan3610
    @wilekrowan3610 5 ปีที่แล้ว +9

    The random fire and birds are hypnotizing. It feels like it gives the game a unique personality.

  • @SandTurtle
    @SandTurtle ปีที่แล้ว +4

    i love how you just popped onto the platform with top-tier editing

  • @dixie_rekd9601
    @dixie_rekd9601 6 ปีที่แล้ว +25

    no idea why youtube recommended this to me but this video is incredibly well made.

  • @guntertv304
    @guntertv304 7 ปีที่แล้ว +162

    I didn't understand a thing, but it sounds smart, so i like it

    • @Chaos89P
      @Chaos89P 6 ปีที่แล้ว +6

      The "Random number generator" creates a pseudo-random number based on a complex set of values (the "seed," I think) that has a tendency to change constantly. Unless there's something hardware-related, computers are actually incapable of creating random numbers.

    • @randymccoy2527
      @randymccoy2527 5 ปีที่แล้ว +3

      You, I like you.

    • @sabin97
      @sabin97 4 ปีที่แล้ว +3

      @@Chaos89P
      yeah. the "random" number generators are just a very convoluted mathematical calculation based on a "seed" value.....if you always use the same "seed" the "random" number will always be the same.
      usually what you do is set the seed to the current time-stamp of the computer clock.
      that will create a better random number than a static seed,
      of course nothing beats a good hardware random number generator....but aint nobody got time for that!

    • @cube2fox
      @cube2fox 4 ปีที่แล้ว

      @@sabin97 But the current time stamp is already somewhat random. And when the seed is random, the resulting RNG is too.

    • @sabin97
      @sabin97 4 ปีที่แล้ว +2

      @@cube2fox
      it confuses me when you use the word "but" while agreeing with what i just said....

  • @Mullkaw
    @Mullkaw 5 ปีที่แล้ว +17

    Oh boy, I can't wait to learn more assembly instructions!

    • @knuti27
      @knuti27 3 ปีที่แล้ว +2

      Guess you can, or, must, because that still hasnt happened.

    • @arielsproul8811
      @arielsproul8811 3 ปีที่แล้ว +2

      We need to learn reality-assembly to call the assembly video

    • @suezuccati304
      @suezuccati304 2 ปีที่แล้ว

      Ersanio has a tutorial where he explains each opcode, it's really helpful

  • @DukowskiX
    @DukowskiX 7 ปีที่แล้ว +3

    Man, the RNG use was really smart in this world, the blinking and bird movement implementation and was mindblowing. I am very sure the guy in charge of the bird movement made first the movement to be based on certain cycles and he hated it and made something that really resembled nature. Awesome video.

  • @mubbees2236
    @mubbees2236 5 ปีที่แล้ว +3

    Thanks for the assembly code from the SMB3 rom! It's great to see deep explanations for this cool stuff!

  • @ELVTechnology
    @ELVTechnology 4 ปีที่แล้ว +2

    Your understanding into the details on this is mind blowing. I'm impressed!

  • @Darxide23
    @Darxide23 7 ปีที่แล้ว +2

    Taking topics I already know a lot about and still making the video interesting enough to get me to watch the entire thing. I love it. Keep it up.

  • @Billl1234
    @Billl1234 7 ปีที่แล้ว +3

    I learned 6502 assembly back in the 1980s when it was cool. I am so glad to see more people taking an interest in assembly again. You can do fantastic things with it.

  • @ThJakester897
    @ThJakester897 7 ปีที่แล้ว +58

    I really liked this. I was especially impressed with the production values. The only thing I wasn't able to understand is what Bit Test actually does; I came in with no prior knowledge of how assembly works, and at this part, I felt I needed at least a little. I don't know if I'm outside your target audience, but if I am, the clarity of your explanations is pretty excellent, as I was able to understand everything else even without prior knowledge.

    • @JorWat25
      @JorWat25 7 ปีที่แล้ว +4

      After watching a few times, I think what it does is use an AND gate on each bit of the two numbers you're using (so 1 AND 1 is 1, but everything else is 0), and if the new number is all 0s, Z gets set to 1.

    • @nathanisbored
      @nathanisbored 7 ปีที่แล้ว +1

      Effectively, Bit Test is checking if the two values have any set bits in common.
      To be precise, BIT just checks if
      (Accumulator value) AND (Operand value) = 0
      If yes, set Z-flag. If not, clear Z-flag.
      I'm assuming you know how the 'logical AND' operator works (he did explain it for a split second in the video). Basically it puts a 1 in each bit which had a 1 in both operands. The accumulator is always implied to be the first operand.

    • @andrewsauer2729
      @andrewsauer2729 7 ปีที่แล้ว +1

      I think(someone else can correct me if I'm wrong) it is an AND operation that sets the Z flag if the result is zero.

    • @IronLotus15
      @IronLotus15 7 ปีที่แล้ว +1

      It is an AND operation between corresponding bits in the operands, yes.

    • @IronLotus15
      @IronLotus15 7 ปีที่แล้ว +1

      Correct.

  • @KuraIthys
    @KuraIthys 7 ปีที่แล้ว +67

    That's a pretty weird RNG...
    Not using true randomness is not just a cost issue. A lot of game design benefits from the predictability of a pseudo-random generator over a true random generator for instance.
    For example, Consider recording a replay of what the player was doing. For this to work, you have to replicate EVERYTHING correctly.
    You could record the state of all of the game objects for every frame, but that would take up huge amounts of storage.
    But, if all the game objects have deterministic state, then all you need is the starting state and the player inputs, which takes up much less space.
    This is possible if the game is entirely based on predictable deterministic logic...
    Or... If you use a pseudo-random number generator. (since this is actually deterministic for a given seed)
    It looks too like it's setting the seed to an exact starting value too. Which...
    Means the sequence of things in the level is kind of predictable in some ways
    That's an odd choice.
    See, when developing PC demos I found the most common technique to get a 'random' outcome is to use the system clock.
    Even though the Pseudo RNG function isn't random, it seems fairly random as long as your seed value keeps changing.
    The system clock has the virtue that barring someone messing with their clock (or the clock running for longer than it was designed to), the seed will never be the same, so 'random' events will truly seem random, even though they aren't, because the seed used is never the same twice.
    Unfortunately, an old console like the snes has no system clock.
    So... You have to come up with a different way of creating the initial seed values...
    And so far, I haven't actually been able to think of one that works consistently...
    Which... May well explain why SMW just gives up and sets it to 0 every time a level loads...

    • @martinhowser4094
      @martinhowser4094 5 ปีที่แล้ว +16

      Outside of using a predictable number generator for determinism.. there is never ever ever ever such a thing as a real random number generated by a computer (yet.. maybe once we go quantum)

    • @mariannmariann2052
      @mariannmariann2052 5 ปีที่แล้ว +2

      I think it could be set to a global timer value.

    • @russotragik
      @russotragik 5 ปีที่แล้ว +6

      I came up to a "better random" by making a clock based on VBLANK interrupt cicles, so the user will never be able to press start at exactly same time ever, and three different random routines based on which number was on clock.
      But nowadays, with very cheap RTC circuits, it would be possible to save the daytime in the SRAM

    • @pyramidschema8668
      @pyramidschema8668 5 ปีที่แล้ว +12

      @@martinhowser4094 There is one way, machines with a requirement for very strong cryptography like military grade communications hardware can be equipped with a hardware random number generator that samples some type of physical quantum phenomenon, such as decay of a radioactive substance, or noise on a photoelectric circuit caused by unpredictable arrival of photons. These are obviously far too expensive for a games console.

    • @paindavoine_design
      @paindavoine_design 5 ปีที่แล้ว +8

      @@pyramidschema8668 you could just use the noise produced by a low resolution camera, it's random I think

  • @tassaron
    @tassaron 6 ปีที่แล้ว +2

    Cool new channel! As a modern newbie programmer I find it educational and inspiring to hear specifics of how old games worked. Also nice having suspicions from my childhood confirmed

  • @QubicTom
    @QubicTom 7 ปีที่แล้ว +3

    Well made and very informative! Looking forward to the next episode!
    (I was never sure if podoboos were random, thanks for clearing it up!)

  • @StormcloudLive
    @StormcloudLive 7 ปีที่แล้ว +1

    absolutely fantastic look behind the curtain of what is going on here, great video. Subbed for more of this sort of in dept look at games.

  • @i33th4x
    @i33th4x 4 ปีที่แล้ว +2

    I really appreciate your channel. Love how you get into the details

  • @emersoneisen
    @emersoneisen 4 ปีที่แล้ว +2

    I know this is off topic, but his videos are so cleanly edited.

  • @iwir3d
    @iwir3d 7 ปีที่แล้ว +3

    Well done. I look forward to seeing more videos. Your Super Mario 3 video convinced me to subscribe. Seeing more videos with assembly in them make me want to stick around. And I love retro and game mechanics.

  • @tangentofaj
    @tangentofaj 7 ปีที่แล้ว

    This is certifiably one of the most interesting and fascinating and educational things I've ever watched on TH-cam.

  • @horaciosalles
    @horaciosalles 7 ปีที่แล้ว

    Your series is great, great job! Top-quality stuff.

  • @scratchy523
    @scratchy523 2 ปีที่แล้ว +1

    Great work! I'd like to see more Mario-related mechanic explanations soon!

  • @GlitchCat7
    @GlitchCat7 7 ปีที่แล้ว +1

    Excellent discussion and good video! Subscribed, and looking forward to more!

  • @timothyflisk3439
    @timothyflisk3439 4 ปีที่แล้ว +17

    13:23 What's the game in the middle. Is that a Super Mario Kart ROM hack?
    Edit: The game is called Yoshi's Safari. It's a SNES Super Scope On-Rails Shooter.

    • @Ruebn
      @Ruebn 4 ปีที่แล้ว +2

      It's called yoshi's safari

  • @timmaia5082
    @timmaia5082 ปีที่แล้ว +1

    Always appreciate your videos, thanks for the quality content

  • @SmashHighlights
    @SmashHighlights 6 ปีที่แล้ว

    I love the pixel perfect gameplay, looks so clean

  • @startide
    @startide 7 ปีที่แล้ว

    Very well made video, and very informative ! thanks for your hard work !

  • @homegamerengineer3747
    @homegamerengineer3747 7 ปีที่แล้ว

    wow, what a deep dive... I love it.
    thanks for sharing!!

  • @Jason-oc2tf
    @Jason-oc2tf 7 ปีที่แล้ว

    NEEEEERRRRDD. Kidding, this was actually highly insightful. Loving the videos.

  • @curtreyes00
    @curtreyes00 7 ปีที่แล้ว +66

    1:39 but first we need to talk about parallel universes

    • @SSoup64
      @SSoup64 4 ปีที่แล้ว +1

      Well TJ """""" *H E N R Y* """""" Yoshi.

    • @binouche2281
      @binouche2281 4 ปีที่แล้ว +1

      You're saying this as if it was complicated.

  • @mattsharp6708
    @mattsharp6708 6 ปีที่แล้ว

    Found a new channel to binge. Great stuff, man.

  • @iriscapes
    @iriscapes 4 ปีที่แล้ว +5

    @6:10
    It should be (note the index 0):
    rng[2+y] = (byte) (rng[0] ^ rng[1]);
    instead of:
    rng[2+y] = (byte) (rng[1] ^ rng[1]);

  • @spenceroximina6951
    @spenceroximina6951 4 ปีที่แล้ว +34

    "Asl = Arithmetic Shift Left"
    Me: "Asl = Age Sex Location"

  • @doubleadewi
    @doubleadewi 7 ปีที่แล้ว

    Good explaining, also good luck on the new channel

  • @jamesraward
    @jamesraward 7 ปีที่แล้ว +1

    New favourite channel - hat tip to you good sir

  • @gmwilkiegeorge8685
    @gmwilkiegeorge8685 4 ปีที่แล้ว +4

    This man has an exceptional "lecturer" voice! 🙌👍

  • @RengokuGS
    @RengokuGS 6 ปีที่แล้ว +1

    Amazing. You really deserve more subs.

  • @jordydelange8853
    @jordydelange8853 7 ปีที่แล้ว

    Very clear explanation, very well done!!!

  • @TheBoredEditor
    @TheBoredEditor 7 ปีที่แล้ว

    This is amazingly well made!

  • @etansivad
    @etansivad 7 ปีที่แล้ว

    that was phenomenally good. well done

  • @danhiebert0001
    @danhiebert0001 7 ปีที่แล้ว

    Great quality of videos buddy!

  • @84updown
    @84updown 7 ปีที่แล้ว +1

    I just watch these to feel smart
    Lol actually your videos are awesome. Keep it up

  • @russotragik
    @russotragik 5 ปีที่แล้ว +1

    Meah, now we have a RTC circuit to retrive "BIOS Time" to use the epoch time(seconds since Jan 1st 1970) as seed.
    Anyway, for Sega Genesis I prefer using the "time" taken to user to press start as a seed, and a selector of what randon routine should it trigger.

  • @nameistunbekannt7896
    @nameistunbekannt7896 7 ปีที่แล้ว

    another excellent quality video! thx!

  • @CCheukKa
    @CCheukKa 5 ปีที่แล้ว

    Very good job for your first video

  • @idabomb00
    @idabomb00 5 ปีที่แล้ว +1

    I like the intro sounds, glitched extended 1up sound from SMB3

  • @MagoMakes
    @MagoMakes 4 ปีที่แล้ว +2

    My god man, you're a mad genius.

  • @itsGeorgeAgain
    @itsGeorgeAgain 7 ปีที่แล้ว +7

    There are a couple other ways to really make an RNG function ... random.
    You can read the noise from one of your sound card's audio channels and use that as the seed, or you can read the unfiltered mouse input or the gamepad's unfiltered analog sticks.
    Heck, there are even servers around the world picking up cosmic radiation and used that to supply a seed for RNG functions to use. And i don't think you can go more random that cosmic noise :D

    • @General12th
      @General12th 6 ปีที่แล้ว +4

      Those options weren't available to Nintendo when building the GBA. Besides, aside from the mistake of resetting RNG at level start, this game handles randomness pretty well.

    • @lotrbuilders5041
      @lotrbuilders5041 6 ปีที่แล้ว +2

      J.J. Shank Using the current score And time with the randomness would have been easy to perfect it

    • @lancepate
      @lancepate 5 ปีที่แล้ว

      J.J. Shank This is a SNES game.

    • @lotrbuilders5041
      @lotrbuilders5041 5 ปีที่แล้ว

      Lanzo A Reaper Same difference

    • @mariannmariann2052
      @mariannmariann2052 5 ปีที่แล้ว

      The cosmic noise is not the most random, a quantum system is actually truly random.

  • @ocng
    @ocng 7 ปีที่แล้ว

    I like the new channel! Keep it up :)

  • @revolverkid91
    @revolverkid91 7 ปีที่แล้ว

    this is a seriously well made video

  • @victornoagbodji
    @victornoagbodji 6 ปีที่แล้ว

    really enjoyed this video.

  • @quinn7894
    @quinn7894 5 ปีที่แล้ว +9

    11:47 Pac-man!

  • @jimday666
    @jimday666 6 ปีที่แล้ว +1

    neatly explained!

  • @MorreskiBear
    @MorreskiBear 6 ปีที่แล้ว

    just subbed tonight! Apart from the PHY / PLY, this code should effectively run unaltered on a Commodore 64. Interesting to see such a long, odd value before numbers repeat. Looks like a very fast routine as well. Dunno why they didn't just JSL STA JSL STA RTL and not bother with the Y register at all. Or, the routine can be even quicker with JSL TAY then fall through routine again to get A and exit with random (unsaved) values in A/Y.

  • @Tigrou7777
    @Tigrou7777 7 ปีที่แล้ว

    Hi. Very interesting channel. Hope more videos will follow.

  • @monicat9110
    @monicat9110 4 ปีที่แล้ว +19

    I turned on captions just to see if RNG would be read as orangy

    • @Yolwoocle
      @Yolwoocle 4 ปีที่แล้ว +2

      Lol

    • @thecianinator
      @thecianinator 4 ปีที่แล้ว +1

      Me and Orangey are gonna go get stoned Bubs

  • @naota3k
    @naota3k 7 ปีที่แล้ว

    This video, to me, is a great example of "never played it, never thought about it." However, my brain's craving for MORE KNOWLEDGE ABOUT MORE THINGS ON STUFF has me fascinated.

  • @potatoonastick2239
    @potatoonastick2239 7 ปีที่แล้ว +98

    Cool, will this channel be the Pannekoek2012 but then for SMW? That would be absolutely awesome

    • @CoTeCiOtm
      @CoTeCiOtm 7 ปีที่แล้ว +25

      Butter Bridge 1 done in half an A press coming soon! :D

    • @scrabblehandforaname
      @scrabblehandforaname 7 ปีที่แล้ว +2

      +octacle Look for Some Guy. I know that isn't helpful but that's the name of the user who has done a few no jump levels so far.

    • @wheedler
      @wheedler 7 ปีที่แล้ว +3

      Some Guy is SomeGuy712x

    • @MegAmi24
      @MegAmi24 6 ปีที่แล้ว +1

      CoTeCiOtm But you jump with B.

    • @want-diversecontent3887
      @want-diversecontent3887 6 ปีที่แล้ว +1

      Potato on a stick
      Yes.
      But then, who's the Tyler Kenhe?

  • @vectrex28
    @vectrex28 7 ปีที่แล้ว +1

    Nice video! Subbed!

  • @bienghuo9636
    @bienghuo9636 3 ปีที่แล้ว +2

    Me: hearing EOR instead of XOR
    Me: * insert suprised pikachu face *

  • @lavenderinthedark
    @lavenderinthedark 6 ปีที่แล้ว +1

    11:50 I never knew what they were called XD I love that name so much

  • @aliaspseudonym525
    @aliaspseudonym525 7 ปีที่แล้ว +1

    Great video upload! I don't understand coding or more advanced math that well, but you sure make me wish I do! It's certainly interesting & surprising how much RNG SMW has, & how it works, uninfluential on most of the gameplay as it may be! Looking forward to more neat stuff!
    Also, the Magikoopa(s) are female?
    Frankly, I've always been opposed to calling them Kamek, because Kamek was an individual who took care of Bowser & Bowser Junior, not a race. At least, not in my mind, anyway.

  • @pmangano
    @pmangano 4 ปีที่แล้ว

    i have never ever even thought about checking candle animations and lava splash.
    This is kind of wild since the snes allowed for a kind of limited ammount of code

  • @automat3000
    @automat3000 7 ปีที่แล้ว +2

    Wow dude, you are one smart cookie.

  • @brosephjames
    @brosephjames 7 ปีที่แล้ว +2

    Nice vid. Would be interesting to see some statistical analysis on the rng, like a distribution plot, compared to a modern prng. I know some classic games have notoriously bad rngs.

  • @YujiUedaFan
    @YujiUedaFan 7 ปีที่แล้ว

    What a first video!

  • @DarkMoe
    @DarkMoe 6 ปีที่แล้ว

    Another great way to get more randomness without additional hardware is to take inputs states at various intervals and use them as seeds. Not that random in a console, but for example in computer software, it's very typical to grab mouse movement, which is very difficult to replicate

  • @willk7184
    @willk7184 5 ปีที่แล้ว

    Just .... awesome, thanks.

  • @kingdedederealnotclickbait3125
    @kingdedederealnotclickbait3125 5 ปีที่แล้ว +1

    oh! so it works like the enigma code kinda! that's pretty neat

  • @oso_lacion
    @oso_lacion 4 ปีที่แล้ว +4

    Hey. I know this is an old video. But the java program is displaying only a lot of zero's. I changed the last line of tickRNG to:
    rng[2+y] = (byte) (rng[0] ^ rng[1]);
    And it worked perfectly. I hope it helps

  • @DaeOh
    @DaeOh 7 ปีที่แล้ว

    Your videos are very nice

  • @youngji273
    @youngji273 7 ปีที่แล้ว +2

    Excellent video, glad to see someone actually looking at the assembly code for games rather than not go in depth.

  • @lieutenanttofu8334
    @lieutenanttofu8334 6 ปีที่แล้ว

    Love your videos! Could you raise the volume a little for future ones? Mine is cranked all the way up and I'm having trouble hearing you.

  • @LakkThereof
    @LakkThereof 6 ปีที่แล้ว

    This is really cool

  • @danhorus
    @danhorus 7 ปีที่แล้ว

    Damn, such great content!

  • @joseluisgerman1906
    @joseluisgerman1906 5 ปีที่แล้ว +2

    The implementation of RNG routine, with the XOR and the repeated values resembles the structure of some hardware entities called Linear Feedback Shift Registers, or LFSR. These are widely used for pseudo random number generation in programmable hardware devices, such as FPGA. Could you confirm? Btw Great video!

  • @wulfherecyning1282
    @wulfherecyning1282 3 ปีที่แล้ว +3

    I understand subpixels as a luck factor, since it's just down to a game having more precise movement than the graphics allow the player to (normally) manipulate. But I don't get speed oscillation

    • @PC_Simo
      @PC_Simo 2 ปีที่แล้ว +5

      It’s kind of the same, but instead of the character’s precise *POSITION,* you’d be interested in the character’s precise *SPEED.* Consider needing to cross a gap that’s 23 units wide. Let’s say, for the sake of simplicity, that your jump lasts for 5 frames, and your speed oscillates between 4 and 5 upf (units per frame), every frame. Now, if your speed = 5 upf on the first frame of your jump, your speeds throughout the jump will be: 5-4-5-4-5; so, your jump will carry you 5 + 4 + 5 + 4 + 5 = 23 units; so, you *WILL* cross the gap. If, on the other hand your speed on the first frame is 4 upf, your speeds throughout the jump will be: 4-5-4-5-4; so, your jump will carry you 4 + 5 + 4 + 5 + 4 = 22 units; so, you *WON’T* cross the gap. As you can’t normally keep track of your precise speed every single frame, that event is considered luck-based. 🤓

  • @worgamheim
    @worgamheim 7 ปีที่แล้ว

    great, I'm waiting for a new video about Credits Warp Explained that shows all the addresses visually and how the bytes behave in them, so we can make new codes run

  • @gabrielv.4358
    @gabrielv.4358 ปีที่แล้ว

    Really technical but really cool.

  • @Benethen_
    @Benethen_ 7 ปีที่แล้ว +1

    This is great!

  • @vervalkon
    @vervalkon 7 ปีที่แล้ว

    this is great! amazingly high quality too. What video software did you use?
    i tried making a similar video explaining how 4bpp graphics work but didn't get very far

  • @whiz8569
    @whiz8569 5 ปีที่แล้ว +1

    Oh boy! ASM tutorial coming soon!

  • @MarquisDeSang
    @MarquisDeSang 7 ปีที่แล้ว

    I love your channel

  • @lisamariefan
    @lisamariefan 6 ปีที่แล้ว +3

    So even though the RNG will repeat every 27776 calls, it seems that for a lot of the RNG calls that only care about the results of the upper or lower bits; this means that for their relevant behavior that RNG call sequence "repeats" for them every 128 or 217 calls, respectively, even if the full number 16 bit number is itself unique.
    Also, I have a question: For Wendy and Lemmy their index for which pipe to appear out of is 4 bits long, allowing for 16 possibilities. There's only 8 pipes possible to appear out of. How exactly does the that work?

    • @RGMechEx
      @RGMechEx  6 ปีที่แล้ว +6

      The generated value is used as an index into a table instead of the pipe index directly. It is also responsible for the locations of the dummy Koopas. There are only 16 patterns for where all three show up, even though there could be 105 if every combination were possible.

  • @Wolf99555
    @Wolf99555 7 ปีที่แล้ว

    any chance you could do a video on sprite behaviors? i love hearing about how the enemies and objects work and respond to things

  • @gnuvince
    @gnuvince 7 ปีที่แล้ว +2

    Great video! Quick question, what software did you use to make those nice animations of the code and registers?

    • @TheEgg185
      @TheEgg185 5 ปีที่แล้ว +2

      gnuvince - 2 years and this question has still not been answered. RIP

  • @Mr1755442TR
    @Mr1755442TR 7 ปีที่แล้ว

    No idea what any of that meant, but awesome video!

  • @pixelpi3s
    @pixelpi3s 6 ปีที่แล้ว

    Awesome video

  • @mick7909
    @mick7909 4 ปีที่แล้ว +1

    Nerd! .... Absolutely beautiful analysis

  • @megware217
    @megware217 5 ปีที่แล้ว

    I have no idea how this makes sense but I still want to watch??