Floor over floor

From SRB2 Wiki
(Redirected from FOF)
Jump to: navigation, search
A 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.

Creating FOFs

Control sector settings
Ceiling height Top of FOF
Ceiling flat Flat on the top of the FOF
Floor height Bottom of FOF
Floor flat Flat on the bottom of the FOF
Light level (Shadowcasting FOFs only) Light is applied below the FOF
Control linedef settings
Middle texture Texture used for the sides of the FOF

FOFs are added to sectors by employing special linedef effects, such as linedef type 100 (FOF: Solid, Opaque, Shadowcasting). The special linedef should be tagged to the sector that the FOF is to be created in, and should be part of a control sector whose floor and ceiling heights specify the heights of the top and bottom of the FOF, respectively. The floor and ceiling flats of the control sector will be rendered respectively on the top and bottom of the FOF, and the middle texture of the front sidedef of the control linedef will be rendered on all visible edges of the FOF.

An FOF's ceiling height should be above or equal to that of 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, this will cause the collision and rendering of the FOF to immediately change to height 0, but the FOF will still be tangible.

Multiple FOFs can be placed in the same sector; see Stacking multiple FOFs.

Other uses of FOFs

In addition to creating floating platforms, FOFs can be employed to achieve a variety of other effects.

Water

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. Slime and lava are also created in this fashion, simply by setting the control sector's special effect to damage the player. To achieve the tinted coloring of water as used in the official game, a colormap (linedef type 606) must also be tagged to the control sector.

Movement effects

Several special effects influence the player only when the character is within a certain area of a sector. Wind effects are notable examples. This is achieved by creating an invisible, intangible FOF and then applying special effects to it. The player cannot see the boundary of this region, but will only experience any tagged effects upon entering it.

Control linedef flags

  • If the No Sonic, No Tails, or No Knuckles flags are selected, the FOF will not appear for Sonic, Tails, or Knuckles, respectively.
  • If the Slope Skew flag is selected on a solid FOF, it will block only the player, but not other Objects.
  • If the No Midtexture Skew flag is selected on a solid FOF, it will block all Objects except the player.
  • If the Transfer Line flag is selected, the FOF checks each linedef of the control sector separately for special attributes. This can be used to make multi-property FOFs that can have different textures, effects and flags for each side.

Sample

Example WAD: ex_ld100_fofsolidopaqueshadow.wad

List of FOF linedef types

  Linedef typesFloor over floor [view]
Solid:
Solid, Opaque, ShadowcastingSolid, Opaque, Non-ShadowcastingSolid, TranslucentSolid, Sides OnlySolid, No SidesSolid, InvisibleIntangible from Bottom, OpaqueIntangible from Bottom, TranslucentIntangible from Bottom, Translucent, No SidesIntangible from Top, OpaqueIntangible from Top, TranslucentIntangible from Top, Translucent, No SidesOnly Tangible from Sides
Intangible:
Water, OpaqueWater, TranslucentWater, Opaque, No SidesWater, Translucent, No SidesGoo Water, TranslucentGoo Water, Translucent, No SidesIntangible, OpaqueIntangible, TranslucentIntangible, Sides OnlyIntangible, Invisible
Moving:
Air BobbingAir Bobbing (Adjustable)Reverse Air Bobbing (Adjustable)Floating, BobbingRising Platform, Solid, Opaque, ShadowcastingRising Platform, Solid, Opaque, Non-ShadowcastingRising Platform, Solid, TranslucentRising Platform, Solid, InvisibleRising Platform, Intangible from Bottom, OpaqueRising Platform, Intangible from Bottom, Translucent
Crumbling:
Crumbling, RespawnCrumbling, No RespawnCrumbling, Respawn, Intangible from BottomCrumbling, No Respawn, Intangible from BottomCrumbling, Respawn, Intangible from Bottom, TranslucentCrumbling, No Respawn, Intangible from Bottom, TranslucentCrumbling, Respawn, Floating, BobbingCrumbling, No Respawn, Floating, BobbingCrumbling, Respawn, FloatingCrumbling, No Respawn, FloatingCrumbling, Respawn, Air Bobbing
Special:
Light BlockHalf Light BlockFog BlockMario BlockThwomp BlockShatter BlockShatter Block, TranslucentBustable BlockSpin-Bustable BlockSpin-Bustable Block, TranslucentQuicksandLaserCustom FOF