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 BitEditor SettingDescription
0x1ImpassableMonsters, players, and projectiles can't cross
0x2Block MonstersMonsters can't cross
0x4Double SidedTextures can be defined for both sides
0x8Upper UnpeggedAlign upper texture from ceiling origin
0x10Lower UnpeggedAlign lower texture from ceiling origin
0x20Show 1-sided on AutomapShow line as one-sided with automap (good for secrets)
0x40Block SoundPrevent 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.
0x80Never Show on AutomapNever show the linedef on automap
0x100Always Show on AutomapAlways show the linedef on automap
0x200Render Middle TextureShow middle texture (good for windows and cages)
0x400No OcclusionExplicitly allow geometry behind linedef to be rendered
0x800Block ProjectilesBlock all projectiles, but not hitscans, from passing
0x1000Trigger By Dead ThingActivate line action by monster death, monster line crossing, or monster interaction
0x20000Scroll LeftScroll texture to the left
0x40000Scroll RightScroll texture to the right
0x80000Scroll UpScroll texture upward
0x100000Scroll DownScroll texture downward
0x200000Peg Upper Wall ColorBegin upper wall gradient from bottom of upper wall
0x400000Peg Lower Wall ColorEnd lower wall gradient at the top of the lower wall
0x800000Use Wall Color BlendingEnable colored gradients on wall, otherwise use thing color for the wall
0x1000000Trigger Only Front SideLinedef action can only be activated from the front side
0x2000000Hide Special on AutomapHide that the linedef can be activated on automap
0x4000000Flip Upper Pegged ColorFlip upper wall gradient direction
0x8000000Block 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)
0x40000000Mirror Texture HorizontalMirror every other texture tile horizontally
0x80000000Mirror Texture VerticalFlip 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 BitNameDescription
0x2000Switch Decal Stored in UpperThis signifies the switch graphic is in upper texture spot
0x4000Switch Decal Stored in LowerThis signifies the switch graphic is in lower texture spot
0x8000Switch Displayed on UpperThis signifies the switch graphic is displayed on the upper texture
0x10000Switch Displayed on LowerThis 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 – 0xFFActions 0 to 255These are the normal actions (doors, floors, ect...)
0x100 – 0x1FFActions 256 to 511These are the actions which reference macros
0x200Red KeyRequires a red key to activate
0x400Blue KeyRequires a blue key to activate
0x800Yellow KeyRequires a yellow key to activate
0x1000CrossActivated by crossing the linedef
0x2000ShootActivated by shooting with a hitscan weapon
0x4000UseActivated by the player's use action
0x8000RepeatableCan 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.