Eli5: How is it that a Nintendo or Super Nintendo video game, with its graphics, its music and everything else, fits in a few kb when a single image or a single musical composition uses more than that?

698 views

Eli5: How is it that a Nintendo or Super Nintendo video game, with its graphics, its music and everything else, fits in a few kb when a single image or a single musical composition uses more than that?

In: Technology

5 Answers

Anonymous 0 Comments

> …a single image or a single musical composition uses more [than a few kb]

This is a modern understanding of video games, where Call of Duty textures take up gigabytes of space. On the NES, a sprite is often 16×16. That’s only 256 pixels of information to store. On top of that, because the technical limitations of the NES, a pixel could only select from so many colors. I believe techniques were often used to select a color from a palette, which would require less space than storing the raw color data itself. Rather than a byte to store the exact color for a pixel, you could select from one of four colors with just 2 bits. That would make Mario’s 16×16 sprite take up 512 bits – about 5% of a kilobyte – if you stored it this way.

Similar considerations are made for music. Actual music files are quite large as you have to store all the tiny, tiny, tiny information picked up in the recording. But video game music back in the NES/SNES era wasn’t recorded. They used a standard called MIDI where instead of the game storing and playing back an audio file, it would store the notes of a song as well as the instruments/other info about these notes. It was very space efficient to store what was effectively sheet music and reconstruct it on the fly, as if playing the instruments, as opposed to storing and just playing back the chunky audio files.

There are so many more examples of this ruthless and necessary efficiency in this era of game development that is totally lost nowadays. I would recommend doing some YouTube binges about this topic as it’s incredibly fascinating how these game creators were able to do so much with so little.

Anonymous 0 Comments

In addition to what everyone else is saying, the creators (I feel bad calling them developers, since they were designers, developers, artists and sound engineers) of those games were fucking wizards of artifact reuse.

Like the bushes in Mario are just recolored clouds. This blew my fucking mind when it was first pointed out to me.

https://1.bp.blogspot.com/-_a_oggyx9pU/VLhDiXqX5oI/AAAAAAAACeI/7xtotE-fqs0/s1600/mario%2Bbushes.png

Anonymous 0 Comments

Let’s start with an old nintendo first
Say you have a box. The box holds 256(8 bits worth) marbles. Each box representation one dot that you can see. A old tv will have around 300,000 of these boxes used to make the display.

For modern (1080p) display it each box must hold 340,282,366,920,938,463,463,374,607,431,768,211,456 marbles. So the box is much bigger. Also there is 2,073,600 boxes now.

So not only are the boxes much bigger there are more of them. This also happened with sound and all other aspects of computing and is the reason everything is larger now.

Anonymous 0 Comments

For two reasons.

One, those games are really really basic when you think about it, basically just telling what pixels to become what colors, not super duper in depth. And the sounds are all pretty monotonous.

While music files thatre high quality are very very in depth, you can hear every little sound made in the recording, that attention to detail requires extra data.

Reason two: they had to be that way. Storage data back in the day was Very Hard to keep smallish/portable. Really the only why to keep data storage small was to keep the data you’re trying to store small too. So programmers were restricted by what they were working with. And because of that had to make the game very efficiently.

Modern videl games don’t have the problem, which a lot of people think is kind of a bad thing, because it leads to big triple A games not being done great and then taking up 100+ gbs of storage (looking at you CoD)

Anonymous 0 Comments

Another reason: The game only stores the source material for what it displays, but the image or the recording has to be able to store anything no matter how it was made.

The Mario game has a picture of Mario in it, but the recording of you playing Mario has to store Mario every frame because it doesn’t know it’s based on the same picture every time.

For the sound, the Mario game has a list of commands like “white noise for 0.1 seconds, beep at 440 Hz for 0.1 seconds, silent for 0.1 seconds, …” but the recording of the game has to record the actual sounds. It can’t turn the beep sound back into the beep command. Also if the sound that comes out of the game isn’t a perfectly shaped beep, it has to record the imperfections in the beep, because it records what is actually there, not what is supposed to be there. Even if it could reverse the beep and store the command, it would have to be “beep at 440Hz for 0.1 seconds, but the beep is slightly distorted like this: <a bunch of numbers to remember the exact amount of distortion>”