Linedefs
A linedef (line definition) is a wall shared by two vertices. It references a sidedef (or two sidedefs if it is double sided) which contains the wall texture data for each linedef. Since not all sidedefs are unique, theoretically multiple linedefs can refer to a singular sidedef, which allows for compression routines. Sectors are formed by connected and enclosed linedefs. Additionally linedefs are used to trigger actions, which make levels more dynamic.
Line Flags
Line flags are settings and properties you can apply to linedefs. These change how the textures are rendered and how players, monsters, and projectiles interact with them. For certain flags, such as the texture scrolls, they only work on the front side of the lindef.
| Flag Bit | Editor Setting | Description |
|---|---|---|
| 0x1 | Impassable | Monsters, players, and projectiles can't cross |
| 0x2 | Block Monsters | Monsters can't cross |
| 0x4 | Double Sided | Textures can be defined for both sides |
| 0x8 | Upper Unpegged | Align upper texture from ceiling origin |
| 0x10 | Lower Unpegged | Align lower texture from ceiling origin |
| 0x20 | Show 1-sided on Automap | Show line as one-sided with automap (good for secrets) |
| 0x40 | Block Sound | Prevent sound from alerting monsters across this linedef (sound can still be heard). In practice two linedefs with this flag are required to successfully prevent an alerting sound from traveling. |
| 0x80 | Never Show on Automap | Never show the linedef on automap |
| 0x100 | Always Show on Automap | Always show the linedef on automap |
| 0x200 | Render Middle Texture | Show middle texture (good for windows and cages) |
| 0x400 | No Occlusion | Explicitly allow geometry behind linedef to be rendered |
| 0x800 | Block Projectiles | Block all projectiles, but not hitscans, from passing |
| 0x1000 | Trigger By Dead Thing | Activate line action by monster death, monster line crossing, or monster interaction |
| 0x20000 | Scroll Left | Scroll texture to the left |
| 0x40000 | Scroll Right | Scroll texture to the right |
| 0x80000 | Scroll Up | Scroll texture upward |
| 0x100000 | Scroll Down | Scroll texture downward |
| 0x200000 | Peg Upper Wall Color | Begin upper wall gradient from bottom of upper wall |
| 0x400000 | Peg Lower Wall Color | End lower wall gradient at the top of the lower wall |
| 0x800000 | Use Wall Color Blending | Enable colored gradients on wall, otherwise use thing color for the wall |
| 0x1000000 | Trigger Only Front Side | Linedef action can only be activated from the front side |
| 0x2000000 | Hide Special on Automap | Hide that the linedef can be activated on automap |
| 0x4000000 | Flip Upper Pegged Color | Flip upper wall gradient direction |
| 0x8000000 | Block Player | (Super EX+ only) Line will only block player and not other things |
| 0x10000000 | (not used) | (not used in the game) |
| 0x20000000 | (not used) | (not used in the game) |
| 0x40000000 | Mirror Texture Horizontal | Mirror every other texture tile horizontally |
| 0x80000000 | Mirror Texture Vertical | Flip every other texture tile vertically |
Additional Switch Flags
The way switches work in Doom 64 is unlike other engines, thus it was misunderstood how its switch flags for line definitions behave. Because of this map editors do not always directly edit Doom 64's switch flags, rather they have options which indirectly edit them in various ways. And sometimes flags are mislabeled as "Switch Check Height". Engine-side, however, Doom 64 has four switch flags: two to determine which texture slot the graphic is displayed on and two to determine which texture the switch will be displayed over. Each set of two flags is either for upper or lower texture, and to designate the middle texture both flags are enabled at the same time.
| Flag Bit | Name | Description |
|---|---|---|
| 0x2000 | Switch Decal Stored in Upper | This signifies the switch graphic is in upper texture spot |
| 0x4000 | Switch Decal Stored in Lower | This signifies the switch graphic is in lower texture spot |
| 0x8000 | Switch Displayed on Upper | This signifies the switch graphic is displayed on the upper texture |
| 0x10000 | Switch Displayed on Lower | This signifies the switch graphic is displayed on the lower texture |
Activation Type (Specials)
In addition to flags, linedefs have special properties which change how they can activate actions.
| Flag Bit | Editor Setting | Description |
|---|---|---|
| 0x0 – 0xFF | Actions 0 to 255 | These are the normal actions (doors, floors, ect...) |
| 0x100 – 0x1FF | Actions 256 to 511 | These are the actions which reference macros |
| 0x200 | Red Key | Requires a red key to activate |
| 0x400 | Blue Key | Requires a blue key to activate |
| 0x800 | Yellow Key | Requires a yellow key to activate |
| 0x1000 | Cross | Activated by crossing the linedef |
| 0x2000 | Shoot | Activated by shooting with a hitscan weapon |
| 0x4000 | Use | Activated by the player's use action |
| 0x8000 | Repeatable | Can be activated repeatably |
Sidedefs
As sidedefs (side definitions) require an associated linedef to be displayed within a map, editing their properties typically occurs with linedefs options themselves in editors. Each sidedef contains three texture settings (top, middle, bottom), vertical and horizontal offsets and the number of the sector it faces. A linedef will have one or two sidedefs depending if it is flagged single sided or double sided respectfully. Veritcal and horizontal offsets will also offset the position of any switches, thus allowing for switch positioning. Since not all sidedefs contain unique information in a map, it is possible to reduce the number of them with a compression routine.