AFAIK, Quake was originally developed on NeXT boxes and ported to PC later. The level editor was a native app using the NeXTSTEP APIs which Apple renamed Cocoa:
https://quakewiki.org/wiki/QuakeEd
So, it's a fun kind of homecoming that it now runs on the wrist-sized NeXT box.
The original NeXT computer: 25MHz Motorola 68030 plus copro, 8MB RAM, 256MB storage, 300W power usage, $15k in 2021 dollars, weighed a lot
The Apple Watch Series 7: 1800MHz t8301 CPU (but scales up and down), 1GB RAM, 32GB storage, 50-100 mW (I think?), $399, weighs 35g or so
What a difference 33 years makes!
...not very relevant for DOOM of course, because that's just plain C for the most part, but interesting little tidbit nonetheless.
Objective-C driver kit no longer exists, its C++ replacement is on its way out, being replaced by a userspace version.
The watch uses watchOS UI KIT, is isn't either UI Kit nor Cocoa, so three generations apart from NeXTSTEP UI framework, which is anyway being replaced by SwiftUI.
watchOS uses a customized version of bitcode as deployment format, which is now being transitioned to actual native code in upcoming versions.
Related to Doom, watchOS doesn't do OpenGL, or NIB files from Project Builder.
So almost nothing like NeXTSTEP.
https://cs.gmu.edu/~sean/stuff/java-objc.html
https://en.m.wikipedia.org/wiki/Distributed_Objects_Everywhe...
But most importantly, ID software released the original source code for it quite early. Not that many game development companies do that. I would've loved to see more Blood ports, but I don't think the source was ever released? So I believe the existing ports were reverse engineered. Duke Nukem 3D source was only released in 2003 it looks like.
The quality of the source code of Quake 2 is quite high. Doom is.. a bit messy but OK. There are already abstractions that make porting easier. I'm guessing Quake (haven't looked at the source yet) is somewhere in between. That helps too.
Also, wasn't there an official Blood port by Nightdive Studios?
edit: just looked it out, it seems this has been address. I'm linking the videos because they're entertaining :D
vid on the original: https://www.youtube.com/watch?v=EkG29e-nE-A
and the patched version: https://www.youtube.com/watch?v=oFUPNlfWiYg
That said, it had some things Doom fans dreamt of, like an interactive level editor that was built into the game engine.
I remember playing QuakeWorld when it came out, on Linux, over a dial up modem. You had ping times of 200-300ms and it was playable. You have to remember at the time Doom and other games were LAN-only. John Carmack used to keep a .plan file with some really cool details behind Quake/QuakeWorld development. Check out Aug 02, 1996 for some detail behind the netcode[1]. You can read the future of gaming being invented right there.
[1] https://github.com/ESWAT/john-carmack-plan-archive/blob/mast...
Games prior to Quake were bound to specific O/Ss and/or hardware components.
DOOM was still bound to DOS AFAIK, so it's not portable without significant changes.
Older games are even worse - not only they were bound to DOS, but also to the display adapters of the time (CGA/EGA), which required some sort of emulation (or translation, depending on the approach) in order to be ported.
Games based on the Build engine (written by Ken Silverman), like Duke Nukem 3D and Blood are... simply written in very poor form. Carmack is a tidy programmer, Silverman isn't. Quoting Fabien Sanglard:
> Looking at the innumerable ports that spawned Doom/Quake, I was always puzzled to see so few ports of Duke Nukem 3D. The same question arose when the engine was ported to OpenGL only when Ken Silverman decided to do it himself.
The answer is in his analysis: https://fabiensanglard.net/duke3d/code_legacy.php.
DOOM was always extremely portable, the DOS and PC specific parts are well separated from the other code (DOOM was actually developed on NeXT machines, so separating the platform specific parts probably came naturally).
If you look at the ancestry of SDL2-Doom, for example, there are three ancestors:
- doomgeneric, which seems not simple (https://github.com/maximevince/fbDOOM/compare/master...ozkl:...)
- the above is based on fbDOOM, which is quite simple (https://github.com/maximevince/fbDOOM)
- the above is based on insane-adding-machines/DOOM, which is also not simple (https://github.com/id-Software/DOOM/compare/master...insane-...)
The SDL port itself (https://github.com/AlexOberhofer/sdl2-doom) is definitely not simple.
Porting something that it's not based on a multiplatform library (which is commonly SDL for old game ports) is not an easy task in general.
The SDL2 audio and video libraries are just shims against 9front drawing/audio functions, and often they just work.
Some concepts are inherent to the hardware and the O/S.
Hardware example: EGA (not the case of doom, but of other, slightly older games) uses bitplanes, it's not just an array of byes; audio cards used specific drivers.
O/S: timers may need to be emulated, as the game may not have a straightforward game loop; due to this, even exiting cleanly may not be trivial to implement.
John Carmack is awesome. However, to take the next step after Doom, he brought Michael Abrash on board.
Doom was literally developed on NeXT computers (the precursors to modern Macs, ironic considering Doom was single-handhedly responsible for turning the public perception of PCs from boring office machines to cool gaming systems):
https://en.wikipedia.org/wiki/Development_of_Doom#Programmin...
This is also from an era where there wasn't that much abstraction and "software rendering" was the norm so the implementations tended to be much more straightforward, this makes it so that worst case scenario, you just write to whatever the equivalent of a framebuffer is in the target implementation.
There's like 10 glue functions you have to write to do things like initialize your platform, get input, begin the sound loop, call the main loop, and then something to switch buffers to the display. It takes a quite short amount of time to do. Id provides a set of null functions that you can use as a starting place and incrementally add in video support, input, sound, etc. They made it super easy to port.
I've been fiddling off and on making a tiny CM-2 computer model with all the blinking lights on the front panels. Inside it's an rpi zero 2, and I'm using some 1.5", 128x128 SPI RGB OLED displays instead of trying to make itty-bitty LED arrays. Long story short I decided I should be able to run quake and quake2 on the thing. It only took two days to put in enough code to have them running.