How does the Critical Hit with the Whip work in Castlevania? - Behind the Code

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2022
  • If you would like to support this channel, here is a link to the Displaced Gamers Patreon page - / displacedgamers
    Twitter: / displacedgamers
    Facebook: / displacedgamers
    Instagram: / displacedgamers
    Music by:
    / hariboosx
    / @wolfandraven
    #NES #Programming #Castlevania
  • เกม

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

  • @DisplacedGamers
    @DisplacedGamers  ปีที่แล้ว +234

    We finally got into Castlevania! I wanted to have this out by Halloween but didn't quite make it. However! I ate some candy while the upload processed.

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

      I count’s as a Halloween upload. 😊

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

      As long as it was the best candy ever, candy corn.

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

      I find this bug to hilarious. You really would think it would have something to do with RNG or counter hitting which it kinda does but the fact it's completely unintended is kinda great. Basically, it's ends up being a Bloody Cross.

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

      How does the Giant Bat quick kill work? Please do a video about that if it's worth it!

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

      You know what, it was still spooky, because code scares me, so that works.

  • @goranjosic
    @goranjosic ปีที่แล้ว +87

    Basically, the whip freezes in attack position and does 4 frames more damage than Simon would normally do. Your channel is fantastic, I always can't wait for a new episode! I might even learn assembly for some of these old systems :)

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

      Go for it! And thanks!

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

      Just remember that the NES uses a different ASM code than intel-like processors. The instruction sets and... I think registers (it's been a while) are different. The last time I did this, I was messing around with Zelda 2. I wrote it so that every actor to appear on screen turned into a fairy. Which was fun. Bad guy comes on, is fairy. Locked door? Fairy. Temple boss? Fairy. Statue to place the gemstone to finish the temple? Fairy... and it was at that point that I realized, I f*cked up.

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

      *5

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

      The NES uses a 6502 clone, which is very easy to learn and use. You shouldn't have much trouble at all.

  • @kevingriffith6011
    @kevingriffith6011 ปีที่แล้ว +27

    Honestly this is a bug that I could see being expanded into a feature. Everything you need for a good game element is there: Risk-reward (You're trading your health for a *chance* to do massive damage if your timing is perfect), challenge... new players will get it randomly and it'll be really hype, experienced players will actively reach for it to get kills faster. It should stay!

    • @scikoolaid
      @scikoolaid ปีที่แล้ว

      yeah, what about the idea that the whip gets to wrap around the enemy and deal more damage as it gets pulled back off. I think its neat. I never knew about this bug

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

      It's funny, I've actually watched first playthroughs where the player got one on dracula, but didn't realize it. So they were just left confused why his health went down so quick. Blink and you miss it. :)

    • @CarbonRollerCaco
      @CarbonRollerCaco ปีที่แล้ว

      A sort of Newton's Third Law of Motion for damage. Maybe have it work for the enemy as well.

  • @DatingTV
    @DatingTV ปีที่แล้ว +96

    This is awesome! Hoping to see a Behind the Code on the funky scroll glitch shenanigans that runners do now.
    Edit: As a speedrunner of this game I've always been curious why the bat crit would one-shot because you're on a stair, the only reason I ever heard in our community was "it just does". This now makes sense since the timer would be 16~ frames instead of 4~. Cool insight!

    • @DisplacedGamers
      @DisplacedGamers  ปีที่แล้ว +29

      I started with the funky scroll glitch research. I have some information on it, but the critical hit with the whip was a more timely pursuit for producing a video. I may do the scroll glitch next. We'll see.

    • @malkneil
      @malkneil ปีที่แล้ว

      Why is the timer 16 frames on the stairs instead of 4?

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

      @@malkneil Since you don't get knocked off stairs when you get hit, I suspect it jumps straight to the stunned timer, instead of the shorter pause before knockback.

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

      @@NrgSpoon yeah my number might be off, but this is it

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

      @@DisplacedGamers We have some very good knowledgeable people in the CV speedrunning Discord who have broken it down pretty well already. I'm sure they can help if you ever need it!

  • @duffin.caprous
    @duffin.caprous ปีที่แล้ว +63

    I would be very interested in the damage logic where Simon gets hit and knocked back. As a certain someone pointed out oh so many years ago, it often seems like even if you're facing away from a pit, it's like the game always knocks you back toward a pit. Would be interesting to know how the game decides which way Simon gets knocked back when damaged.

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

      That's easy, it is based on the direction Simon is facing when he suffers the knockback result. If Simon is facing left, he is knocked back to the right, and if he is facing right he is knocked back left. Speed runners use this knowledge to bypass the dungeon section of Level 1. When the bat spawns they leap and turn Simon to leap to the right but he is now facing to the left of the screen, so when the bat hits him he gets a boost to the right and lands on the normally out of reach blocks on the right side past the door.

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

      @@fgetce We do jump to the right, but we do so in a way that Simon is hit on the left side of his sprite. That way it'll still do the knockback to the right.

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

      @@DatingTV I reviewed the game, since it has been more than 10 years since I played it and it seems there is an importance from which direction the collision comes from and a little based on what direction Simon is facing when the collision occurs. It's weird because I had a different memory of the collisions when I played.

    • @TheVgrey
      @TheVgrey ปีที่แล้ว

      That's a nerd reference

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

    As a kid, I called the Nintendo Helpline about this very phenomenon. I heard the guy paging through a book and realized they don't know everything, they just have a book of tips. He didn't know the answer. Thanks for the info!

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

    Wait, there's a critical hit mechanic!?
    Edit: Nope, just a very cool bug. Great video!

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

      On the other hand, Rondo of Blood does have an "extended whip" mechanic. Pressing forward twice quickly while using the whip attack.

    • @EvilCoffeeInc
      @EvilCoffeeInc ปีที่แล้ว

      @@ThePreciseClimber Really! That's neat. I recently got my hands on a PC-engine and it's a great game but quite tough. I'll have to try out that trick.

  • @makeitrein7366
    @makeitrein7366 ปีที่แล้ว +37

    Love it. I especially love the monitoring scripts you build to translate code into plain english for the viewer to illustrate your points.

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

    Great video. My son said, "So, no Game Genie code? Rats." He loves them and saves your GG codes from each video.
    Thanks for the explanation. I look forward to every Displaced Gamers video.

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

      Ooh man! I am sorry I didn't give a Game Genie code this time. It is a tradition with these videos, but I didn't have one to make this time. I guess I could have extended the freeze timer to increase damage.

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

    Mostly commenting for engagement. Keep up the good work!
    When I was 12 I tried really hard to get into the SNES/NES hacking scene but never could find a community where I could learn from. Twenty years later I'm finally learning a bit about how these games worked from an inside perspective

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

    I'd love to see you tackle Ironsword: Wizards and Warriors II collision detection. I was under the impression it's one of the first games to attempt per body part collision, but did so poorly. If you've ever played the game it seems like enemies either do no damage at all or one shot you, and your sword is unusable due to its short collision range.
    I love this channel btw, it's such a niche topic but just the sort of content I love.

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

      Has anyone written anything about the "per body part" collision aspect? Perhaps an interview from the past? Did you figure out the game had implemented this while playing?

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

      @@DisplacedGamers I can't find any official documentation, I just remember reading about it on the Internet a long time ago. The manual hints that helmet upgrades specifically help protect your head. I also found a post on gamefaqs that mentions the body zones thing but I think my comments are getting deleted when I include the url. Honestly it could just be confusion over a lack of s after being hit or something like that.

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

    "So, how about fixing it?"
    Doctor Evil: HOW 'BOUT NO!!!

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

    Great video as always! Really neat stuff. There's always a point in these videos where I feel lost and I'm worried I just am not going to understand what's going on, and then later on it all clicks and just makes sense. You're a great teacher!

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

      Thank you! Scripting it is one of the toughest parts. Translating the code discoveries into a narration that makes sense is important to me, and I am glad to hear that it is worth it!

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

    All these videos are so interesting and produced so well.... Thanks for doing this

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

    always enjoy your videos my dude!

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

    Thanks for the great breakdown. Love seeing the secrets of the whip

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

    These videos are always so detailed and good. Fantastic!

  • @SalP123c
    @SalP123c ปีที่แล้ว

    I love the breakdown man, because these videos also double as a kind of introduction to the kind of issues and bugs that crop up in complex systems, but complex systems us 30+ year olds are familiar with from a young age (NES games)

  • @Krayzar
    @Krayzar ปีที่แล้ว +27

    The Japanese cartridge version's Easy mode doesn't contain the knockback state which does some weird things with mechanics, like not allowing Simon to die while crouching. You can technically beat the game on every boss while dead, it's just a bit hard without some elaborate setups.
    www.twitch.tv/videos/541994542?filter=highlights&sort=time
    But yeah, death is programmed to require the standing state by game logic. There's also some fun things you can do with death checks on the DOS and C64 ports - i.e. saving and continuing or transitioning screens while "hit" skips checks as well. Though unfortunately NES is coded in such a way that achieving something similar isn't possible.

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

      There is some interesting history in the FDS to cart Rev 0 to cart Rev 1 to Famicom cart re-release, for sure. Lots of good stuff.

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

    Glad you finally reached Castlevania. I knew I wouldn't be disappointed. Can't wait to see what other secrets you'll find in the code next video.

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

    Great video! I actually didn't know about frame 17 collision, and I've been taking part in this game's speedrun for years.

  • @zyad48
    @zyad48 3 หลายเดือนก่อน

    So I'll be honest, I'm new getting into gamedev and your videos have been excellent all around, just learning how games did things they did have been inspirational and just profoundly interesting to me.
    This video has a somewhat small aspect that kinda blew me away because I was seriously misunderstanding how State Machines worked.
    Every time I've ever tried looking up information regarding FSM, it's always saying things like "Keep states simple, keep them separate" and at least in my interpretation usually keep them mutually exclusive. With that in mind I had no clue at all how exactly you would replicate a lot of games that seemingly _would_ use FSM for the sake of clarity, game design, and even just ease of development.
    Then I realized something in this video and it's so simple but it never even crossed my mind:
    Just use multiple FSMs on the same game object. I know, weird video to notice that on, but seeing "Simon Action" and then "Simon Attack" made me realize how limited my view of this stuff was lol. Of _course_ you should probably have another FSM for handling states that are supposed to be usable during other states, like being able to attack while in the air, or on the ground, for example.
    Anyway, I just felt strongly about it because it feels like I've been trying to wrap my head around FSM forever now and this helped me break through and understand how I can implement it better now lol

  • @lazarus8453
    @lazarus8453 ปีที่แล้ว

    I love seeing whats going on in the background . Keep doing this type of videos .

  • @JoLiKMC
    @JoLiKMC ปีที่แล้ว

    I thought this was going to be some video about how some enemies in _Castlevania_ seemingly take more or less damage from attacks than others. I was ready to call shenanigans and explain that more enemies just have more or less health than 16. But, nope. This is legitimately an oversight in the game. Thank you for explaining it.

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

    This content is what TH-cam is all about. 🙌🏆

  • @fadorka
    @fadorka ปีที่แล้ว

    Whoa super cool my question got answered. I didn't expect critical hits to work like that!

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

    DG: "Let's fix it!"
    The Castlevania Speedrunning community: "How about no?"

  • @Color-Theory
    @Color-Theory ปีที่แล้ว +1

    Such a great game. Thanks for digging in!

  • @tylerb6981
    @tylerb6981 ปีที่แล้ว

    I love your videos so much, and I honestly have no idea what it is specifically about them. They are a master class in video game documentation. I have been here since the beginning it seems, and the quality and effort that goes into your videos is constantly improving and I love it.
    I would like to make a request for something that isn't your normal wheelhouse, but would still be such a fun ride.. BtC for roller coaster tycoon. Famous for being written in assembly and incredibly efficient, I would love to learn more about the how and the technical expertise that must have been involved. It's a bit of a departure from your normal formula, but I can't find anything like it on TH-cam.

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

    Oooh. I’ve seen speedrunners do quick kills before but no idea how. Thanks for that explanation!

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

    Love these videos! Always neat to see under the hood of the games we played as kids

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

    Would love to see a 'methodology' video. I know you've touched on it in a few of your videos, but one titled such and that focuses on it would be great.

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

      e.g. how you write some of the scripts in fceux/mesen

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

    I guess they only updated game state when relevant to not hammer CPU too often.

  • @zincorelearn980
    @zincorelearn980 ปีที่แล้ว

    Now that's a CRITICAL hit for a critical situation you're putting yourself into.

  • @Noah-tn5bc
    @Noah-tn5bc ปีที่แล้ว

    Your channel is such a well-edited and produced look into so many interesting quirks in the code of famous games. I cannot overstate my appreciation for the work you do.

  • @homerosz97
    @homerosz97 ปีที่แล้ว

    Thank you for covering this topic! I've been looking for an explanation video on this for a while now.

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

    I always wondered how speed runners would sometimes one shot kill the bosses in this game, now I know why. Great video, thank you!

    • @Dylan_thebrand_slayer_Mulveiny
      @Dylan_thebrand_slayer_Mulveiny ปีที่แล้ว

      They were using game genie or some other hack.

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

      @@Dylan_thebrand_slayer_Mulveiny claiming that speedrunners are using game genie is the dumbest thing I've ever heard.

  • @SomeIdiota
    @SomeIdiota ปีที่แล้ว

    As someone who has dabbled in some more-than-casual, less-than-speedrun, head-to-head racing of this game (among others), it's so much fun to see even further under the hood. Basically, I know the "how," but it's great to see the "why".

  • @todruhni9694
    @todruhni9694 ปีที่แล้ว

    amazing work as always. you somehow manage to make Assembly Code interesting which is a feat in and of itself.

  • @datoaster4991
    @datoaster4991 ปีที่แล้ว

    I love these videos so much.
    The way you break down the way the code of the game works not only show a great deal of effort on your part but also the ingenuity of the programmers of the time

  • @ArtemioUrbina
    @ArtemioUrbina ปีที่แล้ว

    Awesome work, as always. Educationa and fun!

  • @_polpon
    @_polpon ปีที่แล้ว

    Great video as always! Always look forward to these videos :)

  • @InsaneFirebat
    @InsaneFirebat ปีที่แล้ว

    That teaser at the end!

  • @Multienderguy37
    @Multienderguy37 ปีที่แล้ว

    Castlevania is one of my favorite series. Glad to see a behind the code for it!

  • @phrozenliquidz
    @phrozenliquidz ปีที่แล้ว

    Every time there's a new one if these it puts a smile on my face, more people should sub to your patreon

  • @clockmaster_77
    @clockmaster_77 ปีที่แล้ว

    amazing videos , very instructive, thanks!

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

    "Simon states are in agreement once again" - This is a bug I've seen way too often that is introduced by having multiple states instead of just one. If there are multiples states, you must keep them correctly in sync at all times and there is quite often a situation where it is overlooked that these states can go out of sync for a certain combination of actions. This happens even more often if there are no states at all, just a series of flags, as keeping multiple flags in sync is even harder and requires even more code. State machine logic is very simple as long as you only have one state, so ideally you cramp everything into a single state, even if that means you need a lot more states. E.g. instead of state 1 being either A, B, C, or D and state 2 being either nothing, E or F (but only valid in state B) or G or H (but only valid in state D), you can also just have a single state with possible values A, B, BE, BF, C, D, DG, DH. That way if you switch from, let's say, BE to A, you not only switch B to A but you also automatically always clear E when doing that, no extra code required and no need to remember to clear state 2 when it is in state E or F and state 1 switches away from B. Keep in mind that states are inexpensive, they don't require memory or processing power just because they exist, so it makes no difference if you have 4, 16 or 128 different states. States are just numbers and only expensive when there is a mapping table or code that may have to map/handle all existing states. Yet by assigning state numbers in a clever way, many states can be as easy to handle as little ones. E.g. If you map A to 0, B to 4, C to 8, and D to 12, you can assign BE to 5 and BF to 6. By masking off the last 2 bits, you still only have 4 states to map in a table or handle in code that way, just as if A, B, C, and D were separate states again but you still keep the benefit of autoclearing E, F, G, and H without any extra code whenever you set the state.

  • @anon8239
    @anon8239 ปีที่แล้ว

    I got a fun topic for you if you're interested. Mega Man 2. There's a glitch in boss rooms where if you lay down a lot of Item 1's or bubbles then touch the gate (sometimes while taking damage), you'll activate the door, transporting you to the next screen. Commonly called the "Boss Gate glitch"

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

    So if you used some game genie codes to lengthen the freeze timer you could increase the damage of the critical hit, that's cool.

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

    Great video!

  • @DingoYabuki
    @DingoYabuki ปีที่แล้ว

    Very helpful explanation!

  • @ProximitySound
    @ProximitySound ปีที่แล้ว

    Hell yeah! I was asking for this :)

  • @ArborDaze
    @ArborDaze ปีที่แล้ว

    Thanks for another great video, Chris!

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

    This should be interesting to the speed runners.

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

      They definitely exploit it! The Dracula battles in particular are quite fun to see. It takes some great skill to perform a double cross/boomerang throw while backward jumping & whipping with a crit.

  • @RetroGamingNook
    @RetroGamingNook ปีที่แล้ว

    I did this when I finally beat the game a few years back. I had no idea I did it until I reviewed the video I was uploading. It’s cool to know the full details behind this. Thanks!!!

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

    So pretty much for 4 frames (stun) Simon's whip becomes holy water (does damage every frame) that is insanely broken if you can consistently pull it off

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

    This could be a very interesting risk/reward system

  • @ClassicGameHacking
    @ClassicGameHacking ปีที่แล้ว

    I never knew about that bug, very nicely done as always.

  • @lpfan4491
    @lpfan4491 ปีที่แล้ว

    "It does not clear the data until new one is loaded to overwrite it".
    Right then was when I had a vague idea where this is going.

  • @bedwablackburn
    @bedwablackburn ปีที่แล้ว

    I love the depth you go into, this is gonna be great as always. (Grabs a handful of candy corn and mug of coffee)

  • @retro3188
    @retro3188 ปีที่แล้ว

    Cool explanation! I always liked the health bars in ClassicVania games.
    Player IIIIIIIIIIIIIIII
    Enemy IIIIIIIIIIIIIIII

  • @nin10doadict
    @nin10doadict ปีที่แล้ว

    I didn't even know this glitch existed, so that's neat

  • @michaeldarabasz7210
    @michaeldarabasz7210 ปีที่แล้ว

    A great follow up would be the mummies and the cross glitch.

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

    So does this happen on all versions of Castlevania? (PRG0, PRG1 and Vs .) Also I hope the nasty Grim Reaper hallway bug from the PRG0 version is explained next.

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

    Please don’t fix it.. LOL. I’d love to see you dissect the bat crit and why the stairs do even more damage than standard crit. Very much enjoyed your video.

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

      I believe it's because the stairs don't knock Simon back; they freeze his current position in place for 16 additional frames, including his whip graphic if he happens to be whipping. So if the frame 17 interruption activates on the stairs, the crit that occurs will remain active for those additional frames too.

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

      @@jay_cee583 Thanks dude. That makes sense. So it’s a 16 frame counter instead of 4. -RetroDismas (forgot to change profiles..LOL)

    • @jay_cee583
      @jay_cee583 ปีที่แล้ว

      @@AllenPlyler omg retrodismas haha good to see you here

    • @ThiagoMnab
      @ThiagoMnab ปีที่แล้ว

      @@jay_cee583 Forgot to ask if enemies has or not Iframes on CV1 Kappa

  • @dmorley100
    @dmorley100 ปีที่แล้ว

    Until I saw this video pop up just now, I didn’t even know there was such a thing as critical hits with the whip in CastleVania.

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

    "With that, let's jump straight to Dracula."
    _Castlevania speedrunners everywhere are super-jealous_

  • @renakunisaki
    @renakunisaki ปีที่แล้ว

    Funny how a bug creates a really interesting (if overpowered) mechanic. You can do a bunch of extra damage, but it requires getting hurt _and_ perfect timing, so it's risky.

  • @drucewayne
    @drucewayne ปีที่แล้ว

    Believe it or not, but I've never seen a critical hit in any of my playthroughs. This is why this video was doubly entertaining for me.

  • @dbnpoldermans4120
    @dbnpoldermans4120 ปีที่แล้ว

    please do a video on the other castlevania bug you showed us
    And do a series on all bugs/exploits in all castlevania games please
    You explained it so well, you really know how to explain these things. Amazing. I wonder if management or the development team simply did not beleive the testers finding or if they were unsure on how to fix it at the time? I suspect the former. Also probably the tester did not understand why or exactly when the bug occured.
    I am subscribed and though the video was not interesting until retroRGB pointed it out!
    How wrong my assumption was. I will never doubt you again!
    The critical hit, lol
    I thought it was how the code handles the final hit on an enemy, which in retrospect does not make sense since that is not really interesting to make a video about

  • @Patashu
    @Patashu ปีที่แล้ว

    I enjoy that the moment I saw the red box at 1:10 I went 'oh, I know how this happens now' and was right LMAO

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

    Heck yeah! I'd been wanting to know why this happened for a long while now! Seeing how they work really make me think about how to approach programming games like these in assembly. There's so many interesting behind the scenes stuff I want to know more about in these old games, like the vertical scrolling sections in Megaman 5 where the floor doesn't move while the background does.

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

      The visual part of that is easy, it's done with the MMC3 scanline counter IRQ. When the screen rendering hits the specified scanline, the interrupt occurs and the code can set an X and Y screen position fixated on the ground for the rest of the frame to be drawn.

    • @Bofner
      @Bofner ปีที่แล้ว

      @@vuurniacsquarewave5091 Ahhhh, is that the same way that the status bar in Super Mario Bros 3 is drawn then?

    • @vuurniacsquarewave5091
      @vuurniacsquarewave5091 ปีที่แล้ว

      @@Bofner And many other things yes, like the ship in the water. MMC3 was one of the most popular mappers, games that came earlier than IRQ generating mappers had to resort to the console's built-in method of syncing with the frame rendering, which is much more costly and can only be done once per frame, called the "Sprite 0 flag". When rendering reaches the first opaque pixel of the first hardware sprite overlapping with an opaque pixel of the background a readable flag is set by the PPU. By polling this flag again and again until it is set, you can wait for a certain point to be reached in the frame, but you are wasting all your CPU just spinning on the poll until it is set. You can try to squeeze in some code that you know for sure will be able to fit before you need to start polling and take action, but it's more wasteful either way and a proper IRQ. Also, once the flag is set, it is only cleared when the next frame begins to draw, so this can only be used once (ideally for a status bar on the top of the screen).

    • @Bofner
      @Bofner ปีที่แล้ว

      @@vuurniacsquarewave5091 Wow, that really does sound limiting. I've never had that much experience witht he NES from a programming standpoint, but I've done work with the Sega Master System, which can't be exanded in the way the NES can, but has a lot more features out of the box (like handling interrupts) so whenever I see interresting screen effects on the NES, I tend to compare it to what the SMS can and can't do

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

      @@Bofner The SMS seems really great when it comes to color, but kind of bad when it comes to sprites. But then again, it uses VRAM by design, whereas the NES has the option for the cartridge to provide the graphics on either ROM or RAM. Both can be exploited really nice, and just to give a great graphical example, I think Aladdin on SMS does a lot of amazing graphics tricks by making buildings look fake-3D (must be done with tile swapping in VRAM ) to parallax scrolling and still manages to have great spritework.

  • @briankarcher8338
    @briankarcher8338 ปีที่แล้ว

    Great video! Goes into great detail on one of the biggest types of bugs in games from my experience. Very hard to debug these inconsistent state issues :(
    I'd say at least half of my bugs relate to something being in the wrong state for some reason and then having to figure out why.

    • @SomeIdiota
      @SomeIdiota ปีที่แล้ว

      It's pretty fortunate that patching and alternate updated versions weren't very feasible in the past. We have a vast showcase of coding quirks and flat-out bugs to enjoy and/or learn from. I feel that I learn far more from mistakes or poor practices, my own or otherwise.

  • @geraq0
    @geraq0 4 หลายเดือนก่อน

    This is mind-blowing, I don't recall ever landing a critical hit on Dracula but I do remember destroying the Bone Pillars in one hit while being hit myself, I just never realized what it was. Also, doesn't the whip do damage on its first frames when Simon is holding it behind its back? I think it does in other Castlevania games.

  • @jeremy2283
    @jeremy2283 ปีที่แล้ว

    I've done this a few times on Dracula. It's so op when it happens though. Nice to see the math behind it.

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

    10:06 Fixing it? I'd say it's a great example of "It's not a bug, it's a feature!"

  • @bogaagames2706
    @bogaagames2706 ปีที่แล้ว

    A fun thing to show would had been a hitbox while the bug occures. Since in knockback he faces backwared and the hitbox extands to both sides. Very nice explenation and islustraiten. Thank you sir. Also the cross crit would be very easy to explain as it just keeps track of the last enemie hit to not hit again as far I am aware of. So it becomes clear what happen when two sprites overlap and do not die while the cross overlaps them too.

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

    would you release the lua scripts you make for these videos?

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

    This is great, just a few hours ago I was dealing with a bug that shares a surprising amount of similarities to this one.
    Had yielded a unexpected feature simply from not clearing a variable when it should have been cleared, lol
    A cool accident, but it was still a bug.

  • @Dave-kq7gv
    @Dave-kq7gv ปีที่แล้ว

    This is so cool! Can you do a 'behind-behind-the-code'? I mean how do you write these scripts? I know Messen(sp?) is involved, but how do you script breakpoints & such? My apologies if you've already made a vid like that

  • @zerobatsu
    @zerobatsu ปีที่แล้ว

    Very nice

  • @FuelAirSparkTime
    @FuelAirSparkTime ปีที่แล้ว

    This channel is for sure one of the best on this godforsaken platform.
    Shmootube seems so devoted to promoting annoying and redundant minecraft and fortnite videos from some overhyped goof rather than truly interesting and high quality videos like this one.
    I'm sure you know by now the numbers don't really mean shit cuz your channel is dope , my dude.

  • @clarafedde8674
    @clarafedde8674 ปีที่แล้ว

    Wow that is interesting. Never knew a crit was in that game.

  • @Choralone422
    @Choralone422 ปีที่แล้ว

    As a kid I always wondered why sometimes when Simon got hit it seemed to do a lot of damage. Now I know why!

  • @KornPop96
    @KornPop96 5 หลายเดือนก่อน

    I never understood how critical hits worked before, but after watching this video I'm proud to say i understand it even less now. 😂

  • @pablor2658
    @pablor2658 ปีที่แล้ว

    Good trick! I waited for some kind of "critical logic for enemies" (like onimusha) but, it was a bug instead (I know was too much for 80's capcom).

  • @LordMarcus
    @LordMarcus ปีที่แล้ว

    The CV critical attack mechanism feels a lot like when Undertale tells you a certain someone is the weakest enemy with each attack only consuming 1 hp.

  • @johnnynorrisjr.39
    @johnnynorrisjr.39 ปีที่แล้ว

    Can you look at collision detection in Simon's Quest and figure out how the "drop through the floor" glitch works? I'd love to watch a video about that.

  • @CarbonRollerCaco
    @CarbonRollerCaco ปีที่แล้ว

    Simon be abusing trading hits LONG before the FGC was a thing:
    "It is not my -fist- whip, but your own sins that will kill you."

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

    Great detailed breakdown, but why would we want to "fix" the critical hit?? This is one of those "it's not a bug, it's a feature" situations. It takes a lot of skill and practice to time that critical hit just right, and when it finally happens it's extremely satisfying.

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

      Well, the generic response for why we would want to fix it is "for science!"

  • @Mizuki_Jun10
    @Mizuki_Jun10 11 หลายเดือนก่อน

    Thanks to a simple frame bug, Castlevania basically created the famous Critical Hit system!

  • @philipmurphy2
    @philipmurphy2 ปีที่แล้ว

    What TH-cam is all about is the random facts about games for sure.

  • @vansajexora
    @vansajexora ปีที่แล้ว

    Brilliant

  • @joeymurphy2464
    @joeymurphy2464 ปีที่แล้ว

    Any chance you could share the Lua scripts you use for the readouts in these videos? The progress bar in this one is really cool, it would be super helpful to be able to try out my own data readouts using yours and a springboard.

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

    For the algorithm. ✊

  • @SoulBlazer08
    @SoulBlazer08 ปีที่แล้ว

    There's a critical hit in Castlevania????
    I've been playing the game since it first came out and NEVER saw this or knew about it!
    (Mind blown)

  • @cherokeefit4248
    @cherokeefit4248 ปีที่แล้ว

    Glad I got this on the gba

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

    This is going to sound kinda random, but have you looked at much Castlevania II code? I was playing it (because Halloween) and one part that always confused me was the behavior of the bouncing slimes. Namely, how they would sometimes pass through floors or ceilings. I assume it has something do do with the vertical vs horizontal scrolling in the area, and how collision was handled, but definitely was an odd thing to see as a 7 year-old.

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

      Some of the blocks are areas where Simon will fall through if he attempts to walk across them. I think the slimes therefore pass through those same blocks while going either up or down.

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

      @@DisplacedGamers Well, you have me doubting myself now, but I'm pretty sure this isn't where the false blocks are. I think happens when the slimes are at the edge of the screen while it scrolls. But now I have to go load it back up and make sure I'm not just crazy.

  • @KewneRain
    @KewneRain 7 หลายเดือนก่อน

    If speedrunners could do this consistently it'd revolutionize Castlevania 1 speedruns

  • @bulb9970
    @bulb9970 ปีที่แล้ว

    Recently this happened to me by accident during the Dracula fight and I was wondering what was the reason