The magazine of the Melbourne PC User Group

Your own Doom levels: Part 2
Douglas Aberdeen

Last month I described the terminology and theory behind creating Doom levels. Hopefully you have now found a Doom editor and have managed to create a working level. This month I'll describe how to put in a teleporter, and how to turn your PWAD into a multimedia extravaganza.

Teleporter

The most obvious special sector in Doom is a simple door. However, as all editors have a function that automatically turns a sector into a door, it is not worth detailing that here. On the other hand, it might make the following easier to grasp if you have a look at what the editor does in order to turn a sector into a door. I'll describe how to create a teleporter, but all the effects work in a similar way.

The first step in creating a teleporter is to make a sector which, when you cross into it, you are teleported to another sector. The usual teleport region is a 64 x 64 sector inside another sector. If you make the sector 64 x 64 and align it with a 64 x 64 grid (if the editor has a grid option), you will find that the standard teleport flat graphics will fit in perfectly.

Most of the special effects in Doom operate by triggering a linedef by walking over it, switching it, or shooting it; which sets off some sort of action in a sector. The trigger linedef and action sector are related by a common number, or "tag." You must first choose an unused tag. Your editor may do this automatically. DEU will not, but will tell you the next unused tag you can use.

Only side one of a linedef can have a trigger defined. So for the teleporter, make side one of the linedef point out of the sector. When you walk into the sector (not out of it) you trigger the teleport. For each of the linedefs making up the teleporter, you declare the "type" to be "Teleport to another sector," or your editor's equivalent. You must also give each linedef the tag you have chosen. In DEU this tag is called the "Sector tag." This is not the number of the sector you want to teleport to. As described above the tag is an arbitrary number. Figure 1 shows the process of defining a teleporter in DEU.



Figure 1. Defining the four sides of a 64 x 64 sector to be teleporters. Note how side one linedefs point out

In the sector you are teleporting to, you have to do two things. Firstly you need to change the sector's tag to the same as you used for the teleport linedefs. In DEU the field you need to change is the "Linedef tag." DEU will show you have the tags correct by changing the colour of the lines around the teleporter, and the sector you are teleporting to. The second thing you need to do is add a "Teleport exit" thing into the teleport destination sector. This thing does not appear in the game, but defines your exact location and your direction when you materialise.

Note that the above is a one-way teleporter. Two-way teleporters are simply two, one-way teleporters.

Deutex

Wad files don't just contain maps, but everything you see and hear in Doom. Most editors won't let you do anything except make levels, so you need another program. I would recommend a program called DEUTEX. This is available on the Melb PC BBS (Doom areas) and at ftp.luth.se via ftp. If you use a WWW browser, then use the URL ftp://ftp.luth.se.

DEUTEX allows you to build a PWAD that includes multiple maps, new sound effects, new music, new textures, new sprites, new palettes and new graphics. Graphics are things like the title screen and the text used in the menus. DEUTEX is capable of changing flat textures but it requires all of Doom's standard flats to be included in your PWAD file, which makes it excessively large. DEUTEX will also extract resources from the main Wad or PWADs.

DEUTEX uses a script to compile all the resources into a single PWAD. The script details the source files and what they are replacing in the game. It would take a lot of space to describe the details of DEUTEX, so I will leave that to its comprehensive manual. Changing sprites and textures is unfortunately quite a complex procedure.

Bitmaps

When drawing any sort of bitmap for a Doom graphic, texture, flat or sprite you should always use the standard Doom palette. Otherwise your hard work will come out as a mess of colours. To get the Doom palette you should extract a bitmap from an existing Doom PWAD (using DEUTEX), load it into your art program, save its palette, and then use that palette for all your editing work. DEUTEX accepts both the GIF format and PCX format for bitmaps.

Sounds and music

Sounds should be mono, sampled at 11,025 Hz, and saved in .WAV format. Music uses the .MUS format, which can be created from MIDI files using a utility called MID2MUS.EXE, available from the above two sources.

Problems with your map?

If you find unexplainable "Hall of Mirrors" effects in your map, and you can walk though walls in some places, then you should use an external map compiler. I suggest IDBSP.EXE, which is extended from source code written by iD Software.

Reprinted from the November 1995 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]