Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Super Mario 64's invisible walls explained [video] (youtube.com)
136 points by mbStavola on April 13, 2024 | hide | past | favorite | 44 comments


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...


There's something wholesome that there's someone out there with a PhD in Super Mario 64. Long live the eccentric.


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


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 :)


My goodness, 3+ hours on this topic! I truly admire the passion! Fascinating!


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.


How on earth does it take 4 hours to explain? I'm sure it's a lovely video but anyone care to tldr?


it's a surprisingly deep topic involving Super Mario's 64 game mechanics such as "quarter steps", integer arithmetic, float-to-integer conversions, the chosen collision detection implementation and plenty more.

There are eight different causes that manifest in the observed "invisible wall" symptoms.

I find the level of detail given appropriate, and consider it as a valuable insight into game engine design as it was appropriate for the time.


I also think it helps to appreciate the historical context: this game was a major milestone in the development of the 3D platformer genre. Some of the bugs or treacherous optimizations may look naive to us now, but there had been few if any opportunities to make those mistakes prior to Super Mario 64. And in spite of the glitches, the game managed to be a huge success and highly influential even outside the platformer genre.

This video does a wonderful job of illustrating how a handful of underlying issues can combine and manifest in so many different ways, and this was only the tip of the iceberg of 3D game physics glitches. And some of these issues are things games can still fall prey to today.


Videos like these can also be a fantastic way of introducing viewers to CS and math topics that they wouldn't otherwise have been exposed to. The video game theme gets them in the door; the detailed analysis teaches them some things which are applicable beyond that game.



Thanks for that. I will go through the whole video later but that at least covered the basic premise.

Essentially, due to the technique used for collision detection, tiny gaps in the geometry causes collision system to treat parts of the scene as having very thin walls that stretch to the top of the play space. Depending on if Mario's quarter steps align with this little gap means that a collision can be made despite it not being visible. Also explains why they impact Mario sometimes and not others.

Like throwing a marble through a mesh fence but you cannot see the fence. Odds are you will make it through but it is essentially chance.


This is exactly it, thanks!


I think most of it is that he shows and explains every invisible wall in the game (Or tries to). The basic explanations are about an hour and a half. It uses graphics for explaining almost everything and does it in quite a bit of detail.


His explanations are just very thorough. If the topic of how 3D video games are programmed interests you at all, there's many, many more hours worth of interesting content on both his main channel and his second uncommentated channel (uncommentatedpannen).


You should see the "0.5 A presses" video: https://www.youtube.com/watch?v=kpk2tdsPh0A


I skimmed it and it’s trying to be the authoritative “phd thesis” on the topic. Still, many sections felt far too wordy and long. Technical communication is a difficult skill.


True. If he wanted to make it a proper phd thesis he'd use language to muddy the waters so no one could understand what he was saying.


Good PhD theses are usually the opposite, they are lengthy to be approachable by a non-expert, unlike ordinary research papers.


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.


Whether you consider videogames worthy of extended time and attention or not, that's entirely subjective and you are correct (for yourself) whatever your take is.

Even in the case of assuming that you consider videogames completely worthless and a blight on humanity, surely you can appreciate that the person in this video has demonstrated an ability to reverse-engineer and understand extremely complex systems that were designed and shipped under very tight deadlines and not-very-good tooling... plus they have the ability to teach this knowledge in ways that non-experts can easily follow and understand.

I would not say loving videogames makes for a good engineer, but I will say that my engineering growth was boosted by the opportunities granted to those videogames I loved when I was younger and how easy it was to inspect and disassemble them.

For some The Cutting Room Floor is a website about unused content, but for other people that website is a gateway drug to needing to peel behind the curtain and understand how the sausage is made.


My despair is that you think he should have spent his effort on something you find, I assume, to be more productive than this. He’s an expert is a video game, it’s wonderful that we have the material abundance to allow that.


Our eternally insatiable urge to learn how things around us work and create new things from that knowledge is what makes us human.

This is a bit of an extreme case, yes, but it's still fundamentally the same thing: someone dedicating their time to understanding something and sharing that knowledge with others, even if it's not particularly useful knowledge.

Pannen's insane dedication to SM64 and the quality of his content have earned him a sort of small cult following over the years of people who watch almost every video he uploads, including me. With that in mind, it's hard for me to say the time was wasted on his part.


Some people really like to know how things work and are willing to put a lot of time in to understanding the thing that interests them. I don't feel despair. I'm glad they have a passion and feel so strongly about something that they wish to dedicate their time to their passion. If anything, I'm a little jealous. To each their own.


I agree. The insights are a small subset of what you’d discover writing a game. It’s like watching someone paint a wall with a model brush.

This to me is an example of an unhealthy special interest. I don’t doubt that it makes them happy, but one has to wonder about the personal consequences of a lifestyle which allows for a 10 month project like this. Will they still be content after another decade of this, or will they regret spending their youth studying a toy?


> 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?

No, but I feel a sense of despair when someone is so solipsist as to consider their own values as some kind of objectivity against which to measure others.


Psychologically speaking my knee jerk diagnosis would be that you have an ego problem. Some random guy out there does something that doesn’t have anything to do with you, but you feel “attacked” because it makes you question your own lifestyle and values.

And no, please don’t take substances to fix psychological issues that just take some awareness and reflection.


I guess I just wonder how someone can afford to spend 10 months working on a SM64 video full time.

Self-funded by his YouTube videos? Ok.

Lives at home and taken care of by enabling parents? Suddenly not a harmless passion project.


It seems to me that if/when AI gets good enough to take over all the jobs then stuff like this is what we'll have left to do. We can always make up games to play and compete on and analyze. Maybe that's depressing to you, but I guess I don't see anything wrong with it.


> Yes, they aren't hurting anyone, and yes they're following their passion

Good, you're able to explain why it shouldn't bother you. The next question is why does it bother you? Any explanations from your side?


Not really. I wish I had:

- that much drive

and

- that much time to sink into pleasurable (useful or not) endeavor

watching people talk about something they have a passion in (whatever that topic might be) is really interesting to me


[flagged]


This is probably the most condescending comment I have read on HN all year.


Condescending is feeling sorry for someone who is doing brilliant shit because it's a waste of time, they should be bettering themselves. Like working harder at their job, or having a normal hobby like playing golf or watching football or fishing. You know, normal things like I do. It just seems so sad they what they are doing is a waste of time.

Sorry I didn't add a "I don't mean to be a dick" comment like parent did.


Who says he doesn't? Stop being so judgemental, get your nose out of others business. He may have a more fulfilling life than you even. Go find a hobby you actually enjoy instead of harassing someone whose found theirs.


The comment you’re responding to is trying to genuinely explore their beliefs and it’s kinda gross for you to shit all over it in an ostracizing way. If you disagree then engage with your perspective without being unkind. The style of your response is in general the root of many society’s problems and I would have thought someone who espouses mind expanding practices would be better aware of that


I feel very deeply that my life is full of meaning, so it can't be projection. Not interested in trying to suppress my feelings with drugs either.


[flagged]


Crossing into personal attack will get you banned here, so please don't do that.

If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.


I love videogames, understanding how a speedrun is made is technically fascinating for me and I am also known to love some other things under the appropiate set and setting[1]... but I'll defend the OP because certainly don't think it follows that someone is a bad human that needs to do drugs just because they don't see the allure of Super Mario 64 and the people who are knowledge-hungry and obsess in understanding its guts.

[1]: Readers please do the research before experimenting, you are tweaking your brain's running config with extremely opaque tooling that is not fully understood. Most of the time the calamity-event chance is low, it's a high impact event if it happens. Plural of anecdotes is not data, and oh do people confuse these.


I'm not dismissing anyone, nor am I a "DARE kid", nor am I projecting my own "meaningless life." I'm simply sharing my own unprocessed genuine reaction to this kind of content, and trying to see if anyone else can relate to it. You obviously don't, which is fine, but I don't see why you seem to be taking it personally.


> Not at all. It's the reason we have literally everything we have. This is the type of person that society needs

I think this misses his point. I believe the despair is precisely that we dont need speedrunners and such. And that its not benefitting is like the mattress spring expert is.

> There is no meaning or purpose

If you believe this, then surely you can understand why he would feel despair over something that justifies itself in there being no meaning nor purpose.


[video]


> (youtube.com)


[flagged]


AI-generated comments are not allowed on Hackernews. See: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...


It failed—that’s just the preamble. The video’s probably too long for it. You should know better than to use AI without checking the results.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: