Today’s programmer A and 1980’s game programmer B:

A: How come you can achieve so many pictures, music, animation with 128KB? B: 128KB isn’t enough? In fact, for the sake of expression has been quite extravagant, added a lot of unimportant details. A: Your music, for example, should be at least 1MB in mp3, the lowest bit rate I can press. B: How did you do it? One piece of background music can’t be over 1KB. A: So how much video memory did you use to achieve full-screen scrolling? B: It only has 2KB of video memory. You can’t fit more than that. A:…

1. We have no intuitive understanding of “data volume”

Unless you’re an expert, it’s impossible for the average person to estimate how big or how small they are.

The average person has no concept of “data volume”. How much data is there in an 800 word essay? It is about 1.6KB in GBK encoding and 2.4KB in UTF-8 encoding.

If you write only one word, 1 ~3 bytes should be enough. But write only 1 word word document, 10956 bytes. Due to disk formatting requirements, an additional 1332 bytes will be used.I wrote one word. I didn’t do anything, did I

Common products and popular technologies in reality are actually closely related to the background of The Times.

When you hold a 15-inch notebook is too small, the family in the early 1990s, but the whole family around 14 to 18 inch spherical TV to watch. If I took a sip of Sprite to an ancient man, it would markedly kill him. He would have to take a little water pressure.

When the material base becomes very rich, there will inevitably be “waste”, which will further change the threshold of human perception, and the estimation of measurement becomes disorganized.

2, FC(red and white machine) graphics technology era

Since early memory chips (ROMs) were very expensive and the technology for large disks was not mature, simply increasing the total capacity of a game, regardless of the hardware computing power, was difficult. So it’s natural to use data structures that are contemporary.

Take FC for example, its resolution is 256×240. The resolution isn’t that bad, but it only has 2KB of video memory, and it also has full-screen scrolling effects. So from the beginning of FC design, the hardware provided a way to make full use of video memory – using tiles.

For each scene, use a number of tiles, and the scene can be assembled with a limited number of tiles. This “two level” representation can greatly save storage. 3. Audio capacity and code capacity

Modern music formats often directly save the waveform of the sound track, which has high fidelity and strong versatility, but it obviously takes up more space. The capacity of a piece of music is calculated in kilobytes and megabytes.

The key to audio solutions in the eight-bit chip era is a dedicated chip, such as Ricoh 2A03 for FC:The audio chip can produce synthetic sound effects, which can be configured to a certain extent, but very limited. Listening to the music of FC games, you can feel that the commonly used timbre is almost the same. I think the most powerful part of this audio chip is that it can play several tracks at the same time (but not the kind of chord “at the same time”), “Contra”, “Shaloman Snake”, “Ninja Gaiden” palace music, mainly by the alternate coordination of multiple tracks to achieve.

It is enough to record the timbre, frequency and pitch of each note, and the audio chip will recognize it naturally. To arrange the notes in time is the “score”, which can be simply understood as “simplified music”. The amount of data required is very limited, and most of the game’s music is played on a loop, so the amount of data is extremely small.

The code is similar

In the FC era, there was no “engine layer”, or rather the “hardware layer”. Nintendo’s consoles were designed for gaming, with basic features such as tiles, color palettes, music, and sound effects taken into account in advance, saving a lot of underlying code.

Programmers pore over documents and think about problems within hardware frameworks, such as how to display images, how to scroll the screen, and so on. But also very familiar with hardware and assembly, do not waste code space. One way or another, the code can be very small.

In general, 128 kilobytes of video games, common 30 years ago, are now considered black tech. Drastic changes in technology bring about nonlinear changes in technical indicators, leaving our memory and intuition completely outdated.

This article authorized reprinted self-knowledge on pipi close www.zhihu.com/question/50…