Linedef

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 can be assigned any of the action specials and will trigger them when a specified action occurs. You may flag linedefs to have their special executed when the player walks over the line, when the player uses the line (switches) or when the player pushes the line (similar to Quake or Quake 2 switches). Monsters may also trigger specials by walking over the line, and finally a projectile impact or cross can also trigger a special if you so desire.

Specification (Doom format)

BytesData typeDescription
0-1Unsigned shortBeginning vertex
2-3Unsigned shortEnding vertex
4-5Unsigned shortFlags
6-7Unsigned shortLine type
8-9Unsigned shortSector tag
10-11Unsigned shortRight sidedef - 0xFFFF means there is no sidedef
12-13Unsigned shortLeft sidedef - 0xFFFF means there is no sidedef

Specification (Hexen format)

BytesData TypeDescription
0-1Unsigned shortBeginning vertex
2-3Unsigned shortEnding vertex
4-5Unsigned shortFlags
6Unsigned byteAction special
7Unsigned byteAction argument 1
8Unsigned byteAction argument 2
9Unsigned byteAction argument 3
10Unsigned byteAction argument 4
11Unsigned byteAction argument 5
12-13Unsigned shortRight sidedef - 0xFFFF means there is no sidedef
14-15Unsigned shortLeft sidedef - 0xFFFF means there is no sidedef

Linedef flags

There are several conflicts in the flag list, depending on game. Map translators are used to define how values are associated to flags in a binary map. UDMF allows to solve these conflicts by not using a bitfield array but instead referring to each flag by name. UDMF also allows to define the remaining flags without having to use a function such as Line_SetIdentification, and several flags are only available in this map format.

FlagBitHexDescriptionModeUDMF nameLine_SetBlocking name
BLOCKING00x0001blocks players and monstersDoomblockingBLOCKF_CREATURES
BLOCKMONSTERS10x0002blocks monstersDoomblockmonstersBLOCKF_MONSTERS
TWOSIDED20x0004two sidedDoomtwosided
DONTPEGTOP30x0008upper texture is unpeggedDoomdontpegtop
DONTPEGBOTTOM40x0010lower texture is unpeggedDoomdontpegbottom
SECRET50x0020secret (shows as one-sided on automap)Doomsecret
SOUNDBLOCK60x0040blocks soundDoomblocksoundBLOCKF_SOUND
DONTDRAW70x0080never shows on automapDoomdontdraw
MAPPED80x0100always shows on automapDoommapped
RAILING90x0200line is a railingStrifejumpoverBLOCKF_RAILING
PASSUSE90x0200passes use actionBoompassuse
REPEAT_SPECIAL90x0200can be activated more than onceZDoomrepeatspecial
BLOCK_FLOATERS100x0400Line blocks floating monstersStrifeblockfloatingBLOCKF_FLOATERS
3DMIDTEX100x0400Actors can walk on mid texture.Eternitymidtex3d
SPAC_Use10-120x0400activated when used by playerZDoomplayeruse
SPAC_MCross10-120x0800activated when crossed by monsterZDoommonstercross
SPAC_Impact10-120x0C00activated when hit by projectileZDoomimpact
SPAC_Push10-120x1000activated when bumped by playerZDoomplayerpush
SPAC_PCross10-120x1400activated crossed by projectileZDoommissilecross
SPAC_UseThrough10-120x1800activated when used by player (with pass through)ZDoomblocking
TRANSLUCENT120x1000line is 25% translucent (alpha of 0.75)Strifetranslucent
130x2000line is 75% translucent (alpha of 0.25)Strifetransparent
MONSTERSCANACTIVATE130x2000line can be activated by players and monstersZDoommonsteractivate
BLOCK_PLAYERS140x4000blocks playersZDoomblockplayersBLOCKF_PLAYERS
BLOCKEVERYTHING150x8000blocks everything (includes gunshots & missiles)ZDoomblockeverythingBLOCKF_EVERYTHING
SPAC_Cross--activated when crossed by player (default)ZDoomplayercross
SPAC_AnyCross--activated by anything crossing itZDoomanycross
SPAC_MUse--activated by monsters using itZDoommonsteruse
SPAC_MPush--activated by monsters bumping into itZDoommonsterpush
FIRSTSIDEONLY--Line can only be triggered from the front side.ZDoomfirstsideonly
ZONEBOUNDARY--Line is a boundary for sound reverb zones.ZDoomzoneboundary
CLIP_MIDTEX--Line's mid textures are clipped to floor and ceiling (default in Strife).Strifeclipmidtex
WRAP_MIDTEX--Line's mid textures are wrapped.ZDoomwrapmidtex
CHECKSWITCHRANGE--Switches can only be activated when vertically reachable.ZDoomcheckswitchrange
BLOCKPROJECTILE--Line blocks all projectilesZDoomblockprojectilesBLOCKF_PROJECTILES
BLOCKUSE--Line blocks all use actionsZDoomblockuseBLOCKF_USE
BLOCKSIGHT--Line blocks line of sight for monstersZDoomblocksightBLOCKF_SIGHT
BLOCKHITSCAN--Line blocks hitscan attacksZDoomblockhitscanBLOCKF_HITSCAN
3DMIDTEX_IMPASS--Causes the mid texture to behave like an impassible line (projectiles pass through it). Used in conjunction with midtex3d.ZDoommidtex3dimpassible
BLOCKLANDMONSTERS--Line blocks ground-based monsters (Monsters without the FLOAT flag).ZDoomblocklandmonstersBLOCKF_LANDMONSTERS

UDMF properties

In addition to the above flags, the Universal Doom Map Format allows to set a number of properties on linedefs. Unless otherwise specified, default values for integers and float is 0, and false for booleans. They include:

NameTypeDescription
alphafloatTranslucency of this line, default is 1.0.
arg0strstringAlternate string-based version of arg0, used for named scripts.
arg0integerFirst parameter.
arg1integerSecond parameter.
arg2integerThird parameter.
arg3integerFourth parameter.
arg4integerFifth parameter.
commentstringA comment. This is purely for map authors' convenience as it is ignored by the engine.
locknumberintegerLine special is locked, see key types and LOCKDEFS.
renderstylestringRender style, can be "translucent" or "add", default is "translucent".
sidefrontintegerFront sidedef index. No default value: a linedef without a front sidedef invalidates the entire map.
sidebackintegerBack sidedef index. Default = -1 for "no back side".
specialintegerAction special for the line.
moreidsstringAdditional line tags, specified as a space-separated list of numbers, e.g., "2 666 1003 4505".

See also

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.