The Complex Code of Mega Man 2 and How Zipping Works - Behind the Code

79,156
0
Published 2022-04-08

All Comments (21)
  • @musickid43
    There are 2 things developers always struggle with. Cache invalidation, naming things, and off by one errors.
  • @Darxide23
    Off-by-one is a plague that haunts the nightmares of coders.
  • @NonRandomUser
    "It's just one pixel; no one's going to notice that insignificant discrepancy."
  • @arciks11
    2:30 To answer your rhetorical question. Yes, Mega Man 3 likes to REALLY slowdown. And I know there is an improvement hack for it that significantly minimizes the slowdown that occurs. So Comparing regular MM3 with that hack could shed some light on how that slowdown was fixed. In addition to that Mega Man 3 was the entry that removed a physics quirk where Mega Man would slightly slide forwards after stopping which made first 2 Mega Men feel kinda slippery, so that could also be looked into. Another Bug is with selecting Rush Items. If you say have Search Snake and go right on select screen you will select an empty Rush Item in that slot. If you then get weapon energy and use it, you will unlock access to it before you're meant to. I like Mega Man 3 but of all 6 NES entries it's the one that's held together by glue and prayers the most.
  • @Askanon
    As a person who can't code to save his life that was really, really informative and easy to understand. Fascinating stuff honestly.
  • @alexhobbs1208
    I may not understand everything happening but I thoroughly enjoy these breakdowns
  • @Wyrdwad
    Adding the extra purple pixel to Mega Man's center to indicate his actual position has the unintended side effect of making it look like he's sticking his tongue out all derpy-like. ;) Just figured I'd point that out! Heheh. Awesome video, as always!
  • @wishexploder
    This has got to be one of the best video game coding related youtube videos I've seen that blends intermediate programming knowledge with easy to understand narration and examples. Can't wait to check out your other stuff!
  • @thelastsidewalk
    I'm surprised to hear it was put together in 3 months. For such a short time, I feel the gameplay is a lot more polished than MM1. This was an amazing video by the way, fascinating. Thank you.
  • @vineheart01
    i often wonder if the person who wrote the specific code that allowed a rather significant bug realizes years later that they did that and just go /facepalm 'dammit, i see what i did wrong...' lol
  • @meta04
    3:25 An amazing sequel to Bismuth's deadpan "Usually this is done by repeatedly jumping, but that's not an option [in the A button challenge]. Figuring out why is left as an exercise to the viewer." delivery...
  • @Guineh76
    Oh, wow… I went through the code for MM2 a couple of years ago. I remember the environment collision check routines… took a bit of time to wrap my head around all of the bit shifting and packing to figure out how it was arriving at the address of the block it was checking. There was also the enemy spawn routine as you move through the level that was pretty interesting. If I remember there are two lists one for blocks (what you call dynamic) and one for level effects and enemies. It’s been a while since I’ve looked at it. Lots of interesting stuff in the code for sure. Loving your behind the code series, btw! I look forward to every episode!
  • @bdjeffyp
    What an amazing and fascinating breakdown! I love how "off-by-one" errors can drastically affect things. One thing that I would love to see you do in the future, perhaps in a "Talkin' Code" segment, is how you go about analyzing the Assembly code and figuring out how the different subs work. I would imagine that you are using breakpoints and modifying values to see what changes in the game, but I would be interested in hearing your thoughts on how you research and figure out the code behavior for these "Behind the Code" videos.
  • @ryans5615
    I'm just commenting to say that the purple dot on Mega Man's chin makes it look like he's sticking his tongue out, like the Duck Hunt dog or something. I just can't get past it. Also, I do appreciate all the deep dives into the code. I know many years ago, I found a website where someone decompiled all the code for the Mega Man games, and gave it good function names, kinda like what you've done, so that people can go take a look. I think it got DMCA'd because I no longer have the bookmark when it was taken down. But the programming in MM1 and 2 is just spectacular. I think it got better with 5 and 6, but those also had bigger ROM sizes which made it a lot easier. Thanks for the series, enjoying the channel!
  • @kooijbas
    I love these video's. They have exactly the right amount of depth and complexity to make it interesting and technical, yet still clear enough to follow along.
  • @CoolJosh3k
    I use that same Tile Detection method in my game Powers of Hex, except I have to deal with Unity’s reliance on floats, instead of carry bits. I have a arbitrary epsilon value that acts the same way as the carry bit would, but for detection.
  • @TheNei
    Megaman 2 and 3 are amazing! Nice graphics, Sounds, etc -Thanks for this amazing vídeo!
  • @TheSektorz
    Oi btw now that I see what "zipping" means - you can do the same thing in the original Sonic games. Would be fun if you make a vid on those too, Sonic 3 in particular I've seen people break the most using a similar technique.
  • @philrottkamp
    I’ve been speedrunning MM2 for over 4 years now. Zipping is fun but isn’t always easy, some vertical zips require a lot of effort and the Item 2 Bubble Man zip is extremely dangerous.
  • @DouglasZwick
    This is so excellent! Another video that's like it's tailor-made for me. And I'm excited about the prospect of more MM2 videos to come!