from Hacker News

Super Mario 64's invisible walls explained [video]

by mbStavola on 4/13/24, 11:42 PM with 44 comments

  • by bumbledraven on 4/14/24, 1:39 AM

    This is a new explainer by pannenkoek2012, the video game researcher best known for his discussion of "parallel universes" in Super Mario 64. He rarely publishes for general audiences these days, and the description says this video took him 10 months to make.

    https://en.wikipedia.org/wiki/Pannenkoek2012 https://knowyourmeme.com/memes/05x-a-presses-but-first-we-ne...

  • by nimish on 4/14/24, 1:04 AM

    There's something wholesome that there's someone out there with a PhD in Super Mario 64. Long live the eccentric.
  • by g___ on 4/14/24, 1:45 AM

    For over a decade, the author of this video has been leading an effort to complete Super Mario 64 with the smallest amount of A presses, often using extremely complex strategies. Here's a 5h video with the history. Bismuth says the history video took roughly 1500-2000 hours.

    https://www.youtube.com/watch?v=yXbJe-rUNP8

  • by redox99 on 4/14/24, 1:56 AM

    The amount of effort in this video is astounding.

    Quote from the author

    > If you’ve wondered where I’ve been for the past 10 months, it was working day and night on this one video. In other words, I never actually left, I’ve been working on sm64 the whole time. So I didn’t forget about you guys :)

  • by allanrbo on 4/14/24, 3:17 AM

    My goodness, 3+ hours on this topic! I truly admire the passion! Fascinating!
  • by edflsafoiewq on 4/17/24, 6:39 AM

    My summary:

    The mesh for rendering and the mesh for collision detection are separate, so the first cause of "invisible walls" is just that a wall exists in the collision mesh but not in the render mesh.

    The other causes are mostly all because of tiny gaps in the level geometry. The game doesn't want to let you go somewhere where there is no floor below you, or there is a ceiling below you with no floor between you and the ceiling. (A floor is just a collision tri with normal pointing up, a ceiling is one with normal pointing down.) If you try to move into one of these places, you hit an "invisible wall". Tiny gaps in the level geometry (eg. tiny misalignments of vertices) can create these places with no floor below them.

    The fact that collision detection is done with integer math, combined with certain geometric situations, make the game particularly prone to small gaps around the edges of platforms. The bulk of the video classifies these geometric situations in detail.

    The game does not do continuous/swept collision detection, but moves Mario in discrete steps. You only hit the "invisible wall" if you are unlucky enough to land exactly on the gap at the end of a step, which is why you only seem to hit them sometimes. This is the same reason you can pass through regular walls when you move fast enough.

    An exacerbating factor is a bug in the "check for floor under Mario" routine that the video calls "floor overshadowing" (the decomp calls it "surface cucking"). The game searches for the floor under you from highest to lowest, returning the first one below you... except there's no actual way to order tris in 3D space from "highest to lowest" (it uses the height of the first vertex in the tri). So a tri earlier in the list can "cuck" the correct tri later in the list, which can result in a floor between Mario and a ceiling not being found even when it exists.

  • by stemlord on 4/14/24, 12:48 AM

    How on earth does it take 4 hours to explain? I'm sure it's a lovely video but anyone care to tldr?
  • by throwaway74432 on 4/14/24, 3:22 AM

    I don't mean to knock this video or anyone that gets a kick out of it. But does anyone else feel a sense of despair when they see that someone has put so much time and effort into something like this? I feel the same about speedrunners. Yes, they aren't hurting anyone, and yes they're following their passion, but I still feel an instinctual sense of despair when I see someone work so hard on something like this. I'm sincerely not trying to hate on anyone.
  • by mondobe on 4/14/24, 12:52 AM

    [video]