Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Patrol1985

The programming language used for the Doom engine

Recommended Posts

According to Wikipedia, the Doom engine has been written in C. I have no idea about programming, but from what I've read C++ is usually the standard for writing gaming software.

Therefore I'd like to ask those who know the subject - why did id Software use C instead of C++?

Share this post


Link to post

20 years ago, C++ was not nearly as entrenched as it is now. The language did not receive an official formalized standard until 1998. The Watcom compiler id used did not support C++ until 1993, probably somewhere in the middle of the engine's development.

EDIT: Since the Doom engine was originally developed on NeXT workstations, Objective-C would probably have been the most likely alternative to plain C.

Share this post


Link to post

I see, thank you. What does it mean exactly that there was no standard? The language was bugged or incomplete?

Share this post


Link to post

^ Yep it was incomplete. I might be wrong but as far as i remember was C++ in development since the mid 80's and the completed version was released 1998.

Share this post


Link to post

In 1993, C was already a mature, stable language with nearly 20 years of use and evolution behind it, and a proven cross-platform portability record.

In comparison, C++ was a fledgling language with every compiler for every platform having its own quirks, and was pretty much unportable and unoptimized (and TBQH, it mostly still is...). Uncharted territory, in other words. Not what you'd like to base your next up-and-coming hit product on.

Interestingly, even id's basing the bulk of Doom on C rather than Assembly language was seen as a risky move, performance-wise, but the portability gains more than paid off in the long run (source ports....).

The use of Obective-C was another interesting point. AFAIK some tools still survive written in the language (including IDBSP, the node builder), and some elements in the design of certain of Doom's modules suggest a heavily object-oriented approach, which might mean that some parts were backported or at least heavily influenced by Objective-C, at some point.

Share this post


Link to post

Yeah, I checked wikipedia and saw that it originally appeared in 1983. That's why I was puzzled about id using C. I thought that "appeared" equaled "was complete".

Share this post


Link to post
tourniquet said:

^ Yep it was incomplete. I might be wrong but as far as i remember was C++ in development since the mid 80's and the completed version was released 1998.

It's more that the compilers were incomplete or inefficient, not the language. C++ has higher-level constructs than C does and they usually mean a hit to CPU power. Nowadays we have faster CPUs and efficient C++ compilers, but Carmack didn't start writing his engines in C++ until he wrote Doom 3.

Patrol1985 said:

Yeah, I checked wikipedia and saw that it originally appeared in 1983. That's why I was puzzled about id using C. I thought that "appeared" equaled "was complete".

C++ the language has been around for a long time, but it has developed "organically" (evolved from a simpler version of the language) over time. It's also a very complicated language and it has taken a long time for the compilers to become mature and efficient.

Share this post


Link to post

Thanks Fraggle! Btw. did you receive my response to your email regarding Choco Hexen bugs? I'm not sure I sent it correctly.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×