Difference between revisions of "Linedef"

From DoomWiki.org

[unchecked revision][unchecked revision]
m (wikify)
m (fmt tables)
Line 19: Line 19:
 
<table cellpadding="2" cellspacing="2">
 
<table cellpadding="2" cellspacing="2">
 
<tr>
 
<tr>
<td align="center">ZDoom/Hexen<br>
+
<th align="center">ZDoom/Hexen<br>
</td>
+
</th>
<td align="center">Doom<br>
+
<th align="center">Doom<br>
</td>
+
</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
 
<td valign="top">
 
<td valign="top">
<table border="1" cellpadding="2" cellspacing="2">
+
<table {{prettytable}}>
  
 
<tr>
 
<tr>
<td align="center">Offset<br>
+
<th align="center">Offset<br>
</td>
+
</th>
<td align="center">Bytes<br>
+
<th align="center">Bytes<br>
</td>
+
</th>
<td align="center">Description<br>
+
<th align="center">Description<br>
</td>
+
</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 127: Line 127:
 
</td>
 
</td>
 
<td valign="top">
 
<td valign="top">
<table border="1" cellpadding="2" cellspacing="2">
+
<table {{prettytable}}>
 
<tr>
 
<tr>
<td align="center">Offset<br>
+
<th align="center">Offset<br>
</td>
+
</th>
<td align="center">Bytes<br>
+
<th align="center">Bytes<br>
</td>
+
</th>
<td align="center">Description<br>
+
<th align="center">Description<br>
</td>
+
</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 194: Line 194:
 
<br>
 
<br>
  
====Linedef Flags====
+
===Linedef Flags===
  
Linedefs also contain a two-byte (16 bits) field reserved for various flags.  Flags are as follows:
+
Linedefs contain a two-byte (16 bit) field reserved for various flags.  Flags are as follows:
  
<table border="1" cellpadding="2" cellspacing="2">
+
<table {{prettytable}}>
 
<tr>
 
<tr>
<td align="center" valign="top">Bit<br>
+
<th align="center" valign="top">Bit<br>
</td>
+
</th>
<td align="center" valign="top">Hex<br>
+
<th align="center" valign="top">Hex<br>
</td>
+
</th>
<td align="center" valign="top">Description<br>
+
<th align="center" valign="top">Description<br>
</td>
+
</th>
<td valign="top">ZDoom/Hexen ONLY<br>
+
<th valign="top">ZDoom/Hexen ONLY<br>
</td>
+
</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>

Revision as of 07:51, 25 September 2005

Linedefs are what make up the 'shape' (for lack of a better word) of your map. Every linedef is between two vertices and contains one or two sidedefs (which contain texture data). There are two major purposes of linedefs. The first is to give your map a definitive boundary between the player and the void (any area of a map behind a one-sided linedef is considered void space), and the second is to trigger action specials. Linedefs are also used to construct the boundaries of sectors; a new sector is needed any time there is a change in floor or ceiling height or texture, light level, or sector tag or type.

There are three ways to trigger an action:

  1. walkover
  2. "use" (or "push") (with the space bar, by default)
  3. shoot (with an impact weapon)

Which of these applies depends on the line type number.

The specified action will take place in the sector or sectors that have the same tag number as the linedef. Exceptions to this include local doors (which act on the sector on the other side of the line), special effects that apply to the linedef itself, and exit level.

Most actions can be specified as either once-only or repeating (by using different line types).

See linedef types for a listing of all types.

Linedef Structure

Doom level format

For the more technical you may wish to know the actual structure that all linedefs have should you decide to make some sort of WAD utility.

ZDoom/Hexen
Doom
Offset
Bytes
Description
0
2
Start Vertex
2
2
End Vertex
4
2
Flags
6
2
Left Sidedef
8
2
Right Sidedef
10
1
Special type #
11
1
Argument 1
12
1
Argument 2
13
1
Argument 3
14
1
Argument 4
15
1
Argument 5

</td> <tr> <td align="center">8
</td> <td align="center">2
</td> <td>Left Sidedef
</td>

<tr> <td align="center">10
</td> <td align="center">2
</td> <td>Right Sidedef
</td> </tr> <tr> <td align="center">12
</td> <td align="center">2
</td> <td>Special type #
</td> </tr> </table>
</td> </tr> </table>

Linedef Flags

Linedefs contain a two-byte (16 bit) field reserved for various flags. Flags are as follows:

Offset
Bytes
Description
0
2
Start Vertex
2
2
End Vertex
4
2
Flags
62sector tag #
Bit
Hex
Description
ZDoom/Hexen ONLY
0
0x0001
blocks players and monsters

1
0x0002
blocks monsters

2
0x0004
two sided

3
0x0008
upper texture is unpegged

4
0x0010
lower texture is unpegged

5
0x0020
secret (shows as one-sided on

automap)


6
0x0040
blocks sound

7
0x0080
never shows on automap

8
0x0100
always shows on automap

9
0x0200
can be activated more than once
X
10-12
0x0400
activated when used by player
X
10-12
0x0800
activated when crossed by monster
X
10-12
0x0C00
activated when hit by projectile
X
10-12
0x1000
activated when bumped player
X
10-12
0x1400
activated crossed by projectile
X
10-12
0x1800
activated when used by player (with

pass through)

X
13
0x2000
line can be activated by players and

monsters

X
14
0x4000

X
15
0x8000
blocks everything (includes

gunshots & missiles)

X