Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#1 ynm   Members   -  Reputation: 172

Like
1Likes
Like

Posted 14 February 2013 - 02:40 AM

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



Sponsor:

#2 Flimflam   Members   -  Reputation: 657

Like
6Likes
Like

Posted 14 February 2013 - 02:53 AM

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. 


Edited by Flimflam, 14 February 2013 - 02:53 AM.


#3 Olof Hedman   Crossbones+   -  Reputation: 2907

Like
4Likes
Like

Posted 14 February 2013 - 03:01 AM

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


Edited by Olof Hedman, 14 February 2013 - 03:06 AM.


#4 Milcho   Crossbones+   -  Reputation: 1177

Like
0Likes
Like

Posted 14 February 2013 - 03:06 AM

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...)



#5 MrDaaark   Members   -  Reputation: 3555

Like
1Likes
Like

Posted 14 February 2013 - 03:09 AM

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. :-)

Edited by Daaark, 14 February 2013 - 03:12 AM.


#6 Olof Hedman   Crossbones+   -  Reputation: 2907

Like
1Likes
Like

Posted 14 February 2013 - 03:10 AM

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.


Edited by Olof Hedman, 14 February 2013 - 03:10 AM.


#7 Milcho   Crossbones+   -  Reputation: 1177

Like
0Likes
Like

Posted 14 February 2013 - 03:57 AM

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)


Edited by Milcho, 14 February 2013 - 04:07 AM.


#8 Olof Hedman   Crossbones+   -  Reputation: 2907

Like
2Likes
Like

Posted 14 February 2013 - 04:07 AM

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...


Edited by Olof Hedman, 14 February 2013 - 04:11 AM.


#9 Buster2000   Members   -  Reputation: 1715

Like
0Likes
Like

Posted 14 February 2013 - 04:07 AM

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.



#10 Milcho   Crossbones+   -  Reputation: 1177

Like
0Likes
Like

Posted 14 February 2013 - 04:25 AM

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). 


Edited by Milcho, 14 February 2013 - 04:28 AM.


#11 Olof Hedman   Crossbones+   -  Reputation: 2907

Like
0Likes
Like

Posted 14 February 2013 - 05:03 AM

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.

 

Its about getting as much fun as possible into the available space. Same as with an old console (or a new one...)

Yes, my point was that these techniques could not be done on old hardware, meaning it's possible to make even more "compact" (as in resources/size-ratio and functionality/size-ratio) programs today.

You could fit 64 of those 4k demos into a NES cartridge.

 

I'm personally totally blown away by what these guys do with 4096 bytes... when you start thinking about how little code this really is, it's pretty amazing to see a 5 min flyby in a fully textured and lighted 3d environment, including nice music! smile.png

 

4096 bytes is the size of one (1!) 32x32 sprite in rgba color.


Edited by Olof Hedman, 14 February 2013 - 05:08 AM.


#12 PurpleAmethyst   Members   -  Reputation: 324

Like
5Likes
Like

Posted 14 February 2013 - 05:40 AM

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



Programming attitudes like this makes me cringe.

I've seen horrid things happen when people take a casual attitude towards using memory and CPU efficiently - It leads to ugly botched code. I could name games but I'd probably get a legal letter.

#13 frob   Moderators   -  Reputation: 22242

Like
0Likes
Like

Posted 14 February 2013 - 05:58 AM

It isn't just a matter of specific games.

Instead it strikes at a core issue of Computer Science.

The Size/Space/Speed tradeoff is a fundamental issue that will always be with us.

Most major games do an incredible amount of work. Decisions are often made during development to trade off one resource for another. They can implement dynamically reloading assets at a cost of a few nanoseconds per frame, but with the benefit of shortening development by 3 months. They can implement and use scripting languages that add a few nanoseconds per frame, but also dramatically improve the gameplay and reduce the development cycle by months. They can implement more complex AI behavior, networked game logic, and other transformative technology in exchange for a tiny bit of CPU usage per frame.

They can choose to use higher quality, larger, more colorful images in exchange for more disk space and loading time. They can choose to use high quality audio rather than midi's extremely tiny beeps and blips, or heavily compressed tin-sounding audio. They can choose to include complex and beautiful particle systems with miniature 3D movies rather than cheesy static images.


Personally I find it is easier to upgrade my hardware every few years. While I don't like the extra cost, I do love the extra quality that can be stuffed into programs for the relatively small cost difference.

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#14 MrDaaark   Members   -  Reputation: 3555

Like
1Likes
Like

Posted 14 February 2013 - 06:03 AM


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

Programming attitudes like this makes me cringe. I've seen horrid things happen when people take a casual attitude towards using memory and CPU efficiently - It leads to ugly botched code. I could name games but I'd probably get a legal letter.


I didn't say anything about memory, processing, or programming style.

When I was first learning to code, I was using QBasic and kept using it well into 2000. So I write all my code and allocate all my resources with a minimalistic attitude, because when I was learning, I had no choice!

But we are talking about file size in this thread. We don't have to worry about using every trick in the book to desperately try and cram anything in. Even mobile games are clocking in at 1gb in some cases.

So use what you need.

#15 PurpleAmethyst   Members   -  Reputation: 324

Like
0Likes
Like

Posted 14 February 2013 - 06:39 AM

I guess I was learning on limited resources too, which probably explains my attitude. I still think wasting space and energy is a bad idea

Even mobile games are clocking in at 1gb in some cases.

 

I doubt a producer, publisher or carrier would tolerate that size of binary - 180MB is pushing it in my experience and usually leads to office arguments.

Mobile dev is exactly the reason I have problems with the "Use everything you can!" attitude.

 



#16 Wilhelm van Huyssteen   Members   -  Reputation: 1002

Like
2Likes
Like

Posted 14 February 2013 - 06:41 AM

Programming attitudes like this makes me cringe.

 

Same here. As a business programmer I see some truly horrible things nowadays. For example. When I was tracking a memory leak/slowdown through a piece of spaghetti mess I found a Boolean array list that always gets added to but never removed from. It wouldn't take long for its size to be in the millions. The only thing is... It wasn't a Boolean arraylist it was a String arraylist where every element was a String that stored either "True" or "False" written out... But hey since we have lots of CPU power who cares if we loop through 12 million Strings comparing them to "True" every time the user clicks a button and since we have lots of ram who cares if the simple inventory management application needs 4 GB of RAM if you want to use it for 30 minutes before the memory leak kills it.

 

And thats just an one example...

 

Some new technologies (Im looking at you Oracle) require state of the art servers to server a couple hundred users. 10 years ago similar solutions existed that could manage more users with much much less resources.



#17 Buster2000   Members   -  Reputation: 1715

Like
0Likes
Like

Posted 14 February 2013 - 06:48 AM

I doubt a producer, publisher or carrier would tolerate that size of binary - 180MB is pushing it in my experience and usually leads to office arguments

 

Baldurs gate is 1.8 GB
Infinity Blade 2 is 1.10

 

 

I think as long as the game is guarenteed to be a big hit then the publisher isn't going to mind the size



#18 MrDaaark   Members   -  Reputation: 3555

Like
1Likes
Like

Posted 14 February 2013 - 07:03 AM

I guess I was learning on limited resources too, which probably explains my attitude. I still think wasting space and energy is a bad idea

Even mobile games are clocking in at 1gb in some cases.

 
I doubt a producer, publisher or carrier would tolerate that size of binary - 180MB is pushing it in my experience and usually leads to office arguments.

Mobile dev is exactly the reason I have problems with the "Use everything you can!" attitude.


I said use what you need, not what you can. There is a world of difference between those statements.

What do you have to doubt? Go take a look around. A gig is a normal, expected size for a lot of the better mobile games I have. The GTA games clock in that big. FF3 is a few hundered megs. Several games, like TDKR are 1.8 gigs. Wild Blood, gameloft's new UDK game is 720m.

Several of these games even offer HUGE downloads of high resolution asset packs if your high end phone or tablet supports it.

Even 3DS carts are 8GB, which is overkill, but there is no reason why they can't come in at 16, or 32 gb soon.

We are over the storage space hump in games.

#19 PurpleAmethyst   Members   -  Reputation: 324

Like
0Likes
Like

Posted 14 February 2013 - 07:13 AM

@Daaark - I was just sharing my experience of things, yours is obviously different. My experience has mostly been at the casual end of the market, so file size may be more of an issue. I can't imagine downloading 1GB OTA, and we were packaging for OTA downloads.



#20 MrDaaark   Members   -  Reputation: 3555

Like
0Likes
Like

Posted 14 February 2013 - 12:18 PM

@Daaark - I was just sharing my experience of things, yours is obviously different. My experience has mostly been at the casual end of the market, so file size may be more of an issue. I can't imagine downloading 1GB OTA, and we were packaging for OTA downloads.

Typically, you'd turn on wifi for that. A lot of apps use a small download for the program itself and have you get the content file later in a big download, urging you to do it with Wifi only. Google Play will now do this automatically. I believe the maximum file size is now 4096 MB. Yes, 4 gigs. I'm sure when San Andreas hits that will be a big 4gb download! smile.png

Maybe things are different where you live, but here, people do all kinds of big downloads OTA. On the bus every night there are always tons of people pulling out tablets and streaming 720p videos. netflix, youtube, video chat, etc...

It's also not hard to get free wifi access here just for buying a 2 dollar cup of coffee.

(This has gone highly off topic!)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS