Difference between revisions of "Sidedef"

From DoomWiki.org

[unchecked revision][unchecked revision]
m (link wall texture)
m (fmt table)
Line 17: Line 17:
 
Sidedefs are stored in WAD files in the following format:
 
Sidedefs are stored in WAD files in the following format:
  
<table border cellpadding=2>
+
<table {{prettytable}}>
 
<tr align=center>
 
<tr align=center>
  <td>size (bytes)</td><td>description</td>
+
  <th>Size (bytes)</th><th>Description</th>
 
</tr>
 
</tr>
 
<tr align=center>
 
<tr align=center>

Revision as of 07:54, 25 September 2005

A sidedef contains the wall texture data for each linedef (though sidedefs do not reference linedefs directly, indeed it is the other way around). Each sidedef contains texture data, offsets for the textures and the number of the sector it references (this is how sectors get their 'shape').

Upper Texture - This contains the name of a texture that will be displayed on the border between a sector and its neighboring ceiling of a different height. If the linedef that contains this sidedef is one sided this field is meaningless.

Middle Texture - On one sided linedefs this will be the only texture displayed; as the main wall texture. On two sided linedefs this will be displayed as a 'floating' texture which the player is able to walk through. Middle floating textures can be used to achieve a variety of faux 3D effects such as 3D bridges. Note that middle floating textures will only tile horizontally and not vertically, where they only repeat once.

Lower Texture - This performs a similar function to the upper texture; the lower texture is displayed on the border between a sector and its neighboring floor of a different height.

X Offset - How many pixels to shift all the sidedef textures on the X axis (right or left).

Y Offset - How many pixels to shift all the sidedef textures on the Y axis (up or down).

Regardless of the texture used on a sidedef, each sidedef will still take up the same amount of space since textures are referred to by name (in Doomstring format).

Sidedef Structure

Doom level format

Sidedefs are stored in WAD files in the following format:

Size (bytes)Description
2x offset
2y offset
8name of upper texture
8name of lower texture
8name of middle texture
2Sector number this sidedef 'faces'

Sidedefs are exactly the same in ZDoom/Hexen format as they are in the original Doom format.