           The Unofficial WAD Designers' Handbook, Release 2.0

                     Basic Doom Structures Addendum


              by Ronald R. Allen Jr. & Bill J. McClendon
               Copyright (c) 1996, All Rights Reserved

----------------------------------------------------------------------------

Introduction

This Addendum to The Unofficial WAD Designers' Handbook takes you through the actual procedures of creating a WAD from scratch, step-by-step. All basic Doom structures are included.

It is assumed that you have the Handbook itself to refer to as needed.


Copyright and Disclaimer

This document and all associated files are copyright (c) 1996 by Bill J. McClendon and Ronald R. Allen Jr. All rights reserved. You may distribute the .ZIP archive file containing this document and all associated files freely under the following conditions:

(1)	The copies are exact and complete, including all files released with 	this document;
(2)	The copies are in electronic, machine-readable form only. You may not 	display these documents, on a web page or by other means, in a human 	readable form. Brief quotations in a review are specifically exempt 	from this restriction.
(3)	You do NOT charge any fee whatsoever for copying and/or distributing 	this document. Subscription and pay BBSs specifically are exempt from 	this restriction only to the extent that they charge only their lowest 	normal access charge for access to this document and no more. This 	file should be downloadable as a "ratio-free" file, if applicable.

If you wish to use or distribute this document in any form that would conflict with the above restrictions, please contact the authors for permission in advance.

This document is not produced or supported by id Software, Inc. That means if you have any questions or problems, direct them to us, not id. This document and all files are provided "as is", with no warranty or guarantee.
Getting Started

It is strongly suggested that you print this document, then follow the instructions step-by-step as closely as possible using your Doom editor to actually create the WAD described. It will be easier on you, and make more sense, to build the structures exactly as described. That way, you can concentrate on the "hows" of construction without worrying too much about such things as texture selection.  Doing so, you should gain a great deal of familiarity with your editor and the WAD-making process, as well as, of course, the construction of the most common Doom structures.

Different editors require different procedures to perform many of the actions required in this process, so it is impossible to provide a set of literal step-by-step instructions. This document, therefore, provides a guide to basic procedures rather than literal directions. You will need to refer to the documentation that came with your editor to determine the exact procedure you must use to accomplish each step. Some editors may require that you deviate somewhat from these instructions. This document was prepared using WinDEU, so those using editors that use the DEU-style interface may find these directions of more direct value. "Sector-based" editors, such as DCK, use very different procedures to accomplish the same results. 

The textures, flats, and linedef types you will be instructed to use in this document are all common to both Doom and Doom II -- you may use these instructions with equal facility with either game.

Please bear in mind that the WAD you will create by following these instructions is not intended to be an example of an excellent, playable Doom level. It is, rather, intended solely as an instructional exercise.


Section 1 -- Rooms and Hallways 

The room is the most basic Doom structure possible. The procedure used to make a room is essentially the exact same procedure you will use to create virtually every other Doom structure as well.

The procedure used is:

	1.	Insert four vertices into a clean editing screen
	2.	Join the vertices with linedefs to create four walls
	3.	Designate the enclosed space as a sector
	4.	Adjust the positions of the vertices so that the room has the 		dimensions you desire, if necessary
	5.	Select and apply textures to the sidedefs (if the default 		texture isn't what you want)
	6.	Adjust floor and ceiling height, if necessary
	7.	Select and apply floor and ceiling flats
	8.	Adjust the light level, if necessary

Note: Steps 1 - 4 above are not applicable when using a "sector-based" editor, most of which allow you to simply draw an area that is already defined as a sector.


(SEE GRAPHIC room1.gif)


First, place four vertices in a new level in your editor. These four vertices will form the corners of the room we're building.

We want to make this room 512 units by 512 units, a medium-sized room. Remember that 64 and 128 are common texture widths, so it's good to use wall lengths that are multiples of 64; 512 is 8 times 64. It's helpful, as shown here, to set your grid for 64x64 so that placement of vertices is easy. Turn your "snap to grid" feature on to make your vetices appear exactly on the grid intersections you choose. Another benefit of using a grid size of 64x64 is that the ceiling and floor flats will align themselves properly.


(SEE GRAPHIC room2.gif)


Next, create linedefs between the four vertices to make a square. As in the above example, the first sidedefs (indicated by the perpendicular lines) should point inward, toward the middle of the area that will be defined as a sector.


(SEE GRAPHIC room3.gif)


Once you've placed the vertices and created the linedefs between them, you need to define the new enclosed area as a sector.

Congratulations! For all intents, you've just finished making a room for Doom! There are a few details to take care of, though.

If you didn't place the vertices to form a 512 unit square to begin with, reposition them now to do so.

The texture we'll use for these walls is BROWNGRN. If your editor doesn't use that texture as the default, you will have to change the texture selection on the four sidedefs. You can apply BROWNGRN by selecting the linedefs and then using your editors "edit linedef" function to select and apply it.

We want this room to have a floor height of 0 (zero) and a ceiling height of 128. Use your editors "edit sector" function to change these values, if necessary.

While you're editing the sector, it's a good time to select and apply floor and ceiling flats. Floor and ceiling flats are changed by editing the sector. We'll use FLOOR3_3 for the floor and CEIL1_3 for the ceiling (please note that you may find that flats that start with "ceil" often work as well or better on the floor and, likewise, flats that start with "floor" are good for ceilings). 

Finally, change the light level to 200. This is also done through your editors "edit sector" function. 200 is a little bright for an indoor area, but the ceiling flat we've selected contains built-in light sources and the ceiling is fairly low; the light level would be relatively high in that case.

Doom will sometimes crash if you try to load a level that contains only one sector, so before we test the new WAD let's add a short hallway. A hallway is simply another room, although generally longer and narrower, so the same basic procedure will be used.


(SEE GRAPHIC room4.gif)


Let's make the hallway 128 units wide, and place the entrance to it in the center of the west wall of our room. We'll make the hallway 256 units long.

Place four more vertices in the appropriate places, as in the above example. 

When you place the two vertices on the existing linedef, your editor, unless it is "sector-based", should indicate in some way that you are splitting the linedef at that point and will likely ask if that is what you want to do; answer "yes". What you are really doing is making three linedefs out of the original linedef you created as the west wall. Don't forget, linedefs always have exactly two vertices.

The lindef that forms the east side of your new hallway will become two-sided. The first side of this linedef will be defined as being in the sector of the room, the second sidedef will be in the sector of the hallway. This should happen automatically when you create the second sector.

Now create linedefs between the four new vertices, and then designate the new area as a sector.

Edit the new linedefs so that they, too, have the texture BROWNGRN applied. Edit the new sector so that it has FLOOR3_3 as the floor flat and CEIL1_3 as the ceiling flat. While you're at it, make the light level 200 as well.

Now let's take a look at what we've done! Fire up Doom and... wait a second, there's some Thing missing. Specifically, there is no Player 1 start Thing in the level yet. Doom will crash every single time without someplace for the player to start, so we need to add a Player 1 start Thing. Place the Player 1 start thing in the southeast corner of your room, and edit it so that it is facing northwest. Make sure that it is set to appear on all skill levels.


(SEE GRAPHIC room5.gif)


Now we're ready to fire up Doom and see what we've got. Your new WAD should look something like this when you run it:


(SEE GRAPHIC ss-room1.jpg)


These textures and flats were chosen for a reason - they help demonstrate several things that you need to be aware of. Walk around your new WAD for a few minutes and notice these things:

	*	The texture BROWNGRN is 64 units wide and 128 units tall. When 		you started building this WAD, you purposefully used wall 		dimensions and ceiling/floor heights that the texture would fit 		on. No offsetting was necessary, even on either side of the 		doorway into the hall.

	*	The ceiling flat has built-in lighting fixtures. By building 		your WAD on a 64x64 grid, you made it possible for the ceiling 		flat to exactly match your room. There is no place in your WAD 		where the lighting fixtures are cut off or otherwise look 		unrealistic. The same is true of the flat used on the floor.

	*	Look at the floor (and ceiling as well) where the two sectors 		meet. There is no visual indication that you are looking at any 		kind of break in the structure, even though you know that there 		are two separate sectors involved. Since the room and hallway 		are aligned to the 64x64 grid, everything looks very natural 		without much effort (other than some forethought) on your part.

	*	Notice, too, the size that the room and hallway appear, and the 		height of the ceiling. Start getting a feel for what numerical 		dimensions in the editor produce what apparent dimensions in the 		game.



Section 2 -- Doors

Now, let's add a door at the end of the hallway. A door usually leads somewhere, so we'll also add another room beyond the door.

The same basic procedure, with a few additions, that you used to create a room and a hallway will be used to create a door:


	1) Place vertices and add linedefs to form the door structure.
	2) Define the door area as a sector
	3) Select and apply textures to the new sidedefs
	4) Edit the new sector for ceiling and floor height as well as flat 		choice
	5) Adjust the light level

In addition to these steps, creating a functioning door requires the use of an activation linedef type. Let's go!


(SEE GRAPHIC door1.gif)


First, add two new vertices at the end of the hallway. Doors are not very thick, compared to other structures, so we want to place the new vertices only 16 units (a common door width) from the two vertices that form the corners of the end of the hall. If you have "snap to grid" turned on (and you should, it's extremely useful), you should change the grid size to 16x16 before adding these vertices. The grid shown above is 16x16.

Now, add the linedefs to form the rectangular shape of the door, and define the new area as a sector.


(SEE GRAPHIC door2.gif)


Since doors lead to other rooms, let's go ahead and add another room now. We'll come back and fix the door up in just a bit.

Before we add a room beyond our soon-to-be door, though, let's think about this for a minute. Why don't we make the next room a little taller than our hallway, say 192 units tall? What will happen to our door if we do? 

The maximum height of any texture in Doom is 128, and our hallway is 128 units tall. The door texture we choose (assuming we select a door texture that is 128 units tall) will look fine from the hallway side, but will tile to fill in the additional 64 units on the other side. That won't look very good.

The solution is to make the other side of the door recessed in a doorway that's also 128 units tall. That way, the door texture will not tile on the wall above and will look great. To do this, make another sector, in the same way that you did before, to form the doorway. We'll make the doorway sector 16 units wide, too.


(SEE GRAPHIC door3.gif)


Now, go ahead and add the new room. Let's make the new room another 512 units square, with the door we're creating centered in it's east wall. This is done using the same process of adding vertices, connecting them with linedefs, and defining the new enclosed area as a sector that you've been using.


(SEE GRAPHIC door4.gif)


Now, let's fix everything up.

Editing the Door Sector
The floor flat you select will appear on the floor under the door when it raises. You may want to choose the same floor flat as in the hallway, which will make the floor unbroken when the door raises. Perhaps, instead, you'd like to use a different flat to make a threshold. Let's do that; apply FLAT20 to the floor.

The ceiling flat will be what appears on the bottom of the door when it raises. Using a flat that has lighting fixtures or other designs wouldn't look very good on the bottom of the door, so let's change that to FLAT1.


	Note:	Although this is largely a matter of preference, here are some 		general rules of thumb for selecting flats to use on the floor 		of doors:

		If the floor is the same on both sides of the door, the floor of 		the door sector should be the same.

		If the floor is different from one side of the door to the other 		and the elevation changes (i.e. there is an immediate step down 		and the floor of the door is raised above the room beyond), the 		door floor should match the floor it shares height with.

		If the floor is different from one side of the door to the other 		and the elevation stays the same, use a threshold flat (FLAT20 		is a "universal separator" flat and is excellent for this use).

Our door is only 16 units deep, not enough to really affect the light level; go ahead and set the light level of the door sector to 200 to match the hallway.

The sector we're editing will be the actual door that raises. The door will be closed when we first encounter it in the game, though, so we have to adjust the ceiling height. We're working with an area that's got a floor height of 0 and a ceiling height of 128. Change the ceiling height of the door sector to 0 as well. That will set the effective height of the Normal area of the sector to 0, but that's OK; we want to block the player's movement through this sector until they raise the door.

Now it's time to edit the linedefs of the door sector. First, are both first sidedefs pointing outward, away from the sector of the door? "DR"-type door activation linedefs require that the player "use" the first sidedef, with the action taking place on the sector that the second sidedef of the same linedef is assigned in. If the first sidedefs of the door face 
linedefs are not pointing outward, you'll have to flip them. Good editors will have a "flip linedef" function that will turn the linedef end-for-end, automatically updating the sidedef information to reflect the new sector assignments.

Now, assign the linedef type "DR  Open door, closes after 4 seconds" to both door face linedefs. This step is what tells Doom to open the door (by raising the ceiling from it's current height of 0 to 4 pixels less than the lowest surrounding ceiling) when a player walks up to it and "uses" it. The DR linedef type does not require the use of tags, but all other linedef types do; we'll see examples of tagged linedef actions later. 

Apply the texture BIGDOOR4 to both door facing first sidedefs. This will be the texture the player sees when approaching the door. Where do you apply the texture? On the Upper! You've set the ceiling height of the door sector equal to 0 (the height of the floor) so it's the Upper of those sidedefs that the player sees when approaching the closed door. The Upper is the portion that must be textured.

There are two other linedefs to consider in the door sector, the sides of the door. In Doom, it is standard practice to use the texture DOORTRAK on these sidedefs. While it may seem confusing at first, you apply the DOORTRAK texture to the Normal of these sidedefs. The player will only see these sidedefs once the door is raised, exposing the Normal -- so we need to texture the Normal to give the player something to see. Also, you should unpeg the Lower of these two linedefs so that the DOORTRAK texture does not "roll up" with the door when it is raised.

You have now made a functioning door!

Let's finish cleaning up the rest of the new doorway and room before we take a look at our work though.


Editing the Recessed Doorway Sector
Edit the sector of the doorway to have a floor height of 0 and ceiling height of 128, if those items aren't already set to the correct values. While you're editing the doorway sector, let's also consider what flats to use. The floor flat should probably be the same as what will be used in the new room, so let's set that to FLAT5_2. This flat is a woodgrain texture. It's often a good practice to set the floor and ceiling flats of doorways to the same that you'll be using in the room beyond. However, in this case, go ahead and set the ceiling flat to FLAT5_2 in the doorway. The ceiling flat we'll be using in the next room wouldn't work too well on the doorway. While you're editing the doorway sector, also set the light level to 200.

Now apply textures to the Normal of the two side sidedefs. Use WOOD1, to continue our wood motif. WOOD1 will also be the texture used on the walls of our new room.



Editing the New Room
Edit the sector of the new room to reflect the following:

	* Floor height = 0
	* Ceiling height = 192
	* Light level = 200
	* Floor flat = FLAT5_2
	* Ceiling flat = CEIL1_1

You should be getting familiar with editing the sector by now, and there is nothing of special interest in setting up the sector of this room. From this point on, unless there is something special to point out, settings to use will simply be listed.

Apply the texture WOOD1 to the Normal of all the sidedefs that make up the walls of this room except the sidedef of the doorway.

The wall above the doorway requires special attention. The room sector has a ceiling height that is taller than the sector of the doorway, so the texture must be applied to the Upper of that sidedef. Apply WOOD1 to the Upper of that sidedef.


Check It Out
OK, save your work, rebuild the nodes, and start up Doom with your new level. Let's see what we've got.

Does the door work properly? If not, go back over the steps to create the door and find what part was missed. Probably the most common errors will be in missing textures or with linedefs for the door faces that don't have their first sides pointing the correct direction.


(SEE GRAPHIC ss-room2.jpg)


There are two areas that need further attention in this room. You may not see either problem area immediately, but it is attention to details like this that can make or break your WAD. The Upper of the sidedef above the doorway should be unpegged so that the texture will match those to either side. Also, the textures on either side of the doorway need to have their y-offset adjusted, again to match the texture to either side in the new room. Quit Doom and return to your editor to fix these problems. 

Setting the linedef for the doorway to be Upper unpegged should not be a problem. Let's talk for a minute about using y-offset on the two sides of the doorway sector, though. What value needs to be used to properly align these textures? The difference in heights between the sectors in question should be the obvious starting place. You're aligning textures between sectors with a ceiling of 128 and a ceiling of 192; the difference is 64. We want to move the textures on the sides of the doorway down to match those of the surrounding walls, so it makes sense to use a y-offset of -64. Set the y-offset on those sidedefs to -64. Save your work and run your level again (since you made no changes that would affect the nodes, such as moving, adding, or deleting vertices, you shouldn't need to rebuild the nodes). Those problems should now be taken care of. 

Items of note in this section:

	*	A door is simply a sector of the appropriate dimensions. Door 		sectors have their ceiling height set to equal their floor 		height.

	*	The action of the door raising is accomplished through using the 		DR linedef type. The DR linedef type is special in that it does 		not require tags to link it to the sector that the action will 		be performed on. The first sidedef of the door faces will always 		point outward, away from the sector of the door, and the DR 		sidedef type automatically affects the sector of the second 		sidedef (the sector of the door).

	*	The sidedefs that make up the sides of doors should be Lower 		unpegged to prevent the texture from "rolling up" with the door.

	*	Doors that are shorter than the rooms they are in should be 		recessed into doorways to prevent tiling of the door texture 		above the actual door. Doorways are nothing more than separate 		sectors placed to serve this purpose.

	*	The Upper of the sidedef above a doorway should be unpegged so 		that the texture matches that of the surrounding walls.

	*	The sides of the doorway will probably need to be y-offset to 		match the surrounding walls.



Section 3 -- Stairs

Making stairs is very simple, but can be tedious (many editors do include an automatic "make stairs" function, although as a general rule they don't work well all the time). You use the same process as with any other Doom structure: add vertices, make linedefs between them, assign sectors, then apply textures, flats, and offsets to make it all look good.

We're going to add a staircase going down, starting in the middle of the north wall of our second room. The first thing we need to do is determine how far down we plan to go and how many steps it will take to get us there. The accepted height of a "typical" Doom room is 128, so having a staircase descend 128 will appear to go down one flight to the story below. While the player in doom can climb steps 24 units tall, steps that tall don't look or feel right. Remember, the Player is 56 units tall, so 24 pixel tall stairs would be proportionately nearly two and a half feet high per step! 16 is a much better step height to use, and, in fact, Doom includes several textures (the STEPx series) that are intended specifically to use on stair risers that are 16 pixels tall. 128 divided by 16 gives us 8 steps.

Some issues of style come into play with staircases as well. First, how deep do we make the stairs so that they look realistic? There is no best answer. However, you'll find that the real-life practice of making the stair depth approximately equal to the height of the riser (16, in this case) doesn't look or feel very realistic; the steps seem too shallow. 32 is a good depth to use on stairs. In fact, Doom comes with two flats for use on stairs, STEP1 and STEP2, that are intended for use on 32 unit deep steps.

A playability issue that depends on stair depth is that monsters will not descend steps that are too shallow. For monsters to be able to descend your stairs, they must be deeper than half the monsters radius. As an example, a 32-unit diameter Imp will never go down steps that are 16 deep; the steps must be a minimum of 17. 

Another style question is how the ceiling of the staircase is handled. Many people have made the ceiling of staircases follow the step pattern, a block down from the ceiling for every step down. There is nothing really wrong with that style, except that it doesn't conform to what most people expect of staircases. We'll make ours a little more realistic by putting our stairs in a stairwell. Using a stairwell also removes any problems we might have with clearance for the player to move up and down the steps.

Ready to put in a bunch of vertices, linedefs and sectors?


	*	Split the linedef of the north wall of the second room twice so 		that there are two vertices 128 units apart centered in the wall 		(each new vertex 192 units from the nearest corner).

	*	Add two more vertices 32 units away and centered to form the 		outer two corners of the first step.

	*	Add linedefs between them, and assign the new area as a sector.

	*	Now, repeat the same process seven more times. Your editor 		screen should look something like this:


(SEE GRAPHIC stairs1.gif)


Remember, each step must be a separate sector. By definition, each step involves a change in floor height, and, in Doom, a change in floor or ceiling height requires a different sector.

Now, to make these new sectors into steps, we need to edit each one of the sectors to change the floor height. The step sector nearest the room will have a floor height of -16, the next step sector will have a floor height of -32, and so on. The last step will have a floor height of -128. 

The ceiling heights of each step should all be set to the same value to create a stairwell, but not necessarily to the same height as the room we're working from. The ceiling height in the room where the stairs begin is 192, and we've already seen that a 128 unit tall door looks fine. Let's set the ceiling height to all the step sectors to 128.

While you're editing the sectors of the steps, set the ceiling flat to CEIL1_1 (the same as in the previous room) if necessary. Set the floor flat on each step sector to STEP2. The flat STEP2 is oriented in a north-south direction, as are our stairs. STEP1 is the same flat as STEP2, but turned 90 so that it is oriented east-west.

Also, if your editor doesn't automatically carry the lighting level from the previous sector over into the next (many do), then set the light level on each stair to 200 for now.

Bringing the ceiling of the stairwell down below the height of the ceiling of the room means that you will need to texture and unpeg the Upper of the sidedef above the entrance to the stairs, just as you did for the sidedef above the doorway. Use WOOD1 on the Upper of this sidedef, to match the room.

Texture the step risers by applying STEPTOP to the Lower of each sidedef. Note that the linedefs that make the end of one step and the beginning of the next are (or should be) all two-sided. Your editor may have set either the first or second side of these linedefs to point toward the bottom of the stairs. This is a good example of where it does not matter which direction each side of a two-sided linedef is facing. Just be sure to apply the texture to the Lower of the appropriate sidedef. The texture STEPTOP is 128x16, and should fit your risers perfectly. The top edge of STEPTOP also matches the edges of the STEP2 flat you applied to the floor of each step.


	Note:	You should never unpeg the textures on the step risers. If you 		do, you will get "tutti-fruitti" as a result. Many editors unpeg 		exposed lowers as a default, so you may have to manually peg 		these textures.


Now, let's texture the sides of the stairwell. Apply the texture WOOD1 to all sidedefs that make up the walls of the stairwell. The texture WOOD1 is 256 pixels wide, though, and we're applying it to sidedefs that are only 32. X-offset must be used to "spread the texture out" over the linedefs so that it appears seamless.


(SEE GRAPHIC stairs2.gif)


As the above illustration shows, each succeeding linedef along each side of the stairwell must be offset 32 pixels more than the one before it. Doom starts texturing at the upper left corner of a linedef as you face it in the game, so the x-offset will increase from left to right as you face the west wall and decrease as you face the east. Therefore, the first linedef in sequence to the left as you face the wall in the game does not require an 
x-offset. The texture being used, WOOD1, is 256 pixels wide, which also happens to be the total length of the sides of the stairwell. Following this procedure, the complete texture will be seamlessly drawn over the each of the walls.

These sidedefs also require the application of a y-offset. Remember how the room above looked? There was a horizontal molding running along the wall, apparently just over head-high. In actuality, this "molding" is the point where tiling occurs. The texture WOOD1 has a border running along its top and bottom edges. The "molding" was created by these two borders meeting at the point where the texture tiled to fit a wall taller than the texture itself (at 64 pixels from the floor, to be exact). We must apply a y-offset of -64 to all the sidedefs that make up the walls of the stairwell to bring the texture down so that this "molding" effect is carried through the stairwell.

Go ahead and load Doom up and take a look at your WAD in progress. It should look something like this:


(SEE GRAPHIC ss-stair.jpg)


The gray texture you see at the end of the stairwell is GRAY4, the default texture of the editor used to create the example WAD the screenshot was taken from, on the wall that will soon be the entrance to the next room. Your editor may have applied a different default texture to this wall.

In this section, there are many things to pay particular attention to:


	*	Stairs are separate sectors. They are, by definition, 		differences in floor height, and any difference in floor or 		ceiling height in Doom requires a separate sector.

	*	Stairs are formed by having several sectors of decreasing (or 		increasing, if you prefer) floor height next to each other; it 		is the difference in floor heights that make the stairs.

	*	Stairwells are created by setting the ceiling heights of all 		sectors that form the steps to the same value. Stairwells are 		generally more realistic than a step-like pattern on the ceiling 		as well (although this is a matter of style and preference).

	*	Risers are textured on the Lower of the sidedef; it doesn't 		matter if the first or second sidedef is pointing out, so long 		as the proper side is textured. 

	*	The side walls of stairwells are made up of the side linedefs of 		the step sectors. They must be x-offset, and perhaps y-offset as 		well, to appear realistic.


Section 4 -- Windows

Before we talk about making a window, we have to create a room at the bottom of the staircase. Here's what you need to do:


(SEE GRAPHIC window1.gif)


First, add a large L-shaped room as shown above. Use the same techniques you've been using to create new rooms. Set the following values for your new, large sector:


	* Floor height = -144
	* Ceiling height = 192
	* Floor flat = MFLR8_2
	* Ceiling flat = FSKY1
	* Light Level = 255
	* Wall texture =STONE2


To make the exit from the stairs look a little better, let's edit the sector of the bottom step to have a ceiling height of 0. You will need to apply a texture to the upper of the sidedef of this sector that faces the other steps. Use WOOD1, and y-offset it -64 to make the "molding" match up.

You'll notice that we're using the flat FSKY1 on the ceiling of this new room. This is the flat to use when you are making and outside area -- our new "room" will actually be a courtyard! Since outside areas are normally the brightest in Doom, we've set our light level accordingly, to 255.

Making a window is actually very simple. Create a sector 128 units long between the wood room and the courtyard, as shown:


(SEE GRAPHIC window2.gif)


You will have to split the existing linedefs four times to place the vertices for this new sector. Once the vertices are placed, define the new area as a sector. Then edit the new sector to have the following settings:


	* Floor height = 25
	* Ceiling height = 97
	* Floor and Ceiling flats = FLAT20
	* Light level=255
	* DOORSTOP texture on the two short sides


In addition to the above, you must unpeg both the Upper and the lower of both of the long linedefs. Unpegging these linedefs will cause the textures above and below our new window to blend seamlessly with the surrounding textures.

These values, with the exception of the floor height, were selected primarily just to produce a relatively attractive window; other dimensions and flat/texture choices may be better. The floor height, however, is crucial (assuming you want to block players from going through the window) in that it must be greater than 24 units above the highest floor in the rooms to either side so that the player can not walk through it. The higher floor height in this example is 0, so the floor height of the window sector must be a minimum of 25. It's also generally a good idea to make the bottoms of windows no more than 25 units taller than the highest connecting floor as anything taller begins to obscure the view through the window and block shots as well. 

Another way to accomplish this, if you want a low window, is to make the top less than 56 units tall. This will also block the players movement through the window. Also, many players (especially in Deathmatch play) like to have windows they can jump through, so these issues may not be relevant to what you intend.

That's it! Save your work, rebuild the nodes, fire up Doom with your level, and take a look out of your window. Then, go down the steps and into the courtyard and look up at the window from that side. Here's what you should see, although your sky flat may be different (the screenshots are from Doom II, Map01):


(SEE GRAPHIC ss-wind1.jpg)


Here's a rundown on making windows:


	*	Windows are just narrow sectors between other sectors, with a 		floor height at least 25 units higher than the highest adjacent 		floor.

	*	In order for textures above and below the window to match the 		textures to either side, both the Upper and Lower of both 		window-face linedefs must be unpegged.


Section 6 -- Lifts

Stairs are great for getting players to different elevations, but another way to do it is with lifts. Lifts are easy to make. Let's go back to the very first room we made, and add another room on the north wall, like this:


(SEE GRAPHIC lift1.gif) 


Make the new sector 128 units square, starting 128 units from the east wall of this room. This sector will eventually become the lift. Set the following values for the new sector:


	* Floor height = 0
	* Ceiling height = 128
	* Floor & ceiling flat = CEIL5_2
	* Wall texture = METAL
	* Light level = 200


Like stairs, lifts usually take the player somewhere. Let's add another room beyond the lift.


(SEE GRAPHIC lift2.gif)


Here are the settings to use for the new room:


	* Ceiling height = 0
	* Floor height = -128
	* Ceiling flat = CEIL1_3
	* Floor flat = FLOOR3_3
	* Wall Texture = BROWNGRN
	* Light level = 200


You'll notice that the ceiling height of this room is the same as the floor height of the sector that will, in short order, become the lift. This is not a requirement of making a lift, although it is an example of the requirements for a lift to completely block sight to the room beyond and below.

Lifts always start in the raised position, and lower upon activation. You can not make a lift that is lowered and raises upon activation... although you can simulate such a structure using the "raise floor" and "lower floor" linedef types.

To actually make the lift, you must tag the linedefs that will activate the lift to the sector of the lift, since that is the sector that will be activated. To do this, follow this procedure:

	*	Edit the sector of the lift, and assign a linedef tag. Most 		editors will automatically assign the next tag number in 		sequence for you, if you like. Since this is the first time we 		are using tags in this WAD, though, the automatic function 		should assign a tag of 1 to the sector. If your editor does not 		assign tag numbers automatically, manually assign the linedef 		tag of 1 to this sector.

	*	Edit the linedef that forms the boundary between the first room 		we made and the sector of the lift. Assign the same tag to this 		linedef as you did to the sector the action will take place in, 		in this case 1. Also, select the linedef type "WR Lower lift for 		3 seconds" for this linedef. This will activate the lift every 		time a player walks over the boundary linedef.

	*	Edit the linedef that forms the boundary between the lift sector 		and the newest room we made. Assign this linedef the tag 1, the 		same tag number as before. This linedef will activate the lift 		from below, so it must be tagged to the same sector. You may tag 		multiple linedefs to the same sector to create different 		actions. Select the linedef type "SR Lower lift for 3 seconds" 		for this linedef. This is a switch-type action type, activated 		by the player standing in front of the linedef and "using" it 		(pressing the spacebar). This is also a repeatable action.


Guess what? Yep, you should now have a working lift!

Well... almost. What's missing? Some textures! When the lift lowers, walls that were not previously visible will become so. These walls must be textured. You may have the first sidedef of this line pointing into the new room we just made (as shown in the example below), or it may be pointing in toward the lift sector. The direction that the first sidedef in this case does not matter, except in determining where textures need to be applied.


	*	Apply the texture PLAT1 to the Lower of the sidedef that faces 		into the newest, north-most room.

	*	Apply the texture METAL to the Upper of the sidedef that faces 		the sector of the lift.


(SEE GRAPHIC lift3.gif)


Now you have a working lift. Save your work, rebuild the nodes, and check it out!


(SEE GRAPHIC ss-lift1.jpg)


Here are the important things to remember about making lifts:


	*	Lifts are sectors that separate two (or more) other sectors. The 		sectors separated by a lift must have a difference in floor 		height and ceiling height.

	*	The sector that forms the lift must start out with the same 		floor height, and usually the same ceiling height, as the 		highest floor high of the sectors it connects.

	*	You must tag the sector of the lift to linedefs that will 		activate it. The standard linedef tags are of the walkover kind 		for the higher room, switch-type (or "use") for the lower. 

	*	You must apply a texture to the Upper of the sidedef facing into 		the lift that will form one of the walls of the lift chamber 		when seen from the higher floor. You must apply a texture to the 		Lower of the sidedef facing into the room below that is seen 		when the lift is raised and the player is in the lower room.

	*	Never unpeg the side textures of a lift, unless you want the 		textures to move when the lift lowers (most Doom players will 		consider this an error). Also, never unpeg the lower texture of 		a lift, it looks bad.



Section 7 -- Teleporters


Teleport pads are another, extremely useful, way to move your players (and monsters) around your level.

Making a teleport pad uses the same basic techniques that you've been using throughout this tutorial. The pad itself, however, is a separate sector placed in one of your rooms, making it a sector within a sector.

Sectors within sectors are just that -- a portion of a room that may or may not have the same characteristics as the surrounding room, but can be edited as a separate entity. Creating sectors within sectors, however, can be a challenge. Check your editor documentation for the preferred method for you to use. However, regardless of what editor you use, you may find it necessary to edit the linedefs of your new sector to, for example, add second sides and make them two-sided transparent sidedefs rather than one-sided sidedefs facing into the new sector. In addition, to make a functional teleport pad, it is imperative that all first sidedefs of the sector that will be the teleport pad be facing outward, away from the sector. This is necessary because the teleport linedef type activators work only when the player walks over them from the first side. You may need to flip the linedefs once their sidedefs are properly assigned to the sectors involved.

Create a 64x64 sector within the sector of the room we just made the lift lower into, and place it as shown:


(SEE GRAPHIC tele1.gif)


Once your new sector is created, edit it to reflect these values:


	* Ceiling height = -8
	* Floor height = -120
	* Floor and Ceiling flat = GATE1
	* Apply the texture METAL to both the Upper and Lower of all first 		sidedefs that make up this sector
	* Select the "sector special" type of "light glows between set level 		and nearby level", and set the light level at 255. This is not a 		requirement of making a teleport pad, but does add a touch of 		style.


The end result of these changes is a raised platform in the room, with metal sides and a standard Doom teleport flat on the floor. Above the platform is a lowered section of ceiling, a mirror image of the platform itself. This lowered section is not necessary, but is often used by WAD designers.


(SEE GRAPHIC ss-tele1.gif)


To make the teleport pad function, assign a tag to the sidedefs that make up the teleporter sector, and select the linedef type "WR Teleport to sector". A teleport pad requires a destination, so we need to place a Teleport Exit Thing somewhere else in the level. Place one in the northwest corner of the courtyard sector. Edit the Teleport Exit Thing so that it facing southeast, and be sure that it is set to appear on every skill level.


(SEE GRAPHIC tele2.gif)


Whenever you tag a linedef to create an action, there must be a corresponding sector that is tagged the same for the action to affect. In a teleport, the action sector is the one where the Teleport Exit Thing is located. Edit the sector of the courtyard to have the same tag that you assigned to the linedefs of the teleport pad.


	Note:	Teleport pads are a frequent source of confusion to Doom editing 		novices. It is important to remember that the teleporter sector 		does nothing by itself; it is the linedefs that make up the 		teleporter sector that do all the action. The sector where the 		action takes place (that is tagged to the linedefs of the 		teleporter) is the sector that contains the teleport exit Thing.

	Also Note:	Multiple teleporters can be tagged to the same exit (you 			can teleport to the same place from any number of 			teleporters), but each teleport linedef has exactly one 			destination. A question that pops up from time to time in 			the Doom editing Newsgroup on Usenet is how to make a 			"random transporter" or make a teleporter change 			destinations. The answer is, it can't be done.

			However, teleporters usually have four sides... and each 			side can have a different destination.


And there you have it! A functioning teleport pad. Save your WAD, rebuild the nodes, and run Doom with your work loaded. Go down the lift and walk over the teleport pad, and you'll find yourself transported to the courtyard facing the window we made earlier.


In Conclusion

That's all for the Basic Doom Structures tutorial of the Unofficial WAD Designers' Handbook, but that's by no means all of the structures you can create. However, if you made it this far, then you definitely have all the basic skills and knowledge you require to build virtually anything in the Doom world!

Many of the other types of structures you can create depend on the use of tagged linedefs and sectors to create movement. Different action linedef types produce different types of movement, but the procedures you used to create a door, lift, and teleporter in these exercises are the same.

Good Dooming!


(Comments, suggestions, and questions may be addressed to ron1701@apci.net)
