Part 2, Page 1 B E G I N N E R S G U I D E T O D E U Part 2 - LineDefs, SideDefs, and Doors Assuming you have read Part 1 of this guide (you have, haven't you?), and have played around with Vertices and Lines, we'll jump right in to an explanation of the LineDef and SideDef variables. LineDefs Each LineDef has a number, and a set of two Vertices. As mentioned in Part 1, you can change the Vertices of each line. This can be handy if you want to reverse the normal Vector of the Line, just swap the first and second Vertices to flip the Line around. Each LineDef also has a set of "Flags" to describe how the Line behaves. Your DEU docs list these Flags, and they work like this: Im - Impassable by players and monsters. This is a normal wall, and you MUST have these all around the edges of your map, so that a player won't just wander off into the void. Mo - Monsters cannot cross this Line. Use this to pen 'em up someplace where they can wait to ambush your player. 2s - A two-sided wall, it can be transparent and shot through, so you can use this to make windows, or use it to make invisible walls used as triggers for doors, lifts, etc. Up - Unpeg the upper texture of a wall. Unpegging a texture means that it won't follow a Sector movement, like a rising door. Lo - Unpeg the lower texture of a wall. Se - Secret Line. This Line will appear as normal on the automap. Use it to hide the fact that a Line is a secret door, trigger, etc. So - Blocks sound. Monsters hearing gunfire will head towards it to get in on all the fun. Use this Flag on a Line to isolate sounds from those waiting imps and demons. In - Invisible on the automap. Useful for hiding the fact that a "trip-wire" Line exists. Or hide an entire Sector. What fun! Ma - Already drawn on the automap at the start of the game. You could use this on the "Player start" area, or use it to lure a player towards an area. (Ambush!) Part 2, Page 2 In addition, the Line can be one of several "Types"; D - A door. Press the spacebar to open the door. S - A switch. Press the spacebar to activate the switch. W - A walkthrough switch. Walking over the Line activates the switch. G - A gun switch. Shoot the Line to activate the switch. R - Repeatable. 1 - Works only once. Each LineDef has a "Sector Tag". This is NOT a reference to which Sector the Line is in, nor is it a reference to any specific Sector. What it IS, is a sort of key-code for when a switch is activated. A Sector that has a matching "LineDef Tag" will be activated. In parentheses next to the Sector Tag will be the number of the Sector that shares the Tag. Each LineDef also has a 1st SideDef number and 2nd SideDef number. A -1 will be displayed if there is no SideDef for these. SideDefs On each Line, the side with the normal Vector is the 1st Side, and the other is the 2nd Side. A Line that is two-sided (2s) MUST have a 2nd SideDef, or there will be trouble when you play near that line. Each SideDef has three textures associated with it: Normal texture - This is what you see when you look at a normal wall. As you've probably noticed while scrolling through the texture sprites, they are not all the same size. How do you know what size to use? Well, a big door like BIGDOOR3 will fit on a wall that measures 128 wide by 128 high. A switch panel like SW1COMP is 64 units wide, and a "door-side-strip" like DOORBLU is 8 units wide. If you make a wall higher or wider than the texture, the texture will repeat across the area. Making the wall smaller than the texture crops off the edges. Upper texture - This is what you see on a door before it raises up. You can also see this texture above a Sector that has a ceiling height lower than your current Sector, like say, above a window. Lower texture - This is what you see on a lift before it lowers. You can also see this texture below a sector that has a floor height higher than your current Sector, like the face of a step, or below a window. Tex. X offset - Moves the position of the texture on the wall horizontally. Use this to shift the texture to just the right position. Tex. Y offset - As above, but used to shift the texture vertically. Sector number - Shows what sector this SideDef is assigned to. The Sector assignment controls the height of the floor and ceiling, lighting, etc. Part 2, Page 3 Okay, let's get started on a new level E1M1. Start up DEU and type in C 1 1 and hit Enter to Create a new E1M1 map. Your map screen appears, in Thing mode, with the mouse cursor in the middle of the screen. Hit the F9 key and choose 1 - rectangle. Enter 384 for both the width and the height. You now have a square room built of four Lines, each Line with a Normal Impassable LineDef and a texture of STARTAN3 for each 1st SideDef. Each 1st SideDef is also assigned to Sector #0. Hit the "S" key to see the Sector info. Hit Enter to modify the Sector info, and change the Ceiling height to 128. Now hit "L" to get back to Line mode. LineDef #0 should be selected (the top Line of the box). If it is not, select it now. Hit the F10 key, and choose number 4 - Split LineDef (add new Vertex). This will add a new Vertex in the middle of the wall, splitting the wall Line into two separate LineDefs. Select either one of the two top Lines (LineDef #0 or LineDef #4) and use the F10 key to split the LineDef again. Hit the "V" key to get into Vertex mode, and you should see something like this: xÄÄÄÄÄÄxÄÄÄÄÄÄxÄÄÄÄÄÄx ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ xÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄx The top Line of the box is split into three sections, and we are going to make the center section a Door. A note here about Doors and Sectors; any time the map has a change in the environment, such as a height change, a lighting change, normal floor to slime pit, etc., the way the environment changes is by making a new Sector. So, our Door will have a Sector all to itself. Insert two new Vertices, directly above the two center Vertices in our top Line. Mark those two new Vertices and the two center Vertices, in a clockwise manner, and hit Insert to draw the LineDefs between them. Once you have added LineDefs to each side of our new, smaller box, Mark all four Lines and hit the Insert key to group these Lines in a new Sector. Hit the "V" key to get into Vertex mode, and your map should look like this: xÄÄÄÄÄÄx ³ ³ ³ ³ xÄÄÄÄÄÄxÄÄÄÄÄÄxÄÄÄÄÄÄx ³ ³ ³ ³ connecting wall ³ ³ ³ ³ ³ ³ ³ ³ ³ xÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄx Hit "L" to get into Line mode and select the connecting wall between the rooms. Notice that it now has a LineDef Flag of 2s, making it a two-sided wall (you could now walk through it), it has both a 1st and 2nd SideDef, with no textures assigned, and the 1st SideDef (pointing into the big room) is assigned to Sector #0, the 2nd SideDef is assigned to Sector #1. Sector #1 is going to be our door Sector. Hit the "S" key to get into Sector mode, select the small sector (#1), and change the ceiling height to 0. Zero? Yes, zero! By giving the Sector a ceiling height that is the same as the floor height, our Door starts off in the lowered postion. Part 2, Page 4 Again get into Line mode and select the connecting wall between the rooms. Hit Enter to modify the LineDef, choose 1 - Edit the LineDef, and choose 2 - Change Type. For a LineDef Type, choose 2 - Doors..., then pick the first option, 1 - DR Open Door (closes after 5 seconds). This changes that particular Line into a Door that you can open by walking up to it and hitting the spacebar. Where does this door go? Good question. Let's add another room to the north of the doorway. Scroll the map down, or zoom it out so that you have enough room above our two Sectors. Get into Vertex mode and insert four new Vertices for our new room. Mark the four new Vertices and the two Vertices from the door room, and hit Insert to add LineDefs, making the room look like this: xÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄx ³ ³ ³ ³ ³ Sector 2 ³ ³ ³ ³ new connecting wall³ ³ ³ ³ xÄÄÄÄÄÄxÄÄÄÄÄÄxÄÄÄÄÄÄx ³ ³ ³ Sec 1³ xÄÄÄÄÄÄxÄÄÄÄÄÄxÄÄÄÄÄÄx ³ ³ ³ ³ ³ ³ ³ Sector 0 ³ ³ ³ ³ ³ xÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄx Mark all six of the Lines the top room, and hit Insert to group them into a new Sector (#2). Change the ceiling height of the new Sector to 128. In Line mode, notice that the new walls have impassable LineDefs, and textures of STARTAN3. Notice that the new connecting wall has been changed to 2s (two-sided), and been given a 1st SideDef in Sector #1, and a 2nd SideDef in Sector #2. Notice also that the normal Vector points into the small room. In order for the Door to be opened from the top room, that Vector has to point into the top room. Select that new connecting wall, and use the F10 key to Flip the LineDefs. This points the Vector into the top room, while also keeping the Sector assignments legal. Modify the new connecting wall to have a LineDef Type of DR Open Door. Now let's add some textures to the door faces. Select the Door Type connecting wall Lines and give them a 1st SideDef Upper texture of BIGDOOR3. Do the same for the 2nd SideDef of those two Lines. Leave the Normal texture for these walls blank, so we can see through the doors when they slide up. Select the two side walls of the small room (Sector #1). Modify the LineDef flags to include "Lo", unpegging the lower texture for these walls. This lets the Door slide up without pulling up the walls with it. That's really all there is to adding a Door between two rooms. Insert a Player 1 Start Thing in the bottom room, and modify the north wall of the top room to be a Type S- End level switch, save your new level, and try it out! I've included my own version of this level, called RICHE1M1.WAD, with some nice textures and various Things added. Stay tuned for part 3 - Switches, tripwires, and lifts. Part 2, Page 5 A note about Sectors: Sectors really like to be composed out of enclosed spaces. If you try to make an area a Sector without marking ALL the lines that enclose that area, weird things could happen to your Sector and LineDef conditions. What to do when this happens? Well, you HAVE been saving your work with a new filename after every little step, haven't you? Thought so... If not, it IS possible to edit the Sector designations for both sides of every LineDef, but it's a big pain in the butt. Why not do it right the first time? Experiment with this one to see what I mean. A further note: The really excellent program DEU was written by Raphael Quinet and Brendon J. Wyber. They deserve beaucoup applause for making it possible for us DOOMheads to create our own Hell. Unfortunately, DEU ver 5.0 still has many un-implemented features, and a few (very few) little buggies. One of these bugs can be fixed by using Colin Reed's DOOM Node Builder program, BSP.EXE, found on CIS in Gamers LIB 7, as DMBSP.ZIP. I became very frustrated trying to design a good looking window for one of my DOOM levels, kept getting weird slices out of the sides of the window, and Colin's BSP fixed it right up. Thanks Colin! Blackfist a.k.a. Rich Dersheimer CIS 72123,1521 As always, DOOM is copyright (c) 1993 by id Software, Inc., and DOOM is also a trademark of id Software, Inc.