Floor over floor
A floor over floor (FOF), or 3D block, is a platform that can be both stood upon and walked underneath. Due to the nature of the Doom engine, a normal sector has only one floor and ceiling, but SRB2 builds upon Doom Legacy's FOF support to allow the creation of the multi-leveled environments that are essential for platforming games.
FOFs are added to sectors by employing special linedef effects, such as linedef type 100 (FOF: Solid, Opaque, Shadowcasting). The linedef type numbers for FOFs are in the 100s and 200s. The linedef with the FOF effect (which is called the control linedef) should be tagged to the sector(s) that the FOF should appear in, and should be part of a control sector whose floor and ceiling heights specify the heights of the bottom and top of the FOF, respectively. The floor and ceiling flats of the control sector will be rendered on the bottom and top of the FOF, respectively, and the middle texture of the front sidedef of the control linedef will be rendered on all visible edges of the FOF. The Y offset for all of the FOF's textures is determined by the control linedef's Y offset, whereas the X offset is set independently on each in-level linedef of the target sector(s). If the FOF is shadowcasting, the light level of the control sector determines the light level that is used below the FOF in the target sector(s), whereas the light level of the target sector(s) will be used above the FOF.
An FOF's ceiling height should be above or equal to its floor height – if the ceiling height is found to be below the floor height on map load, SRB2 will automatically flip these around to be correct, but will still display an error message in the console. However, if an FOF is given a negative height at runtime (e.g., by lowering the ceiling below the floor with a linedef executor), this will cause the collision and rendering of the FOF to act as if it had a height of 0, but the FOF will still be tangible.
Multiple FOFs can be placed in the same sector; see Stacking multiple FOFs.
|Control sector settings|
|Ceiling height||Top height of the FOF|
|Ceiling flat||Flat displayed on the top of the FOF|
|Floor height||Bottom height of the FOF|
|Floor flat||Flat displayed on the bottom of the FOF|
|Light level||(Shadowcasting FOFs only) Light level below the FOF|
|Control linedef settings|
|Middle texture||Texture used for the sides of the FOF|
|Front Y offset||Y offset of the FOF's textures|
|In-level linedef settings|
|Front X offset||X offset of the FOF's texture on this linedef|
Control linedef flags
- If Flag  / Slope Skew / Effect 1 is selected on a solid FOF, it will block only the player, but not other Objects.
- If Flag  / No Midtexture Skew / Effect 2 is selected on a solid FOF, it will block all Objects except the player.
- If Flag  / Upper Unpegged is selected on an FOF, its textures will be skewed towards the surface they are pegged to.
- If Flag  / Transfer Line is selected, each side of the FOF can have its own properties, rather than copying the properties of the control linedef. This is done by associating each side of the FOF with one linedef of the control sector, which controls its properties. This effect can be used to make multi-property FOFs that can have different textures, effects and flags for each side.
Other uses of FOFs
In addition to creating floating platforms, FOFs can be employed to achieve a variety of other effects.
The most important of these is the creation of water. If the FOF effect is a water type – for example, linedef type 120 – then, rather than extra floors and ceilings being created at the heights specified by the control sector, the region between these heights within the target sector will be filled with water. To achieve the tinted coloring of water as used in SRB2's official levels, a colormap effect (linedef type 606) must be tagged to the FOF control sector. Other liquids such as slime and lava are also created in this fashion – their appearance is controlled by the tint of the colormap and the flats and textures used, while damage effects are created by giving the FOF control sector the corresponding damage sector type. The bouyant effect of the goo seen in Techno Hill Zone is created by using special linedef types, such as linedef type 124.
In some cases, it is desirable to have certain special effects affect the player only when the character is within a certain area of a sector. Wind effects are a notable example. This can be achieved by creating an invisible, intangible FOF and then applying special effects to it. The player cannot see the boundary of this FOF, but will only experience any tagged effects upon entering it.
Light and fog effects
Light blocks (linedef types 200 and 201) can be used to give certain areas within a sector a different light level, while fog blocks (linedef type 202) can be used to apply a colormap only to certain areas within a sector.
- Example file: ex_ld100_fofsolidopaqueshadow.wad (MAP01)
- This example WAD shows how a simple solid, shadowcasting FOF (linedef type 100) is constructed.
|How to use|