Terrain is a feature added to the Doom engine independently by third-party developers Raven Software for their games Heretic and Hexen, and Rogue Entertainment for their title Strife: Quest for the Sigil.
A terrain engine allows the game to associate interactive qualities with particular floor and/or ceiling textures (also called flats). In Heretic and Strife, this is limited to the following:
- Spawning of splash objects varying by texture, with appropriate accompanying sound effects, when players and other allowed objects hit the floor or are damaged by it.
- Lowering of the player's view height, making the liquid floor appear to have depth without the need for hacks like fake deep water.
- Clipping of the feet of sprites in the renderer, making them appear to be partially submerged into the liquid. Monsters' and players' attacks are also made to propagate from an accordingly lower position to match this.
Heretic also allows association of a particular damage type with damage dealt by the floor, allowing a player to burst into flames when dying on lava. Both Heretic and Strife allow certain projectiles to react differently to terrain as well; in Heretic's case, some projectiles disappear when they hit a fluid; in Strife's case, grenades will stop bouncing when they come in contact with a fluid.
Hexen added the ability to also associate damaging floor effects and friction with its internal terrain bindings, and in fact replaced Doom and Heretic's sector types 4, 5, 7, 15, and 16 entirely with this capability, making all instances of the flats in its levels do the same damage or have the same friction properties consistently without intervention by the maps' designers.
The three games have the following default terrain definitions hard coded into their executable files. Heretic and Hexen only apply terrain definitions to the first flat in animated sequences, so use of the other flats in those sequences results in no reaction, even while the floor may be displaying the listed flat in the cycle. Strife on the other hand applies the effects to every flat in each sequence.
|Flat name||Terrain type||Special effects|
|FLTLAVA1||Lava||Inflicts fire damage type if sector is damaging.|
|FLTHUH1||Lava||Inflicts fire damage type if sector is damaging.|
|FLTSLUD1||Sludge||Does not play a sound in Heretic, unlike other types.|
|X_001||Lava||Inflicts 10 points of fire damage every 32 tics. Causes frozen enemies to break apart faster.|
|X_009||Sludge||A sound was added in addition to Heretic's splash effect.|
|F_033||Ice||Considered solid (no splashes, lowered view, or foot clipping), but reduces sector friction. Also causes frozen enemies to last longer.|
|F_WATR*||Water||All Strife types only make a sound on impact; there is no splash object.|
Advanced source ports such as the Eternity Engine and ZDoom externalize the definitions of terrain effects into their respective content definition languages, and allow association of additional properties with floor and ceiling textures through them.