My thoughts: - The difference between 8 or 16 bit graphics at 320x200 30 fps and modern hdr 2k at 120 fps is orders of magnitude less data to manage. - Software developers were not abstracted as far away from the hardware as they are today. - Most games ran on DOS which was basically “bare metal” vs windows/multitasking/background processes.. - And you HAD to make efficient use of the compute and ram when dealing wit…
> Most games ran on DOS which was basically “bare metal” Remember how games made you pick your sound card because the OS didn't provide an API for this?
Ask HN: How were video games from the 90s so efficient?
41–50 of 238 posts
Re: Ask HN: How were video games from the 90s so efficient?
#42I love this video: https://youtu.be/ZWQ0591PAxM As part of a Kickerstarter campaign, Morphcat Games made this video explaining how they eked out a really incredible game with only 40 Kb (a lot like Super Mario Bros 2). I definitely recommend checking this out as they go over interesting compression methods and more general thought processes.
Re: Ask HN: How were video games from the 90s so efficient?
#43Re: Ask HN: How were video games from the 90s so efficient?
#44Re: Ask HN: How were video games from the 90s so efficient?
#45Michael Abrash wrote a book or two about it, and a lot of code, and was one of the experts in tweaking performance out of hardware back then.
Re: Ask HN: How were video games from the 90s so efficient?
#46Re: Ask HN: How were video games from the 90s so efficient?
#47Re: Ask HN: How were video games from the 90s so efficient?
#48I recommend watching this: https://youtu.be/izxXGuVL21o Naughty Dog Co-founder Andy Gavin discusses various hacks that were used on the Playstation to get Crash Bandicoot to run smoothly. The fuller version is also worth watching.
Re: Ask HN: How were video games from the 90s so efficient?
#49I recommend watching this: https://youtu.be/izxXGuVL21o Naughty Dog Co-founder Andy Gavin discusses various hacks that were used on the Playstation to get Crash Bandicoot to run smoothly. The fuller version is also worth watching.
This one is my favourite. I would call this kind of programming both art and beauty.
Re: Ask HN: How were video games from the 90s so efficient?
#50The answer is: Everything.
If you are cynical, you could say that all of the resources are just being wasted on bad software that is bloated and coded lazily by less skilled people who only care about money. If you are optimistic, you might point to advancements in both the C++ language that requires more resources as well as improvements to compilers, like ridiculously powerful optimizers, static analysis, and language features, as well as the modularization of the compiler.
I think the truth is basically a bit of both, though probably mostly the latter. Software naturally expanded to require more because the hardware offered more. When computers ran 486s and Pentiums, spending 10x more resources on compile times was probably not a popular proposition. But computers becoming faster made compilers faster, too, so compilers could make more use of those resources. At the same time, they could clean up their codebases to remove hacks that reduce memory or CPU utilization at the cost of making code difficult to read, debug, understand, and modularize code to allow for compilers that are easier to expand, can provide language servers, support multiple language frontends, and support compiling to multiple architectures transparently.
What does this have to do with games? Well, a DOS game would more or less write directly to VGA registers and memory, but doing so is a sort-of fraught-with-peril situation. It’s hard to get 100% right, and it exposes applications to hardware implementation details. Plenty of games behaved strangely on some VGA cards or soundblaster clones, for example. Using an abstraction layer like DirectX can be a dramatic improvement as it can provide a higher level interface that shields the application from having to worry about hardware details, and the interface can do its best to try to prevent misuse, and drivers for it can be tested with extensive test suites. If a VGA card behaves differently from what a game expects and it doesn’t work, you’re SOL unless the game is updated. If a Direct3D game doesn’t work properly, even if it is ultimately due to a hardware quirk, it can usually be fixed in software because of the abstraction.
SFML is even further up. It is a library that abstracts the abstractions that abstract the hardware, to allow your application to run across more platforms. There could be three or four layers of abstraction to bare metal. They all do important things, so we want them. But they also introduce places where efficiency suffers in order to make a more uniform interface. Also, a modern app running on a modern OS incurs costs from other similar improvements: language runtimes, OS security improvements, etc. sometimes offer improvements that come at non zero CPU and memory costs that we were willing to eat because computers improving was more than offsetting it.
Programmers today have different skills and programs today have different challenges. It’s only natural that the kinds of things that made Sim City 2000 run well are not being applied to make modern games on modern computers.