Why does audio and video take so much storage?

408 views

So for example, videogames are super heavy on disk space. And aparently most of that space is just the sounds, textures, models, etc. But the code takes very little space.

Why can something as complex as a physics system weight less than a bunch of images?

Code takes very little space, media takes more. But an image is just code that tells the computer how to draw something (I think)

So how come some code gets to be so small in size and some code doesn’t?

In: 53

18 Answers

Anonymous 0 Comments

Some good answers here, so I’ll keep mine simple and clear up a bit of confusion I noticed in your question.

Images are not “code that tells the computer how to draw something.” Code that tells the computer how to draw something is called “procedural drawing/generation,” and usually does take up very little storage space (one of the main benefits of procedural generation is that you don’t have to store the generated content, but the downside is that you have to take the time/processing to regenerate it every single time you load the game).

Images, music, models, map data, etc. are all just “data.” An image would be a massive list of colors such as “red, red, blue, light blue, light blue, red, red…,” for every pixel in the image, a song would be a massive list of numbers specifying different sound amplitudes, models are giant lists of 3D coordinates, and map data would be massive lists of object names, world positions, references to level scripting, etc. Computers have zero idea what to do with pure data, so we then write code as part of the game “engine,” that knows how to read that data and make things happen. We can make it smaller by compressing it, but we can only compress it so far without throwing away important data, i.e. the textures become blurry, sound becomes crackly, and models and levels start to become wonky.

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