Wall Hitboxes

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 มี.ค. 2016
  • I explain how wall hitboxes work. I'm sure everyone's encountered their fair share of strange wall hitbox encounters, but fear no more - now you'll understand exactly what's going on and why! Thanks to Tyler Kehne and Peter Fedak for looking into the code for wall hitboxes and then explaining to me so that I could explain it to everyone else.
    Here's a summary: Walls extend out in the cardinal direction that most closely matches their perpendicular direction. For 45 degree angled walls, they extend out in the X direction. Walls extend outward a distance that makes the perpendicular distance 50 units. They also extend inward a distance that makes the perpendicular distance 50. If Mario enters this parallelogram, then he is instantaneously moved outward perpendicularly to the edge of the parallelogram.
  • เกม

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

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

    i was wondering why some walls in this game have such weird "invisible walls" around them for all those years. finaly it all makes sense!

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

      nice!

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

      Well, 7 years later Pannen made an even more informative video on invisible walls on his main channel. Should check it out

    • @jan050375
      @jan050375 หลายเดือนก่อน +1

      @@crylune i did watch the whole thing already.

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

      ​@jan050375 my man 💪

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

    "now that we're wall experts"
    Yeah I'm a wallintoligist. I've been studying how walls work for 24 years

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

    I like how even the most basic, simplest thing in the game still makes your mind turn inside out.

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

      But how do you turn a sphere inside out?

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

      I remember that video it was so old but I still watched it all.

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

      Peter Peterson
      Do you mean to tell me we can turn a sphere inside out but not a circle?

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

      +Teh Joosh Yes, Think of it like a monorail.

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

      *a bunch of low drone-like sound effects*

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

    Probably the most amazing wall video I've seen in at least two days.

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

      tenchimuyo69 Lenny face

    • @ianmathwiz7
      @ianmathwiz7 หลายเดือนก่อน +1

      And now there's an even more amazing wall video out.

    • @tenchimuyo69
      @tenchimuyo69 หลายเดือนก่อน +1

      @@ianmathwiz7 Can you believe I have already seen it!?

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

    This is surprisingly interesting.
    I always wondered why the distance kept to some walls was so big, while that of others was practically nonexistant, and why you could sometimes walk closer then usual just before getting pushed out.
    Great job on the illustrations, that made it very easy to understand.

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

    Yay, now we are all wall-experts. ^.^ Did you prepare certificates?
    A lot of these things sound like workarounds/small errors where the developers probably thought "nobody will ever notice or care". But they surely didn't expect a pannenkoek to exist.

    • @x1g5dj7dh4
      @x1g5dj7dh4 8 ปีที่แล้ว

      +Lugmillord I wonder if SM74 now seems different now with wall knowledge

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

      Chang Jia Yang
      Not really. It's still the cheap hack it was back then xD

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

      A wild Pannenkoek appeared!

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

      Lugmillord Nobody expected the Dutch to make pancakes.

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

      Things were done these ways usually due to a limitation in the hardware they had available at the time (things like the memory of the unit would limit how much information they can store in any scene at a time etc.)

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

    Dude. I do not understand how you did this. I played Super Mario 64 years ago, got 94 stars, beat bowser, and then never really thought about it much after that.
    Then I saw your video about killing the Mystery Goomba in my recommendations, and I was like, "ok, I have to know what that's about."
    And now I'm learning all kinds of stuff about SM64 that I never even thought of before.
    Your videos are hypnotically informative, and I love them.

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

    So mario 64 walls are more complicated than real life walls

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

      German Shepherd yea

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

      *every video game wall is
      Even though real life walls can be complicated too if you go into detail...

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

      German Shepherd Not even close. Mario 64 walls don't have to worry about the atomic polarity difference between the human hand (and all its trace elements) and the surface of the wall (including its base material, composition of that base material, and everything attached to that base material by polar and other forces).
      Touching things IRL is stupid complicated, and that's just for a basic understanding.

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

      German Shepherd
      Not really sometimes my hand clips into the wall

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

      @@thatoneguy9582 i like how you make joke while everyone else is making logical statements

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

    what the heck happened at 4:25 when mario went sideways?

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

      Weird things can happen when you're crouch-sliding and crawling if there are walls nearby.

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

      have we found any way to exploit these weird interactions? also it looks like it pushed you up, could something like that be what happened in the TTC upwarp? Have we experimented with this?

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

      It's purely a graphical phenomenon. Mario's position is still on the ground just as normal

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

      +pannenkeok2012
      And it doesn’t happen in the mirror’s reflection in the mirror room for whatever reason.

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

      See th-cam.com/video/KAZjj2BTpD0/w-d-xo.html

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

    3:58 I'm a wall expert, mom!

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

      Mom, get the camera!

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

      What wall collage should I go to Mom?

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

      Cheryl Della Santina
      *wallage

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

      *knawledge

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

      Team Rocket do your intro next time

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

    Question: Do the actual hitboxes (where Mario has to punch or kick to, say, break a cork block) correspond to the collision detection/bounding boxes you've described, or are they separate? I know in most modern games bounding and hit boxes are usually separate but given Mario 64's early release in the N64's lifecycle and that it's one of the first 3D games Nintendo ever worked on I'm not so sure.

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

      Dang, this is such a good question gone unanswered.

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

      Geometry detection and hit detection are most likely to different systems as most objects probably aren't solid. I don't haven't played this game much so this is just theory with no testing done

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

      I think they were a lot closer to the visible mesh 'cause the N64 could only really render the necessary geometry for a level. later games added polygons to the visible meshes which would strain the CPU in collisions but mostly just increase the clunkyness of movement.
      Also not sure what level design tools were used, may have been easier to just build levels in an ordinary 3d editor and write code to interpret the collisions than to write a custom tool.

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

      I believe "If mario enters the 50px boundary while in x state, perform x action.

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

      Not *one* of the first
      But the first 3D game Nintendo launched.

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

    I just want to say, your videos are amazing. I've linked them to a few of my friends who are like minded and decided to either go back to school for game development or started programming games from their general programming knowledge. And your videos do an excellent job explaining concepts that might not make a lot of sense to people intuitively, like hit detecting (collision), memory management (which isn't nearly as much of a big deal as it was on the n64, but still a fundamental you need to know), etc.
    And plus, sm64 is a game they've all played so it's even easier to understand. I've taught them how to use the sm64 decomp repo to modify code and then run it, and this is a quick way of reminding them why they want to be a game dev if they ever feel overwhelmed.

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

    As a programmer for games, i can't even work out why the hitboxes extend in that weird cardinal direction skew fashion. They already calculate the distance along the normal to extend it by, so its not even aligned to some easy grid or anything. Nor is it easier to test for collisions with, as the easiest to test are boxes aligned to the world axis (AAB, axis-aligned box) followed by a slightly tougher arbituary rotation of a cube (OOB, object-aligned box) followed by the tough arbitrary polygon shapes.
    Also, as a bonus topic: the way OOBs do hit tests with a point normally is that you just rotate the entire world matrix by the inverse of the box rotation. Ie reverse the rotation so that it's an AAB again.
    If you try to do a OOB hit test with any other polygon shape the same applies since it's easier to test against an AAB. However, if you're trying to do a hit test between an OOB and an AAB, rotating everything gives you... an AAB and an OOB! so no benefit at all

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

      +Jewel Ots SM64 was coded on drugs

    • @jongyon7192p
      @jongyon7192p 8 ปีที่แล้ว

      is it cuz Object-aligned Box is OAB?

    • @hi-i-am-atan
      @hi-i-am-atan 8 ปีที่แล้ว +23

      +Jewel Ots Keep in mind, SM64 was one of the first games with a fully 3D world, and likely Nintendo's biggest attempt at it at the time. Mostly of the earlier 3D stuff, to my knowledge, was done by the western world and either had the 3D height done seperately from the rest of the physics ( see: Doom and the other idtech 1 gang ) or ... actually, I'm not sure how Build handles 3D height, but it's always looked janky to me.
      Quake was released literally the day before SM64, so it's obviously impossible for it to be an influence.

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

      I'm just wondering why they chose to represent Mario as a point instead of a sphere - sphere/plane collisions are way easier than points/axis-aligned-not-really-boxes.
      My guess is they were just trying to save cycles. Checking distance to a _capped_ line takes a few multiplications, but their method lets you skip a lot of math with a basic "is pMario.y > topPoint.y or pMario.y < bottomPoint.y", and even more by just checking the distance to the _infinite_ line.

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

      Yeah, and I'm just wondering why they chose to learn addition first - square root is way easier than addition.
      My guess is they were just trying to save children's brains.

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

    this is cool

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

    this video seems to apply to OoT and MM as well, except the push distance is 15 units in those games.

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

      How large is their character in units?

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

    i wonder why the cork box's hitbox isn't aligned the way it should be, could it be because it's not a perfect square?

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

      +ahbeef Probably. Maybe because it's...just one unit off

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

    Damn, I didn't think it was that complicated. Interesting observation.

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

    join us next episode where we talk about floor hitboxes.

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

      Umneriko that legit happened

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

      Umneriko it’s called “Walls, Floors, & Ceilings”

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

    Could we theoretically use the slanted walls to warp through a thin wall?

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

    I clicked on this by accident, but then I was already invested. What am I doing with my life right now, I have a paper to write.

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

    6:18 "Inner Hibox"

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

      My inner Hbox plays jigglypuff.

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

      my inner hbox sleeps.

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

      my inner box identifies as cork. it's not a choice.

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

      typotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypotypo

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

    I can't believe I'm watching an SM64 science video and enjoying it as much as I am.

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

    tbh this is the only channel that I actually pay full attention to for educational purposes

  • @Gzalzi
    @Gzalzi 8 ปีที่แล้ว

    I love these videos. Incredibly informative. I'm super interested in the little intricacies of design like this.

  • @wyrmwynd
    @wyrmwynd 8 ปีที่แล้ว

    This is so super interesting, I've always wondered about the weird ways the objects pushes Mario around in this game. I'm not a very technical person, but you explain things very well, thank you for making these!

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

    I think those snapping effects that occur when you enter a hitbox from the side could be very useful in speedruns. They could probably be used as small boosts to save a few frames.
    Also, have you checked if there is no 1 unit wide gap between the hitboxes on the x axis of a 45 degree angled box? A single unit would allow you to walk straight through.

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

    So much information, damn!

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

    Wow, that's... awkward, but surprisingly simple for 3D. But seems like if you have a box at *almost* 45°, you'd have some funky angles. And what about slopes?

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

      +Rena Kunisaki Slopes≠Walls

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

      So only completely vertical surfaces are considered walls?

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

      Perfectly vertical = walls
      Facing upwards = floor
      Facing downwards = ceiling
      This is especially useful for triangles that rotate, such as the triangles that make up the red coin spinners in TTC. They are constantly switching between the 3 categories.

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

      Huh. I'd have thought triangles usually stay as one type. I wonder if that could explain the upwarp? Some obscure corner case where a rotating object changes between wall/not-wall and a plane of its hitbox briefly becomes extremely long due to it being at 44.9999999° or such?

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

      Except the spinners weren't rotating in that video since he had entered on 12

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

    These videos are the kind of resource who's value doesn't become apparent until some SM64 speedrunner in 2044 uses this hitbox behavior in a strat

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

    Wow. That was surprisingly interesting!

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

    4:25
    Mario defies the laws of physics.

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

    This is quite fascinating. I wonder why they were set up this way.
    Responding to the cardinal directions sounds somewhat reasonable, because the math can be computed much faster. But they compute the exact angle anyway to push Mario back, so why not just check it against that angle to begin with?

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

    I've been playing through Super Mario Sunshine recently and I noticed some similar behaviors when colliding with walls and platforms. I assumed that Sunshine took the 2D Mario style of collisions (invisible lines on Mario's left, right, top and bottom) and adapted them to 3D somehow but this makes more sense.

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

    At 0:51. That box on the left is one heck of an optic illusion.

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

      Hence why I made the executive decision to show a less accurate by much simpler version as well for each diagram

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

    the legend is back

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

    These videos are the best! I love pretending to understand stuff!!!

  • @1gnore_me.
    @1gnore_me. 7 ปีที่แล้ว

    as a game developer this is actually really interesting! I love reading about how older videogames handle problems like this

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

    Was actually glued (snapped?) to this video. Incredibly interesting, somehow.

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

    is there anything in mario 64 that's as straightforward as you'd expect haha

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

      +Gronklems you can walk with the analog stick

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

      +JopYT But not necessarily in the direction you are holding ;)

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

      +JopYT but the tracking system.the inputs collisions,speed?

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

      what have i done

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

      I just remembered, Tyler made some slides about the mechanics behind walking: drive.google.com/file/d/0B06weeQA2uS9Vmw1NEFJS1E4WTg/view?ths=true

  • @colonthree
    @colonthree 8 ปีที่แล้ว

    One of the best TH-camrs out there right now. :'3c

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

    This seems like a VERY convoluted way of doing hit boxes. I can only assume this is because it was one of Nintendo's early 3D games.
    As it's often been quoted that Starfox2 was one of the main inspirations for Mario64, I wonder what the hitboxes on that title look like..

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

    Why is this so interesting its literally talking about wall hitboxes in mario 64 what has my life come to

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

    I didn't know I wanted to know this, but now I know it, and I'm glad I do.

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

    2:32 Goodness me. Is this an explanation for at least some of the "invisible walls" I encounter when I longjump?

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

      Nope. But stay tuned for a video all about those invisible walls

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

    i don't know why I'm watching this, but it's intriguing no less.

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

    Love the explaining music

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

    This fucking channel is deep like seriously it's just a wall

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

      Well as this video explained, in Super Mario 64 the walls, *aren't actually walls*. They're areas which push Mario back, they just happen to look like walls.

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

      It's more that walls are floating textures that have wall hitboxes around them, really.

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

    6:16 Hiboxes are great, aren't they?

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

    so is mario's position for wall collision a 2 byte short as well? I keep thinking that for mario to be "exactly" 6:30 at an intersection, it'd need to be in terms of integers (as opposed to floating point)

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

      To encounter the snapping phenomenon alluded to at 6:30, Mario's position just needs to enter the triangle region where the two wall hitboxes overlap, not an exact point. So it's more lenient that just a single point. Also, I believe Tyler's told me that for wall collision Mario's float position is used, and it is not converted to a short first.

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

    What is the pole in BitFS? Is that treated like an octagon you showed here?
    Could you orientate yourself on the pole so that you have the maximum displacement possible? Even if it still doesn't allow you to reach the platform, it's still minimising the distance between Mario and the platform?

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

      Jonathan Mace climbing a pole doesn’t use collision on the pole. It probably doesn’t even have collision.

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

    So if you pick up an object like a cork box and rotate it around, does that mean that the hitboxes will transform to remain along the cardinal directions, creating a different topology of edges and lips? If so, can you think of any ways this could be taken advantage of during runs?

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

      No. As seen in another video, objects picked up are not the true objects, but a representation of the object slot. the real objects remain where they were, but are invisible and intangible.

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

      No. As seen in another video, objects picked up are not the true objects, but a representation of the object slot. the real objects remain where they were, but are invisible and intangible.

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

      That's good info, but it sort of bypassed Leonhard Euler's question. What about rotating platforms then?

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

      I don't know for sure, but I would guess that rotating platforms have their own, more computationally-expensive collision system.

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

      Rotating platforms don't have walls.

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

    Walls are weird in this game.
    I guess, this early into the advent of 3D gaming, they were still trying to figure things out.

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

    So what's with the weird hitbox on the star statue in the back of the castle?

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

    And it's these gaps, misalignments and overlapping regions that produce the effect commonly known as "jank."

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

    This is very interesting. Collision and hitboxes aren't really an issue with Source, at least not at this level of architectural detail, but this is very reminiscent of the visleaf system in Valve's (in)famous engine.

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

    It's amazing seeing how programmers did stuff like this in the early days of 3D, when there was no tried-and-true standard way of doing things. Everyone was just fumbling around in the dark, building patchwork solutions, until middleware like Havok came along and offered a holistic, standardised method.

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

    I wonder why they went for such a complex solution to something you'd expect to be so simple? Perhaps there were some limitations on the N64.

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

      Nothing could be simpler.

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

    This is one of the weirdest way of collision detection I've ever seen.

    • @chlorobyte
      @chlorobyte 8 ปีที่แล้ว

      +Nick TwoThousand nahh

    • @chlorobyte
      @chlorobyte 8 ปีที่แล้ว

      *****
      since i am a dev, i know how its not hard at all

    • @chlorobyte
      @chlorobyte 8 ปีที่แล้ว

      *****
      videogames, apps and servers

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

      hi my cringy version nice to meet you

  • @Patrick.Weightman
    @Patrick.Weightman 7 ปีที่แล้ว

    LOVE the music

  • @Fireblaze3127
    @Fireblaze3127 8 ปีที่แล้ว

    really interesting stuff :o

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

    Thanks, now I know how to get inside your walls

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

    Now I know why I hated the orange blocks so much.

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

    ... Why did I just watch a 7 minute video about the wall hitboxes in SM64? I haven't played this game in 10 years and I probably never will again

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

    what about in WF? there are these pillars by the In The Blue star or whatever which seem to have displaced hitboxes

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

    Huh, a good content creator, who doesn't speak or make meme/TTS videos.
    *Amazing*

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

    theories and guides about Mario 64? Mommy, where am I!

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

    Actually, I'm pretty sure that Mario's environment collision is handled by a separate, usually identical though sometimes with minor alterations for inacessable areas (invisible walls) invisible 3D Mesh of the world or object (this was the initial solution to the 3D collision question), with normals with which to calculate direction, angle, precisely what a normal is. It's the normals that allow the collision equation to work variably, and also why it tends to fail on very acute angles - in these instances, normals would intersect, sometimes causing a collision miss, basically, a !=. It could also simply use the level geometry, since it never uses vertex colors but instead stores 24-bit normals, XXXXYYYYZZZZWW, instead of 24-bit RGBA per vertex colors. Normals are also used for the lighting equation, basically telling the light source the aforementioned info about the surface so it knows how to light it appropriately. A big problem with fan creations is inaccurate normals and/or color combiner commands leading to a lack of lighting or 1, 1, 1, 1 lighting. For an example of proper normals, take a look at basically any in-game object and notice how the light(s) diffuses across the surfaces uniformly.
    However, if M64 does use boxes for collision, that'd be downright weird. Think about it - mario accurately portraying the illusion of interacting with complex, highly varied in terms of shape, scene polygons with purely squares? I'm not sure how well that would work in such a game... how you could create a hitbox for a world. Hitboxes (or spheres), work in things like fighting games, or shooters, where you just need an edge to edge approximation of the object with which to register hits.

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

      Jeremy Johnson Afaik it uses this accurate to a 32 bit floating point. Also Mario can snap like 79 units up or 110 units down or something.

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

      Jeremy Johnson no, the hitboxes are boxes that are inside the object itself.

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

    Thats why Mario can sleep when he stands in front of the corner of a box!

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

    are the hitboxes the same in a parallel universe? and can you do half an a press?

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

    Well, for my game i am using the same testing method.. Using plane/sphere intersection.. For the corner problem i combine plane/sphere testing with sphere/edge testing.. Which will test a points distance against a line segment (a triangles edge) This way, your corners will turn into sphere segments which will repell you back, the flat walls stay as boxes.

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

    I'm gonna play the panpipes whenever I need to go into detail.

  • @aekobn8520
    @aekobn8520 8 ปีที่แล้ว

    For the cork boxes is the one side not at a 45º angle or is the hitbox just strange. If it were slightly angled, wouldn't that make the inner hitbox of the other wall actually extend past the edge of the outer hitbox ever so slightly?

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      You're assuming that the walls form a perfect square, which I said was a false assumption. The angles of the walls are slightly off from the ideal (and not all off in the same way), and for a wall whose ideal is 45 degrees, a small discrepancy will make the difference between an X projected hitbox and a Z projected hitbox.

    • @aekobn8520
      @aekobn8520 8 ปีที่แล้ว

      +pannenkeok2012 So all of the walls are off, not just the one in the bottom right corner?

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      Some are exactly right, and some are a little off (in either direction). But the bottom right wall is the only one whose being off caused its hitbox to deviate from its ideal orientation. The moral of that example is that even when you try to apply the knowledge from this video to walls that you see, there's still some chance of error due to the walls being imperfectly placed

    • @aekobn8520
      @aekobn8520 8 ปีที่แล้ว

      +pannenkeok2012 I guess I was just assuming that the rest of the walls were all perfectly angled. Thanks for the explanation. :D

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

    4:25 he is on the pipe sideways. How does that work?

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

    I think the hitbox extends 50 units as marios hitbox is 50 units from the actual position so that he wouldn't appear inside it?

  • @twilight-sparkle
    @twilight-sparkle 7 ปีที่แล้ว +8

    Why'd Mario go sideways for a few frames at 4:25?

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

      It was a prediction of Tony Hawk's Pro Skater 5

    • @DanielConley-ItsDanCon
      @DanielConley-ItsDanCon 7 ปีที่แล้ว +5

      Whenever Mario crouches, slides, or does anything that allows him to be tilted left to right, forwards or backwards, a triangle (that isn't rendered) is used to calculate what side and amount Mario should be tilted. The reason why Mario went sideways is because of a glitch in determining where the triangle should be. Pannenkoek2012 has a video about it somewhere... Or maybe someone else made it, I can't say for sure.

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

      Daniel Conley It was somebody else

  • @Mushroomhead671
    @Mushroomhead671 8 ปีที่แล้ว

    How are square hitboxes different from something like a square object rotated 45 degrees? Could a box technically become a 45 degree rotated square if Mario moves into the correct position or moves it in the correct position somehow, or is it based on the box's position on the map?

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      It's based on the box's orientation relative to the map. Every map is laid out on a coordinate system.

    • @Mushroomhead671
      @Mushroomhead671 8 ปีที่แล้ว

      +pannenkeok2012 ok, that makes sense. Like the box on BitS is right on the x and y axis perfectly

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      This video might be helpful: th-cam.com/video/3lADTcTkAvk/w-d-xo.html

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

    6:13 Hiboxes, those are cool!

  • @mathphysicsnerd
    @mathphysicsnerd 8 ปีที่แล้ว

    Very interesting! That geometric diagram implies that the cork box is a kite of some type.
    Is it possible to end up too far inside any given box for the hitboxes of the walls to move Mario?

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      Yes. Anywhere on the left diagram, if Mario is in the center of the box where no wall hitboxes are, then he won't be affected

    • @mathphysicsnerd
      @mathphysicsnerd 8 ปีที่แล้ว

      pannenkeok2012 Okay, cool! (Bear with me here, I have a few thoughts) Do floors and ceilings (i.e. the top and bottom of the box) have the same sort of hitbox as the walls?

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      Sort of. Floors are like rectangular prisms whose height is 79 downwards and they snap Mario to the top. Ceilings are like are like rectangular prisms whose height is 161 downwards and Mario can't voluntarily move into or above this area.

    • @mathphysicsnerd
      @mathphysicsnerd 8 ปีที่แล้ว

      pannenkeok2012 Would it be possible then, for Mario to get in the middle of a box (or box-like object) and move to touch the box top's hitbox?

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

      Yes, then Mario will snap up onto it. That's also how misalignments work: Mario gets under the top of the box without being pushed away by the walls. Hence, he gets to snap up onto the floor without beings pushed away by the walls.

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

    Congraturation; this story is happy end. Challenge again? Go ahead dauntlessly! Make rapid progress!

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

    Hmm... It seems that the diagonal walls extend their hitbox beyond 50 based on angle...
    This suggests that the hitboxes were actually supposed to be at angles matching the visible faces but the devs didn't manage it for whatever reason, however they hadn't corrected the distance amount back to 50, so the game (incorrectly) calculates the distance by angle but places the hitbox aligned to axis.

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

      What you think Pannen?
      I'm just trying to figure out the "why?"

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

    only panenkoek could make a video about walls and make it complicated.

  • @DasAntiNaziBroetchen
    @DasAntiNaziBroetchen 3 ปีที่แล้ว

    I am skeptical that walls actually have hitboxes around them. Aren't they just detected by sphere and ray casts, giving you the *impression* there's a hitbox around them? Also this collision system very much looks like something that was only used for movable objects, like that crate. Am I wrong?

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

    4:25 why does he go sideways for a couple of frames

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

    Great video, but I don't see any justification for why the rotated hit boxes would be slanted. It must depend on the game or the engine.

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

    what should i do with this information?

  • @paulwebb2078
    @paulwebb2078 8 ปีที่แล้ว

    Why are the cork box's hitboxes different from the other boxes?

    • @Architector_4
      @Architector_4 8 ปีที่แล้ว

      My best bet is that its considered as 44 or so degree wall. Like that 30 degree wall on 2:35

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

    that's great and all but can you science how to cannonless please?

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

    What was music for when you were explaining?

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

      Mithel Celestia file select theme

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

    Would I be right to guess that Super Mario 64 is its own engine?
    If so, that explains why there are so many things to explain about the game...

  • @dylanobrien3785
    @dylanobrien3785 8 ปีที่แล้ว

    So now we understand how the hitboxes of walls work, but what about objects, what are those hitboxes like?
    I know that they're probably just a shape, such as a rectangle or square, but if they aren't, then how do the hitboxes of objects like Mario work? How about Bowser's submarine?
    Please answer about the submarine. The sub is able to be cloned and it takes up a slot, so it is an object, or at the very least different than a normal wall.

    • @UncommentatedPannen
      @UncommentatedPannen  8 ปีที่แล้ว

      Triangles are either walls, floors, or ceilings. A triangle whose face points upwards is a floor, a triangle whose face points downwards is a ceiling, and a triangle whose face points sideways is a wall. Consider the red coin spinners in TTC. The triangles on those objects are constantly rotating, and so they constantly switch between these 3 categories depending on which way their face is directed.

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

    when its showing gameplay, which level/song is playing? thx

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

      J4ckK file select theme

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

    Is this just how they work in SM64, or how they work in every game/most games?

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

    Do games still function like this to this day? Or have newer better tehcniques arisen as the technology improves?

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

    Question slightly related to this, but what causes the "Invisible Wall" bug? e.g.
    clips.twitch.tv/WanderingTentativeFrogKAPOW
    clips.twitch.tv/GoodStrangeBananaMVGame
    Is there a separate system for collision detection that somehow becomes de-synced with Mario's position? If it does, how? Does it automatically correct itself? Love the videos, and appreciate any idea on this!

    • @mariorockysonicmegasochjag
      @mariorockysonicmegasochjag 9 หลายเดือนก่อน

      There's 2 kinds of "invisible walls", and the first one is out of bounds. That means that if There's no floor under a place, That place is out of bounds. By the way, some stuff that you May think is out of bounds May not be that, for example Lava and Death barriers. The second one is a cealing that has no floor above it. Cealings extend upwads indefenetly unless There's a floor above it.

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

    2:34 Sure... windmills...

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

    Walls, Walls & Walls

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

    4:24 how the hell did you slide there for a few frames?

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

    You somehow managed to stand on the side of the pipe for six frames around 4:25.

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

    geweldige naam man!

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

    I like how your videos ends just end