Why Super Mario 64 Wastes So Much Memory

The Nintendo 64 was an amazing video game console, and alongside consoles like the Sony PlayStation, helped herald in the era of 3D games. That said, it was new hardware, with new development tools, and thus creating those early N64 games was a daunting task.In an in-depth review of Super Mario 64’s code, [Kaze Emanuar] goes over the curious and wasteful memory usage, mostly due to unused memory map sections, unoptimized math look-up tables and greedy asset loading.

The game as delivered in the Japanese and North-American markets also seems to have been a debug build, with unneeded code everywhere. That said, within the context of the three-year development cycle, it’s not bad at all — with twenty months spent by seven programmers on actual development for a system whose hardware and tooling were still being finalized, with few examples available of how to do aspects like level management, a virtual camera, etc. Over the years [Kaze] has probably spent more time combing over SM64‘s code than the original developers, as evidenced by his other videos.

As noted in the video, later N64 games like Legend of Zelda: Ocarina of Time are massively more optimized and streamlined, as lessons were learned and tooling improved. For the SM64 developers, however, they had a gargantuan 4 MB of fast RDRAM to work with, so optimization and memory management likely got kicked down to the bottom on the priority list. Considering the absolute smash hit that SM64 became, it seems that these priorities were indeed correct.

5 thoughts on “Why Super Mario 64 Wastes So Much Memory

  1. So, when is [Kaze] going to release his 60fps Mario 64 patch? Dude’s been teasing it for the past couple of years at this point. His initial video that went viral used a bunch of emulator footage because of ROM hacks that had no hope of fitting in the geometry budget on real hardware.

    All of his content comes across as “hurr durr gamedevs stupid”, I would be legitimately shocked if he’s ever shipped an actual game in his life. It’s real easy to be smug and arrogant when one has the benefit of 35 years of people picking apart hardware down to its lowest level, and has never had to deal with the time pressures, trade-offs, and sacrifices needed to get a game out the door, particularly on hardware that’s still in its infancy.

    Overall, his content may not be wrong in a technical sense, but it has always come off to me as disingenuously smug, and omits boatloads of context just to pump up his own ego with self-soothing along the lines of “I’m so much smarter than the original Super Mario 64 team”.

  2. ooohhhh… using the same memory size of a smartphone picture. What kind of comparison is that, first of all, smartphones make way to detailed images for what they are actually used for, wasting precious storage/energy/infrastructure in cloud servers for images (of which 90%) that contain no serious info.

    okay… you’ve got a fixed set of hardware, with 4MB of RAM… why are you not “allowed” to use it all? Wouldn’t it be more wasteful NOT to use it? Other data is stored on cartridge, amazingly fast, so no need to cache that in RAM, you can load it on the fly wen needed.
    These are fixed systems, you’ll never encounter one with less memory, so why optimize to run on less memory, put in some time/effort that isn’t used/required? I don’t get it.

    Having memory and not using it, that’s the true definition of “wasting memory”.

    1. I think he agrees, and Mario’s art style is heavily influenced by the ram constraints. If you view the entire video, you’ll see dead spaced unused between the different sections the game uses, which could have been used for a couple more textures, which would maybe enrich the stained glass sections some more. I don’t think he’s advocating leaving memory empty and in the table (which is actually what the game is doing), but freeing up ineffectively used space to use to improve performance and/or graphics. All with the benefit of hindsight and modern tools, and no time constraints because no deadlines or commercial goals, but he acknowledges this constantly. I think some people (WTF Detector included) confuse his enthusiasm for smugness or arrogance, I’ve never experienced it that way and I’m a long time follower.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.