I read somewhere the Source Code was considered “perfect”. Not a programmer but can someone also enlightened what it meant by that?
I read somewhere the Source Code was considered “perfect”. Not a programmer but can someone also enlightened what it meant by that?
Comments
The source code isn’t that good or special. It’s ported a lot because:
DOOM was first made in an era where computers were not very powerful at all, so it was very important for system requirements to be as light as possible. It had to be very light on hardware, it’s the only way it could exist at all.
Nowadays computers, even ones used for trivial purposes, may be a lot more powerful than they actually need to be. Leaving, say, a calculator, with plenty of computing power to run DOOM.
It’s just sort of a meme, now. An exercise in silliness and technical ability. “I ported DOOM to my Smart Fridge!”
Doom doesn’t demand that much on the CPU. The target computer when it was released was somewhere between 33 and 66 MHz and maybe 4 megabytes of RAM. In modern times, anything with a processor is probably within the capabilities there.
That plus Doom was just an iconic game, basically defining the standard of what a first person shooter game should be. Other games would be made with Doom as their engine, for example.
The source code I’m less familiar with, but the main developer was considered one of the most skilled programmers of their time. The game was already ported to several systems besides the original DOS, and the Linux version whose source was originally published by the developer. Updating it for other platforms would be fairly easy.
So if you want to port a well known game to run on some weird piece of hardware that has a screen and buttons, Doom is at least more visually impressive than writing a Tetris game or something “simple”.
It has a bunch of advantages:
* It is in C – there’s a C compiler for virtually every processor
* It is sufficiently old that it was written for processors with limited processing power (compared to modern stuff)
* It was written for computers without dedicated floating point or graphics co-processors (modern computers have separate processors for ‘general stuff’, ‘floating point math’, and ‘highly parallel math for graphics’ – old ones didn’t and the weird systems people are porting to probably don’t either
* It is iconic and especially so now – it was groundbreaking in what it did, the code is really clever and well written (though not without errors) – it means it runs well on limited machines but can do cool things
* It is pretty self-contained – it doesn’t depend on many external things, which makes porting much easier, as you are really only porting Doom rather than an entire ecosystem – most modern games are made up of lots of pieces of software
The original Doom was released Open Source. This means that every single line of code of how the game is made was released, free of charge. You can go look at right now pretty easily. This means we have a deep understanding of how the game function.
It was also coded in the C programming languages, one of the most wildly supported languages in existence. As such it is very easy for developers to find software to make it run on anything, or to design there own from example.
So we have a free, widely available game with accessible and easily understood code. Then on top of it, make it one of the most popular games ever made and you have a recipe for people to want to play around with it. It starts with people porting it in same ways, to newer computers and older ones to keep it playable. People experiment with porting it to game consoles, still not a step that far. But we have so many different screens, and developers sometimes get bored and want to have some fun.
Eventually you get to today and it being ported to pregnancy tests and ecoli.
It was elegant in its simplicity and required minimal resources to run.
Here is a looooong interview with John Carmack where they get into the details about how he had work within the limits of the technologies of the day.
I wasn’t there for the origins of the meme, but I know a lot of it has to do with how Doom was THE game to play back in the day and was ported to everything of “reasonable standards” (all different personal computers and home consoles), and then there’s the demo scene where people who want to see what kind of outlandish things they can make computer technology do (make early 80s computers run 3D graphics, compress Morbius to GBA video, put snake in a QR code, etc.), and one thing that gets a laugh and admiration is “I made a videogame run on computer hardware that was never meant to run videogames” (such as Skyrim on a smart fridge). The combination of Doom being a very popular game and a highly optimized (and more importantly, compact) DOS game for “a computer that is less powerful than disposable computers of today” (think the whole “we went to the moon with computers less powerful than your cell phone” thing) made it the perfect game to say “I bet I could make Doom run on it.”
Here’s a shortened version of an article I wrote about this:
Doom was the first mainstream First Person Shooter. Wolfenstein 3D game before it, and a few other obscure ones. But Doom was the game that made it mainstream. It was crazy popular at the time it came out.
John Carmack pushed to release the code to Doom when it was still pretty relevant, and open source wasn’t that common yet.
The code was also pretty interesting at the time, as the tech was state of the art.
All that, plus a bunch of nostalgia.
Doom is highly portable because it is open source and is written in C (a highly universal language). However the most import aspect others haven’t touched on: all you need to run it is a CPU and RAM and these hardware requirements are found in pretty much all devices.
Back when it was new we learned networking on scrounged ARCNet to do 4-way multiplayer, took forever to get network, mouse and sound drivers loaded in under 640K in DOS, followed immediately by an all night fragathon. 18 years after release this comic came out: https://www.smbc-comics.com/comic/2011-02-17
I was hoping to see a port of doom in the comments
Definitely not “perfect”. It has the wrong digit in the 7th or 8th decimal place for pi.
Doom was written during a time when there were no game engines or DirectX or GPUs.
It’s not so early that it’s written in x86 assembly language like Prince of Persia was, but at the same time it’s not so modern that it has OS specific dependencies like a Windows game would (because DOS didn’t have any of that, each game had to do it from scratch).
So if you can compile it for any given modern CPU it will run, given a few tweaks to the code for things like display hardware other than VGA/XGA/etc…..
so, for a really long time, new computers would come out every year and they were faster and faster each time.
and regular people didn’t easily understand how powerful a given PC was. “why buy new? isn’t the last one good enough?”
so the PC guys started using games as a “Benchmark”, to show how fast a computer was
in the beginning, a popular benchmark game was running Doom, then seeing how many frames you could run it at.
eventually this became obsolete as a power benchmark, but it had been used for so many years that people started using it as a meme benchmark for computing power on unusual electronics, like refrigerators and pregnancy tests.
TL;DR, programers are willing to spend months doing inane projects for the thrill of hearing others say “how the heck did you do that”
A programmer needs to connect the software with the hardware so that it is able to be ran.
The code itself is self-contained and in a language (C) that basically anything with a processor can run one way or another.
The only exception is usually visuals, I.e sending images to a screen, which sometimes needs extra code to convert it.
And that is how you get Doom on a pregnancy test
Doom is the smallest, coolest piece of software that can run almost anywhere so that’s what people do.
DOOM is a lot older than even “classic” PC games are. It’s initial release was a DOS program, not even windows 3.1 but DOS!
That means that it doesn’t use hardly any dependencies. Most games, even ones slightly more modern than doom, use parts of the operating system to help with common tasks, like displaying things on the screen. But Doom is basically entirely self contained.
Doom was also a game by a well known game studio (ID software) back in the day. They had already done several Commander Keen games, and Wolfenstein 3d by the time they got to the first Doom game. This means that the studio had a decent amount of power when negotiating with it’s publisher (I THINK activation) and as a result there’s very clear ownership of the source code.
That is one of the major things that allowed ID software to open source the source code in 1999. It also helped a lot that the doom engine was not really reused when ID made the Quake engine. The jump to true 3d graphics made doom somewhat irrelevant.
Speaking of true 3d, in doom everything is a sprite not a polygon. So not only did it not need a 3d accelerator (GPU) it couldn’t even use one at all. Doom is basically a 2d game, so the overall system requirements are really small.
ID’s next title, Quake (excluding Doom2), also didn’t require 3d acceleration, but it did use polygons, drastically changing the requirements level.
All that, plus DOOM is/was super popular. It’s just kind of a perfect storm of several factors that all combine to make doom appealing as a tech demo to run on oddball hardware.
For a short while, Mario 64 was being ported to a lot of things(sort of in the same way as Doom is). I don’t think Nintendo was very happy about it.
Because the game was so well optimized it ran on anything. It was also considered the first FPS game and the people who grew up with it mostly ended up being very tech savvy people. It was a cool game and had an online copy and online patches and mods. That was new at the time.
Probably because it was ported to a lot of different systems officially back then. Fans just kept it going
To add onto what other people have said, as a person with a lot of knowledge on the game, Romeros ray tracing technique for simulating ‘3D’ graphics allowed for a game that had the feel of a 3D game without the plethora of extra coding needed for actual polygons. Combine this with having verticality as well as much better level designs and fun gameplay without needing much extra processing power made this game a more appealing choice for porting as opposed to a game like wolfenstein 3D
The Thought Emporium is working on a project where he’s growing neurons that can play Doom by interfacing with a tiny electrical chip that can send and receive signals to and from the neuron clusters which are grown directly on the chip.
This dude is probably the closest equivalent to a mad scientist that we have IRL. Do yourself a favor and check out his channel
Edit: I think he’s here on Reddit? Paging u/thethoughtemporium – feel free to elaborate on or correct my summary of your project