Why old games are so compact? (NES, SNES..)

Started by
21 comments, last by Khatharr 11 years, 2 months ago

Hi,

I wonder why good old games like Chrono Trigger, Final Fantasy,.. with good graphics, sound, long storyline but just are a few MB? While modern simple flash game can easily reach tens of MB? Could anyone explain for me?

Thanks

Advertisement

They were compact because they had to be (space on those cartridges was very limiting), and because the method of storing/creating the information was different. Since size and power today is not a big issue anymore, we can get away with cutting a lot of corners, and using much higher quality assets. Sounds are stored as full waveforms, Graphics are large, etc. Back on older consoles, music was somewhat similar in nature to the old MIDI format we have on PCs, and graphics were very optimized tiles that tended to compress well, rather than large images rendered onto the screen whole.

The resolution of those old games, and the color depth, is much lower, that cuts down a lot. a 64x64 sprite (common flash size) is 64 times larger then an 8x8 sprite (common nes size)

If you look at a NES sprite, you will notice it can only have at max 3 colors. So it only needs 2 bits per pixels (instead of 8-32 bits for a flash game, so now the flash sprite example is 1000x larger!)

Also, since the NES is an 8 bit machine, every instruction is only 8 bits long, instead of at least 32 bits on a i386+, so code is much more compact.

And the third thing, most of the "heavy lifting", like graphics and sound, was controlled by hardware, offloading the CPU minimizing code need even more.

Well, I guess thats true still, but the hardware was much less complex, so you didn't need big drivers, you basically controlled it directly by writing control words at special memory adresses

I think the question that ynm was asking is probably "how where they so compact?" (or I'm just misinterpreting intention)

The answer is a lot of optimization - for example the original mario bros. levels could only scroll forward due to how the level was stored, which was done as an optimization to the loading method and due to memory constraints (that's my understanding anyway).

To be fair, there's quite a bit of optimization going on in modern games too, but now the main bottleneck has become CPU and GPU speeds, and not memory, so I think modern games tend to focus more on optimizing speed than size.

Still, there was a time of games, like the Aladdin game, that games still had to fit on about 1.44Mb or so, which I admit was nice, as opposed to using multiple CDs, or now multiple DVDs even (and maybe multiple BlueRay's in the future...)

Content is made to suit the hardware that it runs on.

We all have 32 bit graphic cards these days with 32 bit frame buffers. So the best format to store graphic data in is usually images with 32 bits per pixel. This creates a nice 1:1 mapping. Even if not using the alpha channel, it's better to waste some memory instead of using 24 bits per pixel for better memory alignment.

Back in the day, memory was expensive and processors were super slow. Those old machines had much less bit depth in their frame buffers, and the sprites were small 8x8 or 16x16 images with 8 bits per pixel or less on the NES.

1 8 bpp pixel = 1 byte
1 32 bpp pixel = 4 bytes

Sound was done differently. It usually wasn't recorded directly, and was stored as instructions for a chip to follow. MIDI files were very compact, and people used to say you could store ~48 hours of it on a 1.44mb floppy disc! The quality of the midi playback was entirely up to the quality of the MIDI synthesizing hardware. All the sounds were already on the hardware. A midi type file simple wrote down which voices/instruments to play, at what pitch, for how long.

We do sound in CD quality now (16 bits @ 44KHZ Stereo). That's 16 bits of data, 44,000 times a second! What a 1X CD drive used to stream at. (which is 150kb.. you'd get ~10 seconds on that floppy, instead of 48 hours!) Some people also go above that and do 96khz or more.

As for text, as in your long storyline example. That was usually simple ASCII text, which was 8 bits/1 byte per character. It was good for it's day, but it is limited to 256 unique glyphs because of that. We often use different sets of wide characters now, which could be 16 or 32 bits.

Cartridges were very expensive, and only available in a few select sizes.

Nowadays, space is cheap, and the machines don't have as many restrictions. So use as much space as you need. :-)

I think the question that ynm was asking is probably "how where they so compact?" (or I'm just misinterpreting intention)
The answer is a lot of optimization -

Well, take any NES game, update graphics and sound resources to modern standards, and change nothing else, and the game is suddenly at least 256 times larger.

That pretty much hits the spot on a flash game in size.

Resources is without question the number one space hog in any game.

Code is always relatively compact.

Well, take any NES game, update graphics and sound resources to modern standards, and change nothing else, and the game is suddenly at least 256 times larger.

True, updating graphics/sound resources would significantly increase size, no dispute.

Edit: Actually a more interesting question is: if you take a modern 2d platofmer and significantly shrink or even remove the graphics/sounds, would it be small enough to be run on older game platforms? (I don't have the answer to that)(and to be fair, graphics size reduction is still a form of optimization :) )

I was reading this article a while back on making McKids: http://games.greggman.com/game/programming_m_c__kids/ since I was starting a 2d platformer. There's still a large number of code optimizations that made these platformers possible back in the day; optimizations which most modern games don't have to worry about (though admittedly not all are size optimizations)

Fun fact: if you wanted, you could make even more compact games on a modern computer using procedural generation to cut down on resources. (way too heavy and ram consuming for old consoles)

If one want to see what you can do with limited executable size on a modern computer, I suggest googling for "4k demo", and prepare to be amazed smile.png

(thats 4096 bytes, including all code and resources)

Those guys even compress/generate their code...

Not just the file sizes are different but the file types or even lack of them. When doing a game nowadays you don't think twice about using a PNG or a Jpeg. When doing J2ME games a few years ago we used to use custom image formats that didn't have any header, checksum or palette information then in the game just assume that what we were reading in was correct. Tricks like clever palette swapping was used too to make a single sprite seem like it had dozens of variations. Also image files were munged together into single files to aid compression ( I don't mean as a spritesheet, I mean that the data was stripped out of PNGs and just dumped into a single binary file).

Also when doing ports of some of the Sonic games I had access to the origional genesis 68000 code and a lot of data was hard coded inline into the asm code rather than in external files.

Fun fact: if you wanted, you could make even more compact games on a modern computer using procedural generation to cut down on resources. (way too heavy and ram consuming for old consoles)

If one want to see what you can do with limited executable size on a modern computer, I suggest googling for "4k demo", and prepare to be amazed smile.png

(thats 4096 bytes, including all code and resources)

Those guys even compress/generate their code...

The 4k demo guys' main compression was in size. I'm not sure if that's what you were implying - but the 4k demo is very cpu heavy and would not run on any older consoles - I had trouble running one of those demos a few years back. There's always some sort of minimum tradeoff with any sort of optimization.

Though there is Elite - the video game "which was originally planned to contain a total of 248 (approximately 282 trillion) galaxies with 256 solar systems each. The publisher, however, was afraid that such a gigantic universe would cause disbelief in players, and eight of these galaxies were chosen for the final version".

Pretty impressive for a 1984 game..

Edit: For its sort of modern successor (at least based on large universe), there's Infinity: The Quest for Earth, which is also planned to have a fully procedurally generated, actual-sized galaxy (where you can fly down to planet level).

This topic is closed to new replies.

Advertisement