October 8, 2021

The Tools of Level Design

If you had asked me about Quake a few years ago, I would've made a weird farting sound with my mouth.

—Robert Yang, Quake Renaissance: how to start playing original Quake today

This first sentence from Robert Yang’s final article on The Quake Renaissance resonated with me. Only unlike the author, I didn’t know anything about what had been going on in the Quake modding world since I last played the game in the late 1990s–and while I enjoyed it multiplayer, I had always wrinkled my nose at its palette of muted browns and greens.

Reading Yang’s short history of 25 years of Quake modding was inspiring, though, and its high praise for TrenchBroom, a newer open-source level editor renowned for its ease of use, piqued my interest.

Well, that’s a bit inaccurate: my interest had actually been piqued several months ago.

Blender: powerful but terrifying

Early in 2021, I had teamed up with my friend Erik to create my first simple 3-D game, Cat in the Coop, through which I’d learned the basics of Blender, using it to make a terrible animation of a cat undulating, as well as taking the Smithsonian’s 3D model of the Carnegie Mansion and turning it into a level that the player could walk through. But Blender had quite a learning curve–which makes sense, given that it’s used to do everything from 3-D character rigging to amazing visual effects, animated feature-length films, and other extremely complex things I don’t understand.

Still, it took me a lot of time just to add colliders to the level, ensuring that players couldn’t fall through the floor or walk through walls. I couldn’t imagine how much work it would take to make a level in Blender from scratch.

An extremely complex-looking graphical user interface.
The Cat in the Coop level loaded into Blender. The lines in orange are wall colliders.

This was when I first heard about how much easier it was to use level editors for Quake: that some folks were actually using such editors to create levels for their non-Quake games via third-party import tools.

By that time, though, I’d just finished Cat in the Coop, so I added “learn how to use a Quake level editor” to my bucket list.

Great tools need great teachers

So a few weeks ago, when I read Robert Yang’s article and its mention of TrenchBroom, I decided to follow one of its links: a ten-minute “TrenchBroom 2 Quickstart” video by a community member named dumptruck_ds. I watched it while on my stationary exercise bike, just to get an idea of what its user interface was like.

The video was a bit overwhelming, owing largely to my decades-long absence from the world of Quake. It mentioned installing something called “QuakeSpasm”, which sounded like a terrifying medical condition.

But this video was actually just the first of dumptruck_ds’s 40-plus TrenchBroom 2 Tutorials, and the only one that was remotely overwhelming. Having seen all the ones he’s made so far, it’s clear that using TrenchBroom to design levels is very intuitive. But this is only partly because the tool itself is amazing: dumptruck_ds is a great teacher, and his concise tutorials get straight to the heart of how to use it effectively.

Minecraft with superpowers

Part of what I like about TrenchBroom is that it embraces the interface paradigms that gamers are already familiar with: specifically, the WASD keys and mouse are used to fly around the level in a 3D view. In fact, using the tool almost feels more like playing Minecraft with superpowers than it does a 3D modeling program: passing through walls is effortless, raising a wall is as simple as pointing at its top, holding down the shift key, and dragging up.

A not very complex-looking graphical user interface.
An early version of my Quake level loaded into TrenchBroom.

Given that using it almost feels like a videogame, it’s no surprise that I’ve heard it described as a joy to use. And while I’m by far no master at its use, I agree: while I grudgingly use some tools solely because they are a means to an end, TrenchBroom is one of the few that I actively look forward to using. It’s very easy to enter a flow state and completely lose track of time while building with it.

An extensible platform

Another advantage of TrenchBroom is that it’s not actually tied specifically to Quake. Just as an HTML page is comprised of a heirarchy of elements (or tags), each of which can have its own attributes, so too is a TrenchBroom map comprised of 3D entities, each of which can have its own set of arbitrary properties.

TrenchBroom is designed in such a way that Quake is just one set of property “conventions” that the tool provides user-friendly affordances for. For example, if it sees a property called angle on an entity, it will interpret its value as an angle in degrees and visualize it in the 3D view. It’s possible to tell TrenchBroom about a different game’s (or game mod’s) property conventions through something called an entity definition file, which makes it possible to tailor TrenchBroom for any kind of game. I’m guessing this game-agnostic design is part of why TrenchBroom has been used to make levels for indie games like Cruelty Squad and Graven, which have nothing to do with Quake or its engine.

Note: I’ve never actually made my own “entity definition file”, so I don’t actually know what its particular limitations are; I just know that the concept exists, and I think it is very cool. Also worth noting is that TrenchBroom doesn’t quite deserve all the credit for this extensibile approach: the entity/property concept was actually pioneered by Quake’s original map format, which Valve later built upon, and which TrenchBroom uses natively.

Update 2021-10-10: It looks like these entity definition files were actually pioneered as early as 1996 by Valve’s level editor, originally developed under the name The Forge; the file format is formally called Forge Game Data, or FGD.

My first Quake level

Having watched some videos and tinkered with TrenchBroom a bit, I eventually decided to try using it to create a proper Quake level. But what kind of level would I make? Despite having played plenty of games, I didn’t really know the first thing about level design.

That is a topic for another post, because this one is already way too long.

© Atul Varma 2021