BOTW: Focus on Mod Programming in Quake III Arena

This week I read “Focus on Mod Programming in Quake III Arena” by Shawn Holmes. I have long loved the computer games of id Software, especially the Doom and Quake franchises. I spent who-knows how many hours playing them online and I made my share of awful maps and mods which the Internet has graciously forgotten.

Reading a book about creating mods for Quake III Arena (Q3A) brought back a lot of fond memories. I never worked on any mod for that particular game, only two maps that I can remember. So I was curious to see what Q3A modding was like as I dove into Holmes’ book. But what happened was unexpected.

Instead of coming away from the book with a serious assessment about its content—it is substantially informative—I ended up in a lengthy internal debate about how these types of books present themselves and what I perceived as potential dangers.

“Yo, Eric, I’m Really Happy For You and I’mma Let You Finish…”

Some of you are not going to care about the rant I’m about to launch into and simply want to hear an answer to, “How is the book?” Ask yourself the following:

  1. Are you comfortable with Visual C++?

  2. Are you familiar with basic concepts of 3D game engines?

  3. Are you able to easily navigate large, unfamiliar code-bases to quickly hone in on specific information?

If you can confidently answer ‘yes’ to all of the above then you should enjoy the book, assuming you want to make a Q3A mod, obviously. Shawn Holmes discusses all of the major aspects about the engine which mod developers either need to know or will be curious to know. Once you’re done reading his text you’ll feel comfortable diving into the entire Q3A source code or the code of source-ports like ioquake3.

So yes, “Focus on Mod Programming in Quake III Arena” is a good book in the sense that it is a thorough and informative treatment of its subject matter. As for its structure….

Taking the Microphone Back

Here is the issue that came to dominate my thinking after finishing the book: is it helpful or harmful to throw would-be game designers into the deep-end of computer programming? Holmes writes in the introduction:

Before you get started programming your own mods you should know that this book is geared toward programmers with a basic understanding of the C programming language. Don’t worry if your C skills are a bit rough around the edges; I’ll be sure to go over some more complicated concepts when the time arises.

This is a massively gross understatement at best. The author claims the target audience should have a “basic understanding of the C programming language” and yet he feels compelled to explain:

  • Operators *= as short-hand.

  • Bit-wise operations and their value as use for controlling flags.

  • Structures.

  • Functions. Here is an example from the book, verbatim:

int add (int a, int b)
    int res;        // a variable to store the result
    res = a + b;    // add a and b and store in res
    return res;     // return the result

Can any of us honestly claim that we expect our target audience to understand ‘basic C’ while at the same time typing out such an example? The frequency of example of code on this level left me feeling disturbed by the time I finished the book. This type of presentation feels—I don’t know the best word—dishonest, I guess.

The book repeats this pattern:

  1. The author describes a fun gameplay idea.

  2. He provides the code for it, deferring the explanation of much of the code until later.

  3. Then he eventually explains those things but by that time the relation between the gameplay and code feel too distant.

‘Dishonest’ is the wrong word. This is irresponsible.

Most people I know who make games or want to make games chose to begin that pursuit via computer programming. They didn’t set out to be programmers; instead programming was the means to an end. Those of us who are programmers have an obligation to guide those eager students as best as possible, and that opinion of mine left me feeling like this book and others like it, e.g. ‘Learn X in Twenty-Four Hours’, are acts of irresponsibility. Should we demand that anyone who wants to make games first become an expert programming? Absolutely not. But should we encourage people to copy-paste code blindly while continually reassuring them that they will ‘get it’ eventually? No.

Don’t mistake this as any type of personal condemnation of Shawn Holmes; I don’t know him personally, but he seems like a fine programmer based simply on his book. I am not criticizing him. I am criticizing the carefree way in which too many of us—myself included—depreciate the value of programming, and even worse, encourage bad programming practices in the name of expediting game design. Computer programming and game design are two unrelated disciplines so large that you can devote an entire lifetime to either one. It just so happens that they intersect to create a popularized entry-way into the game industry.

When I read a book like “Focus on Mod Programming in Quake III Arena” I cannot help but think, as one of the many who crossed through that intersection, that we can do better. But here is the point where, weakly and unfortunately, I must admit that I do not know the best course of action. Reading this book has rekindled my feeling that maybe we ought to invest more time in creating better tools for those creative would-be game designers out there. Maybe someone who wants to modify a weapon in their favorite first-person shooter should never have to see C++ in the first place.

Maybe we start there?

Next Book of the Week

Once again, in spite of everything I said above, Shawn Holmes’ book is an informative tome about Quake III Arena mod-making. It is meant for readers who really understand C++ C, not novices. But if you’re comfortable with the languages then you can get a lot out of the book and I would certainly recommend it to any such person who wants to make mods for one of my favorite PC games of all time.

(Update: 4 March 2014) My summary above incorrectly gives the impression that the engine is in C++. It is actually in C. But the book mixes discussions of C and C++ a lot, particularly in its second chapter. Nonetheless, the Q3A code you will learn about and work with is in the C language.

Next week I am reading “Visualizing Quaternions” by Andrew Hanson. Nowadays you cannot step far in code for 3D engines before meeting these things. So I think it’s a topic certainly worth studying.


Add Your Thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s