Copyright: matt tagliaferri


Tutorial
DoomCAD Tutorial

Note from matt:  This tutorial was written for DoomCAD when it was only a Doom 1 editor.  Some of the dialog layouts and names have changed, but the basic concepts are still intact.  The single most impotant thing to bring form this tutorial is how to connect sectors together, and how to get triggers to work.  That stuff hasn't changed from version to version.

By Terry Henning  (terryh%astroatc.uucp@spool.cs.wisc.edu)

IMPORTANT!!!!  Before going through this tutorial, I highly recommend (in fact I demand) that you read through the help file and learn about the different entities (vertices, LineDefs, etc.) and their corresponding Modes.  In this tutorial, I will be assuming that you know what a "Vertex" or what a "Sector" is, and how to enter "Vertex Mode" or "Sector Mode".

Getting Started

Sectors

A Door

Sectors Within Sectors

Stairs

The Elevator

PreFab Door

Finishing

TroubleShooting


Getting Started

We'll start by creating a new level.  Open up the "File" menu and click on "New Level".  What you will see is a rectagular box with a dot in the middle.  That dot is your player's start position.  There must be one of those in every level.

Fig. 1

The rectangular box is a default room which is automatically created when you start a new level.  Right now, you have a four sided Sector, with one thing in it.  The room is very large, so we will make it smaller.

To do this:

1.  Enter LineDef Mode, select LineDef A-B from that Sector and click the right mouse button.

2.  A window will pop up that let's you set the properties of the line.  At the top of the window you can type in a new line length.  Type in "512" for the length and click "Ok".

The line length will change and the attached lines will move with it.  Enter Vertex Mode and move the other vertices to make a nice rectangle again.  (See Fig. 1)   Because the box is smaller now, you may want to zoom in a couple times using the "+" key.


Sectors

There is more than one way to add a new Sector.  For now I'll take you through the process of building one by hand.  Once you get the hang of things, you can add rooms by using the prefab option.

1.	 Enter Vertex Mode.

2.	 Select  "Add Vertex" from the "Vertex" menu.

3.	 Add six Vertices, E through J, as shown in Fig. 2.

4.	Click the right button when done.

5.	Enter Sector Mode and select "Add Sector" from the "Sector" menu.

6.	Pick a Vertex and click on it (in this case E), and add the Sector's LineDefs in a clockwise direction (E-F-G-H ...) until the Sector is closed, i.e. when you are back at Vertex E.

7.	Click the right mouse button to tell DoomCAD you are done creating the Sector.

(Note!  When adding a Sector, it doesn't matter which Vertex you start from.  The important thing is that you add LineDefs clockwise and that you click on each Vertex that you want to be included in the Sector!)


A Door

We'll connect the two rooms with a door.  If you remember from the help file, (you did read it right???) a door is actually a Sector whose ceiling height is equal to the floor height.  So, we will need to add a new Sector in between the two Sectors.  But first, we must place the vertices that make up the door Sector.

1.  Enter LineDef Mode

2.  Select LineDef A-B

3.  From the "LineDef" menu select "Split LineDef".  This splits the LineDef, creating a new vertex in the process.

4.  Repeat step 3.  Steps 3 and 4 created the new vertices A' and B'.

Fig. 3

5.  Select LineDef I-J, click the right mouse button, and make its length 128 by typing the length in the edit window.

6.  Enter Vertex Mode

7.  Move the vertices A' and B' so they line up underneath vertices I and J as shown in Fig. 3.

8.  Enter Sector Mode and select "Add Sector" from the "Sector" menu.

9.  Click on a Vertex (in this case A') and add the LineDefs in a clockwise direction (A'-J-I-B'-A').  Right click when done.

Note!  In the process of creating this Sector you traced over two LineDefs (I-J and A'-B') that already point to a Sector.  Something very important happened here.  When, adding or editing a Sector, you trace over an existing LineDef, DoomCAD checks to see if that line has a Right SideDef.  If it does, then it is given a Left SideDef.  This is how two Sided LineDefs are created: They are created automatically when you use an existing LineDef a second time for a new sector. For example, look at LineDef I-J by clicking on it in LineDef Mode.  Look at the status bar just under the menu.  You should see "1: 1/ 2: 2".  What this means is for that LineDef, the first SideDef points to Sector 1 and the second SideDef points to Sector 2.  But, even though those LineDefs have two sides we must tell DoomCAD that they are two sided and that we want them to be a door.

10. Make sure you are in LineDef Mode and select line I-J

11. Right click to bring up the LineDef edit window.

12. Under "Attributes" turn off the "Impassible" option and turn on "two sided (transparent SideDefs)"

13. In the window to the left of "Attributes" select "DR  Door.  Closes after 6. sec."

14. Because the door texture that you see in the game is actually an "Above wall texture" you must give it one (Remember, a Door's ceiling is down on the floor when it is closed, so the door graphic is above the ceiling).  From the texture list down at the bottom of the window, click on "Bigdoor2" and drag it to the "Above wall" texture field for the Right SideDef.

15. Click on the "C" button to the right of the "Wall" field to clear it.  If you forget to clear the "Wall" texture, you will see a wall there when the door opens.  (It may be good for confusing players, however :)

16. Click Ok.

17. Now repeat steps 11 through16 for LineDef A'-B'.

LineDefs A'-J and B'-I are the door tracks.  The length of this LineDef sets the "thickness" of the door.  Most doors are usually in the range of 8 to 24 units wide.

18. Select LineDef A'-J and bring up the LineDef edit window.

19. Drag the texture "Doortrak" onto the "Wall" texture field and select "wall below is unpegged".  This prevents the appearance that the door trak is sliding up with the door.

20. Set the length to 16 and click "OK".

21. Select LineDef B'-I and repeat step 19.  Click "OK".

22. Enter Vertex Mode and move Vertex "I" to make the door a nice rectangle. See Fig. 4.

Fig. 4

23.  Enter Sector Mode, select Sector ABCD and click the right mouse button.

24.  Set the ceiling height to 128 and brightness to 150.  Do the same for Sector EFGH.

25.  Select the door Sector and set the ceiling height to 0 and brightness to 150.

It's a door!  It looks like a lot to do, but after you make a few doors you'll be able to whip one up in about 20 sec.

A couple things have happened.  The two-sided LineDefs have turned yellow, and when you click on either LineDef A'-B' or I-J the door will show up blue.  This shows another useful feature of DoomCAD - when you click on a LineDef it will show you which Sectors (if any) have the same trigger value, in blue.  Normal doors like this one don't have trigger values, but it shows blue anyway to show you that it is an "action" Sector.


Sectors Within Sectors

Now we're going to make two columns which will come down from the ceiling.  Columns like this are actually Sectors within other Sectors.  They must be a different Sector because they will have a different ceiling height.  Nukage pits must be a separate Sector because they have a different floor height.  We'll put them in the upper Sector (EFGH).

Fig. 5

1.  Enter Vertex Mode and select "Set Grid Snap" from the "Grid" menu.

2.  Enter "64" into both the "x" and "y" fields.

3.  Select "Add Vertex" from the "Vertex" menu and add eight vertices to make two squares.

4. When you are done, right click.  It should look like Fig. 5 when you are done.

(Note!  You may have to move the vertices around to get them on the grid.  Make sure that each Vertex is on the grid.  Even though the vertices are 64 units apart in the x and y direction, it may not look like it.  Sometimes, depending on the size and shape of the map, it will look squished.  Hit Crtl-X or Crtl-Y to shorten the x or y direction if you want the aspect ratio to be the same in both directions.)

  5.  Enter Sector Mode and select "Add Sector".  Make a Sector out of the four vertices at the left and another for the vertices on the right.  See Fig. 6.  Note that this figure is the first to use 'Direction Marks'  (the little lines in the middle of each LineDef.)  These marks designate the Right Side of each LineDef.

Fig. 6

6.  Now you need make the inner Sector's LineDefs two-sided.  We'll do this by adding a second SideDef which will point to Sector EFGH.  Enter Sector Mode and select Sector EFGH.  Select "Edit Current Sector's LineDefs" from the "Sector" menu.

7.  Add LineDefs in a clockwise direction around the left inner Sector and right click.  Repeat for the other Sector.  (Note!  It won't look like you've done anything because you haven't added any new lines.  What you've done here is given an existing LineDef a second SideDef. )

8.  Select one of the square Sectors.  Make sure that you have the inner Sector selected where only the square box should be red.

      (Note:  If the outer Sector is red, that means that the outer Sector is selected.  If the outer Sector is red, click on the Sector you want to edit again.  Note that the inner Sector will be red even though the outer Sector is selected.  This is because the second SideDef of those inner Sectors points to the outer Sector.  (You can also tell which Sector is selected by looking at the status bar.)

9.  When you are sure you have only the inner Sector selected, right click to bring up the Sector edit window and make the ceiling height 64, set the ceiling texture to TLITE6_1 and set the brightness to 200.  Do the same for the other square Sector.

10. Enter LineDef Mode, click on the "Mass Select" tool (the dotted line box at the top of the toolbar) and draw a box around both of the square Sectors.

11. Click the right mouse button to bring up the LineDef edit menu and turn off "Impassible", turn on "Two sided", drag the right "Wall" texture name onto the left side "Wall Above" texture and click the "C" next to the right side "Wall" texture field to clear it.  Click "OK" when finished.

Notice that you only need a "Wall above" texture on the left SideDef because that is the only side that you will see.

Now, you have two Sectors within another Sector.  This procedure can be used to make nukage pits, "holes", columns, altars, pedestals, or whatever you like.


Stairs

Fig. 7

Stairs are actually a series of Sectors with the floor height of each Sector higher (or lower) than the previous Sector.

Let's make a small stairway that goes out into a courtyard on the right side of Sector EFGH.

1.  Enter Vertex Mode and set the grid snap to 64.  (Doom has a floor texture for "step top" and it needs to be on a 64x64 grid for it to look correct.)

2.  Place 8 vertices as shown in Fig. 7.

3.  Enter LineDef Mode, select LineDef G-H and split it twice.  This will create vertices G' and H'.

4.  Enter Vertex Mode and move the vertices on line G-H so that they line up with the vertices you just placed, S1 though S8.

5.  Enter Sector Mode and select "Add Sector" from the "Sector" menu.

6.  Going from left to right, add one Sector at a time, add LineDefs in a clockwise direction for each set of four vertices (G'S1S2H'G' then S1S3S4S2S1 then S3S5S6S4S3 etc.)  Don't forget to click the right mouse button when you are done creating each Sector.  When you are done, it should look like Fig. 8.  (Sometimes it will be easier to set the grid snap to 8 before adding Sectors - the line won't jump around as much.)

Fig. 8

7.  Now, to set the step heights.  While still in Sector Mode, click on the mass select (dotted box) and draw a box to include all of the Sectors that make up the stairs.  Make sure that only the stairs are selected.  If other Sectors show up red try it again.

8.  Set the ceiling height to 56, ceiling texture to TLITE6_6 and the floor texture to STEP6.

9.  Turn off the mass select by clicking on the "arrow" on the tool bar.  Select the left most Sector (G'S1S2H') and click the right mouse button.

10. Set the floor height to -16, and the brightness to 180.  Click "Ok".

11. Repeat 10 for each "step", with the floor heights decreasing by 16 units, (-32, -48, etc.) until you reach the last step.  The last step should have a floor height of -64.

12. Enter LineDef Mode and select line G'-H'.  Right click to bring up the edit menu.

13. Turn off "Impassable" and turn on "Two Sided" and "Wall Above Unpegged".

14. Drag the "Wall" texture to the "Wall Above" field and clear the "Wall" texture field.

15. From the texture list, drag "STEP1" onto the LEFT "Wall Below" texture.  (This is what you will see as the front of the step.)

16. Repeat steps 12-15 for lines S1-S2, S3-S4 and S5-S6.

      (Note!   You won't have to set the right side "Above Wall" texture or the "Above Wall Unpegged" attribute for these lines because the ceiling heights are the same.  We had to do this in step 9 because the ceiling in the adjoining room is higher than our doorway.)

11. Enter Vertex Mode and add four more vertices (1-4) to the right of the stairs.  This is going to be a courtyard.

12. Enter Sector Mode and make a new Sector, making sure to include the LineDef of the bottom step (S7-S8) as shown in Fig. 9.

13. Select line S7-S8 and set the left side "Wall above" texture to STARTAN3 (or whatever texture you are using for this demo)

Fig. 9

That's all there is to stairs.  If there are only a couple of steps (1 to 3) it's easy to add them by hand, but if you have a large difference in floor heights that requires a large number of steps, I recommend using the prefab stairs.  The prefab stair option sets the "Wall Below" textures and automatically sets the LineDefs to "Two Sided".

Here are some additional notes about creating Prefab stairs.

1). The 'Top of Stairs faces' option designates which step is the highest in elevation.  For example, if you select East, then you are creating an East-West stairway with the highest step East, and the lowest step West.

2). If your stairs are going to be inside a room (like the stairs near the green armour in E1M1), you can automatically set up the steps to be inside their parent sector.  To do this, while in PreFab mode, select the intended parent sector by clicking on it.  When you choose "Build PreFab Stairs", you'll see a box marked 'Parent Sector'.  This box will have the sector number of the sector you just highlighted.  If your stairs are in a hallway (as above), they won't have a parent sector, so the 'Parent Sector' box should be set to -1.

3). You will also have to attach the "ends" of the topmost and bottommost step to the sectors they lead to.  To do this, select the room that the step will lead to, select "Edit Current Sectors LineDefs", and trace over the "end" LineDef created by the Prefab stairs.  This will create a Left SideDef for the end step which points to the room.  Make sure to do this for both end steps.


The Elevator

Hopefully, you have the hang of how to edit Sectors and LineDefs by now.  From this point on, if I say to set a floor height to a certain value, or change a LineDef attribute you should know to enter whichever Mode is appropriate, select the object to be edited and click the right mouse button.

Let's add an elevator just above line F-G.

1.  Split line F-G twice.  This will create vertices K and L.

2.  Set the grid snap to 64 and add two vertices, M and N.

3.  Move the four vertices so that you have a 64x64 unit square.

4.  Enter Sector Mode and add a new Sector KMLN using those vertices.  (See Fig. 10)

Fig. 10

5.   Set that Sector's (KMNL) floor height to zero, the ceiling height to 72 and brightness to 210.

6.   Set the ceiling texture to CEIL1_2 and floor to STEP2.

7.   Enter LineDef Mode and edit line K-L.  Turn off "Impassable" and turn on "Two sided".

8.   Drag the right side "Wall" texture to the "Above Wall" field and clear the "Wall" texture field.  Give the left side "Below Wall" the same texture as the right side "Wall".

9.    Now comes the fun part - making it work!  Just to the left of the "Attributes" window is a Listbox that lists all of the options for LineDef types.  This is how you make all of those cool traps, elevators, crushing walls, etc.  Click on the "Walk" radio button.  (It's right above the Listbox).  Scroll down to where it says "88=WR Floor lowers quickly for 3 sec.,  then rises" and select it.

10.  Click on the small "n" (for "new") button next to the Trigger Edit Box to assign a new trigger value.  It should say "1".  What this trigger value does is "link" the line to the Sector that is being operated on.  That Sector must have the same trigger value as the LineDef for it to work correctly.  Note:  The '1' does NOT mean "Sector Number 1", it means "The Sector with Trigger Number 1".  This way, many Sectors can have the same trigger number, and be trigger by the same LineDef.

11.  Enter Sector Mode and select the "elevator".  Where it says "trigger", enter the number "1".  Notice that after you click "Ok" the LineDef that has the same trigger value shows up blue.  If you select that LineDef, the elevator Sector will show up blue.  What will happen is, when you step onto the elevator (cross line K-L) the elevator will go down.

12.  Let's make the elevator go down into a long hallway.  Enter Vertex Mode, and add two vertices (O and P) directly above the elevator.

13.  Enter Sector Mode and add the Sector MOPN, making sure to trace over line M-N.  (See Fig. 11)  Set the ceiling height of that Sector to zero and the floor height to -72.

Fig. 11

13. Edit line M-N to turn off "Impassable" and turn on "Two sided".

14. We will want to be able to get back up to the room if we step off the elevator, so we must make the elevator work from the other side as well.  Click on the "switch" radio button and select "62 /SR Floor lowers for 3 sec. then rises." and type in "1" for the trigger number.  (it must point to that same Sector)

15. From the "LineDef" menu select "Flip LineDef".  (The Right SideDef must face away from the Sector for doors and elevators to work correctly.  In other words, the LineDefs marked 'W' (for Walk) must be walked over from their Right Side to work properly, and those marked 'S' (for Switch) must be activated on their Right side.)

16. The last thing needed to make it a working elevator is to give the left SideDef of M-N a "Below wall" texture and the right SideDef an "Above wall" texture.  Set the left "Below wall" to SUPPORT2 and the right Above wall" to STARTAN3 (or the texture of your choice).

That's it!  Note that the "walk over" LineDefs and switches don't have to be the sides of the elevator.  They can be a distance away, like in E1M1, where you must run across the nukage to get to the elevator before it goes back up.  As you enter that room, you cross a LineDef that points to the Sector and tells it to lower for 3 seconds and then go back up again.   Obviously, it should be close enough for the player to get to the elevator before it rises again and also that he can hear it.  If he can't hear it, it's very difficult to know that there is an elevator there.

Just to make sure that everything is ok so far, hit F12 to perform the integrity check.  If you've followed everything correctly, it should say "Level looks ok!".  If it gives an error, DoomCAD will select the cause of the problem and put you in the right edit Mode.  Just click the right mouse button to bring up the edit window and correct the problem.  If you can't seem to correct the problem, go back over the tutorial to see if you've missed something.


Prefab Door

At the end of that long hallway we'll put a door.  This time we'lll use the prefab door option.  But first we must create a room opposite the door.

1.  Enter Vertex Mode and place six vertices R, S, T, U, V and W so that there are four on the side that meets the hallway.

2.  Enter Sector Mode and create the Sector RSTUVW.  It should look like Fig. 12.

Fig. 12

3.  Set the grid snap to 8 and click on the prefab button on the toolbar.  (It looks like a hammer sticking out of a box.)

4.  From the "Prefab" menu, select "Add Prefab Door".

5.  A window will pop up - set the angle to zero.

6.  Hit "ok" and move the door to a location in between the top end of the hallway and the room we just created.

7.  Move the vertices of line R-S so that they line up vertically with the edges of the door.

8.  Add Sectors OD1D4P, and SRD3D2.  It should look like Figs. 13 and 13a.

Fig. 13

Fig. 13a

9.  Edit lines S-R and O-P; turn off "Impassable", turn on "Two sided" and give the right SideDefs an "Above wall" texture.

10. Enter Sector Mode and set the floor height of Sector OD1D4P to -72 and the ceiling to 56.  Repeat for Sector SRD3D2.

11. Set the floor and ceiling height of the door (D1D2D3D4) to -72.

12. Select Sector TUVW and set its floor height to -72 and its ceiling height to 56.  Set the brightness to 200.

That's it for the prefab door.  You may find the prefab door very useful or you may like to just make them by hand.  Personally, I just make them by hand.  Once you get used to DoomCAD, it will take only a couple seconds to whip up a door.


Finishing

That's it for the tutorial.  The final result should look something like Fig. 14.  Hit F12 to perform the integrity check.  If it gives an error, read what the message says and fix it.  If you still can't get it, go back over the tutorial again and see if you missed any steps.

Fig. 14.

From the "File" menu, select "Save as".  Give it a name and and then pick a level and map number.  Hit "ok".  You will see DoomCAD build the nodes, sSectors and blockmap for your level.  It will go quick because it is small, but as the levels get bigger it will take DoomCAD a while to build.  In that case, DoomCAD gives the option to turn off the nodebuilding process and use the DOS nodebuilder.  It is much quicker in DOS.  You are ready to run Doom with the wad you just created!

In addition to the level created for the tutorial, I've taken the basic structure and touched it up a bit - added a few monsters and some lighting effects to show what can be done with a little imagination.  It's not much, I just tried to make it look a little nicer.  See TUTGOOD.WAD


TroubleShooting

- One of the biggest causes of the "Above/Below Wall Texture Needed"  error is forgetting to set the ceiling and floor height of Sectors.  If you get this error, first check to see if the error makes sense.  For example, if you see that the LineDef is just part of a hallway with no change in elevation, there should be no need for an above wall texture.  So, check the neighboring Sectors and make sure that those Sectors have the right ceiling and floor heights.  You can also use the 3D preview to help quickly spot a ceiling/floor height problem.

- "Sector Not Closed" error.  For the most part, this one is easy to fix.  After you get the error, the Sector in error is highlighted.  You should be able to see if the Sector is closed.  I usually get this error when I add a Sector within another Sector.  What happens is that I remove the Sector references from a two-sided LineDef and add the new Sector, forgetting to close the other Sector that belonged to the LineDef.

 Sometimes this error will be caused by deleting a Sector by deleting its LineDefs and leaving one or more LineDefs behind.  If you want to delete a Sector, do it with the "Delete Sector" command and then delete the vertices from that Sector.  It's the surest, fastest way to delete a Sector in DoomCAD.  Be careful, and always check to make sure that you have the correct Sector selected when you wish to edit.

- When using the Prefab options be aware that you must "attach" them to something in your level.  Prefab options are made to make repetitive and time consuming constructions easier and quicker,  but you still must know what you are doing.  The prefab structures usually have one or more two-sided sidefs that don't have a right SideDef when you first put it into your level.  All you have to do is give it a right SideDef by either adding a new Sector or editing an existing Sector and trace over the line.

- When making elevators don't forget that you will need a below wall texture on the wall that you see when the elevator moves down.  The integrity check won't catch this because the elevator's floor height is the same as the neighboring Sector's when it is in it's "normal" state.  If you forget to do this, you will see the famous "Hall of Mirrors" effect.  It can look neat, but it is still considered an error.

- Make use of the status bar!!!  It makes checking brightness levels, line lengths, and floor and ceiling heights very easy.  You don't have to bring up the edit window to check these.  Just select the line/Sector/Vertex and look up at the status bar (under the menu) to see what its attributes are.

Be patient and take your time building new levels.  Building a quality level requires a good amount of time and effort, no matter what editor you use.  I think you will find that DoomCAD's interface is easier to work with than most other editors, and is intelligently organized.  It will take some practice and experimentation before you get a feel for how everything works, but it will be worth it!

Thanks,

Terry Henning