My summary:<p>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.<p>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.<p>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.<p>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.<p>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.