– How is it that the first Mario Bros. game was about 32kb, but a JPEG of the game is over 300kbs in 2023?

671 views

I’ve seen the meme/info-graphic that the original file for Mario Bros. was approx. 32kb, but a picture file would be 10x more.

I’ve googled it and looked, but it seems to have some nebulous answers. Could someone please ELI5?

In: 26

57 Answers

Anonymous 0 Comments

The game and the JPEG take very different methods to produce an image on the screen, because they’re trying to accomplish different tasks. They’re both trying to do what they do as efficiently as possible, but they’re not trying to do the same thing.

The JPEG format is trying to reproduce photographs with as small a file size as possible, but while still making them close enough to the original that a human wouldn’t easily notice flaws. There are many ways that this is accomplished, and there are many different types of images that can be stored as JPEG, so the format has to be flexible and so it’s not always perfectly efficient. Quite notably images of old video games, with large areas of flat color, is one of the types that JPEG is worst at efficiently storing. Not only that, but the creation of a JPEG is almost always a completely automated process. It’s not something that gets hand optimized for the specific image being stored.

A NES game is not trying to recreate the real world, and the code for Super Mario Bros doesn’t have to be flexible. The code is written to work on very specific hardware, and do a relatively specific task. Other commenters have shared some of the tricks used to do this, and it’s a remarkable feat, but it took a lot of human effort to reduce that file size down.

A NES game is a recipe for a cake. The JPEG is a blog post trying to describe the resulting cake.

You are viewing 1 out of 57 answers, click here to view all answers.