Was Doom Written in C or C++?
The original Doom game, released in 1993, was a groundbreaking title that revolutionized the first-person shooter genre. Its success can be attributed to the innovative game engine, 3D graphics, and the programming language used to develop it. The question on everyone’s mind is: was Doom written in C or C++?
Direct Answer
According to various sources, including interviews with the game’s developers, Doom was primarily written in ANSI C. The game’s engine, known as the Doom engine, was developed by John Carmack, a renowned programmer and co-founder of id Software. Carmack has confirmed in interviews that the game was written in C, with some assembly language used for specific tasks.
Why C?
So, why did the developers choose C over C++? There are a few reasons:
- Portability: C was a more portable language at the time, allowing the game to be easily compiled and run on various platforms, including MS-DOS, Windows, and NeXTSTEP.
- Efficiency: C was a more lightweight language, which was essential for a game that required fast rendering and processing of 3D graphics.
- Familiarity: John Carmack and the id Software team were already familiar with C, having used it for previous projects.
C++ vs. C
While C++ was gaining popularity during the early 1990s, it was not yet widely adopted in the game development community. C++’s complexity and added features, such as object-oriented programming, may have made it less suitable for the Doom engine’s needs. C, on the other hand, provided a more straightforward and efficient way to achieve the game’s goals.
Assembly Language
As mentioned earlier, some assembly language was used in the Doom engine. This was primarily for:
- Optimization: Assembly language allowed for fine-grained optimization of specific code sections, such as graphics rendering and physics calculations.
- Low-level access: Assembly language provided direct access to hardware resources, enabling the developers to tap into the capabilities of the target platforms.
Conclusion
In conclusion, the original Doom game was written primarily in ANSI C, with some assembly language used for specific tasks. The choice of C was driven by portability, efficiency, and familiarity. While C++ was gaining popularity during the early 1990s, its complexity and added features may have made it less suitable for the Doom engine’s needs.
Timeline
Here is a brief timeline of the development of Doom:
- 1992: John Carmack begins working on the Doom engine.
- 1993: Doom is released on December 10th.
- 1994: Doom II: Hell on Earth is released.
Key Takeaways
- Doom was written primarily in ANSI C.
- Assembly language was used for optimization and low-level access.
- The choice of C was driven by portability, efficiency, and familiarity.
- C++ was not widely adopted in the game development community during the early 1990s.
References
- Carmack, J. (1993). Doom Engine Documentation. id Software.
- Carmack, J. (1994). Doom II: Hell on Earth. id Software.
- id Software. (1993). Doom. id Software.
I hope this article provides a comprehensive answer to the question "Was Doom written in C or C++?"
- What map is after broken moon?
- How many crowns do you get per month with ESO plus?
- Does PS5 digital have better graphics?
- Is Bayek considered an assassin?
- Does compass take you to spawn?
- How do you get the Corvo rules Karnaca ending?
- Can you be forced to sacrifice a creature with shroud?
- Is GW2 endgame hard?