Thursday, September 7, 2023

Editing Doom, Section 1 (Preface)

1993. Id Software. Doom.

A first person shooter that, in many respects, set the standard for first-person shooters. The now decades-long popularity of Doom is not only from the once-novel 3-D graphics, the gore and violence, or the networked multi-player facility. Doom has endured because of the modding community.

Modding Doom, that is, modifying graphics, building new maps, and changing other game assets, has been in practice virtually since the game's release.

John Carmack, programmer of the Doom engine, provided ways to mod the game from the beginning. Id Software officially released the engine source code in 1997. The modding community followed with source ports of the Doom engine that continue to this day.


During the mid-'90s, just about everyone playing Doom was using an Intel–MS-DOS system, better known as a PC, as it was (and continues to be) the largest operating system market. 

Versions of Doom were eventually ported to other platforms (including Macintosh) with varied success.

Around this time, the prevailing software to mod Doom game files were the Doom Editing Utilities or DEU, available only for MS-DOS. Community-built DEU was the ad-hoc alternative to the “official” DoomEd editor, which existed only on Id Software's NeXT machines.

Doom Editing Utilities (DEU) for MS-DOS.

DEU was for map editing, such as creating line-segment regions, setting their properties, and adding items and monsters, among other things. DEU later forked into other projects and currently exists as Eureka.


You may be surprised to learn that the Doom executable program does not actually contain any game data such as levels, graphics, or sound; it is only the engine. Instead, a WAD file holds all of these game parts. WAD stands for Where's All the Data?

The WAD file that comes with Doom (named DOOM.WAD) is called an Internal WAD or IWAD. This is the main game file that contains all of the game assets: maps, wall graphics, floor/ceiling graphics, monster graphics, item graphics, user interface graphics, sound effects, and music. Each of these elements in the WAD is called a lump.

To modify Doom, users create a new WAD to replace (patch) lumps in the IWAD when the game loads. This is called a Patch WAD or PWAD.

Both IWAD and PWAD types use the .WAD file extension, but internally, they are different.


WADs (PWADs) that completely replace all of the assets (maps, graphics, sound) in the game WAD (IWAD) are called total conversions. They can take hundreds of hours to make.

However, most community-made WADs (PWADs) out there are simply new game maps with a few different graphics or sounds. The PWAD replaces or adds to these elements that would ordinarily come from the main IWAD when the game starts.


Doom Engine Source Port

DSDA-Doom running the Freedoom Phase 2 WAD.

Playing Doom or something Doom-like on modern systems requires a Doom engine (an executable program). Doom engines built from the original opened source code are called source ports. They are free to use.

Popular source ports are ZDoom and PrBoom+. The modding community seems to highly regard GZDoom (a variant of ZDoom) because of the extra features for modded WADs, including ways to define new types of monsters and other objects.

Linux users may find the simplest approach is to install Freedoom from the Debian repository, as this includes a source port (currently DSDA-Doom), and the Freedoom WAD files. DSDA Doom is a variant of PrBoom+ (prboom-plus in the repository) and is fine for playing basic modded WADs. With a terminal open, type:

sudo apt install freedoom


Eureka Doom Editor

Typical Doom modders make maps, and there are some amazing ones out there. Currently, the most approachable and cross-platform mapping program is Eureka Doom Editor or simply Eureka. It is distantly related to DEU and shares many of the same features. For this guide, we will be using it to inspect, edit, and build maps.

Debian users will be pleased to know that Eureka is in the official repository. Note, Freedoom and PrBoom+ will accompany this install. Simply open a terminal and type:

sudo apt install eureka


SLADE

SLADE is the modern way to work with lumps in a WAD file. It's approachable, cross-platform, and has a GUI. There's even a map editor. For this guide, we will be using it to import and export files.

SLADE


If you are using macOS or Windows, visit the SLADE web site to download a compiled application. If you are using Linux (the author of SLADE recommends Debian), use the following sequence of bash terminal commands to install with apt

You must be root (superuser) or prefix each line with sudo:

mkdir -p /etc/apt/keyrings
wget http://debian.drdteam.org/drdteam.gpg -P /etc/apt/keyrings
echo -e "\ndeb [signed-by=/etc/apt/keyrings/drdteam.gpg] http://debian.drdteam.org/ stable multiverse" >> /etc/apt/sources.list
apt update
apt install slade

Description of Command Sequence

  1. Create keyrings directory, if it does not exist.
  2. Download the key file into /etc/apt/keyrings.
  3. Add a new line, key path and repository to sources.list.
  4. Update apt.
  5. Install SLADE.

Note: Linux install instructions exist on the SLADE web site, but some of the commands are now depreciated with newer Linux distributions. The above method was confirmed to work with Debian 12 "bookworm".

 

💀

Vocabulary

  • Doom engine: An executable program for playing WAD files.
  • WAD: File containing the game maps, graphics, sounds, and other objects. Stands for "Where's All the Data?" 
  • IWAD: Internal WAD, the main game file containing original artistic assets. Usually copyrighted. Not typically modified.
  • PWAD: Patch WAD. Contains custom maps, graphics, or sounds that add to or replace (patch) those from the IWAD at load time.
  • Lump: An entry in a WAD file. Can represent map parts, graphics, sounds, music, or other objects.
  • Source port: A Doom engine created from Id Software's opened source code.
  • Mod/Modding: Modifying or adding maps, graphics, sound, or other lumps in a WAD file.
  • Doom editor: Software for modding WAD files. Some software is for mapping: DEU, SLADE, Eureka, Ultimate Doom Builder. Some handle lumps: DeuTex, SLADE.

No comments:

Post a Comment