From SRB2 Wiki
Jump to navigation Jump to search
A section of a map with a sector highlighted.

A sector is a map component that acts as a two-dimensional region of a map. The shape of sectors is defined by linedefs that enclose it. Sectors are used to create areas with different floor and ceiling textures, and different floor and ceiling heights. Every sector has a number, which is used to identify it.

Sector geometry

A sector can be any closed region of the plane of a map, and is bounded by linedefs. The sidedefs of these linedefs determine which sector describes a given region, and hence several disjoint regions may in fact be part of the same sector.

This also creates the possibility of constructing a closed region which belongs to multiple sectors (by setting the sector references of sidedefs facing the same region to different values), but this is illegal and will cause crashes or visual glitches. Map editors often have bugs that can cause this situation to arise, which often confuses beginning map editors who have yet to learn exactly which actions lead to such problems. For a discussion of how to avoid this, or how to correct it when it occurs, see Sidedef.


The sectors of a map are stored in the SECTORS lump as a list. Each sector has a 26-byte entry consisting of the following:

Bytes Data type Description
0–1 Signed 16-bit integer Floor height
2–3 Signed 16-bit integer Ceiling height
4–11 8-character string Floor flat
12–19 8-character string Ceiling flat
20–21 Signed 16-bit integer Brightness
22–23 Signed 16-bit integer Special
24–25 Signed 16-bit integer Tag

Sector properties

Zone Builder's sector properties window. Click to enlarge.

Every sector has a number of properties associated with it that determine how it appears in-game. Their meanings are detailed below.

Floor and ceiling flats

These properties are used to select which flats are drawn on the floor and ceiling of the sector. For example, setting the floor flat to GFZFLR02 would cause the floor of the sector to be drawn using the grassy texture used in Greenflower Zone. Additionally, the special flat F_SKY1 causes the current sky to be drawn in place of a normal texture, using a somewhat different rendering process to achieve the illusion of an open space.

Floor and ceiling heights

The floor and ceiling heights, whose values can be anywhere from -32768 to 32767, set the levels of the top and bottom of the space within a sector that can be occupied by the player. In order to understand this, it is important to realize that every sector extends entirely to the top and bottom of the level, but with everywhere above the ceiling level and below that of the floor being solid. Thus the height of a sector is equal to the difference of the floor and ceiling heights. In order to create sectors with multiple floors and ceilings at different heights, floors-over-floors (FOFs) are required, but this is somewhat more complicated.


The brightness controls the level of light in a sector. 0 is complete darkness and 255 is maximum brightness. Note that in Software, there are actually only 32 levels of brightness, which correspond to the first 32 rows of the COLORMAP lump:

Colormap # Brightness
0 248–255
1 240–247
2 232–239
3 224–231
4 216–223
5 208–215
6 200–207
7 192–199
Colormap # Brightness
8 184–191
9 176–183
10 168–175
11 160–167
12 152–159
13 144–151
14 136–143
15 128–135
Colormap # Brightness
16 120–127
17 112–119
18 104–111
19 96–103
20 88–95
21 80–87
22 72–79
23 64–71
Colormap # Brightness
24 56–63
25 48–55
26 40–47
27 32–39
28 24–31
29 16–23
30 8–15
31 0–7


See also: Sector types

The sector special is a number that sets the special effect applied to a sector, such as Instant Kill or the Exit Sector. Up to four sector specials can be applied at once; however, only one from each group can be used at a time. To use multiple sector effects like this, add the sector special numbers together.


See also: Tagging

This is a number chosen by the map designer that associates sector(s) with linedef(s) to achieve special effects. Linedefs and sectors whose tags match can affect one another, most commonly with the linedef's effect property engendering special behavior in the so-called "target" sector.

  Map components [view]