Difference between revisions of "Damaging floor"

From DoomWiki.org

[unchecked revision][checked revision]
m (sp; wiki)
(Added context for what the tables are measuring before the tables. Originally I didn't know until I got to the last paragraph of this section.)
(47 intermediate revisions by 23 users not shown)
Line 1: Line 1:
'''Damaging floors''' appear in [[Doom]], [[Heretic]], [[Hexen]], and [[Strife]]. They form part of the "dangerous Doom environment" described in the game booklets:
+
[[Image:NukagePoolE1M1.png|240px|thumb|A nukage pool in Doom [[E1M1: Hangar (Doom)|E1M1]]]]
 +
'''Damaging floors''' are floors ([[sector]]s or groups of sectors) that damage the player while the player stands on them. They form part of the "dangerous Doom environment" described in the game booklets:
 +
 
 
:''Slime and other radioactive waste: Many of the areas in Doom contain pools of dangerous liquids that will damage you if you walk through them. There are several varieties of waste, each doing increasing damage. If it looks fluid, beware!''
 
:''Slime and other radioactive waste: Many of the areas in Doom contain pools of dangerous liquids that will damage you if you walk through them. There are several varieties of waste, each doing increasing damage. If it looks fluid, beware!''
  
Despite the damaging effects, it is often necessary to cross a damaging floor during gameplay. Crossing as quickly as possible minimizes the damage. If the [[player]] has [[armor]], then the damage is split between [[health]] and armor. Also, the [[radiation suit]] protects the player from damaging floors for a limited time.  
+
Because the damaging effects are determined independently from the [[flat]]s used on their area, they may be used to stand for different types of hazards and substances, according to the graphics chosen for the floor, such as green slime or [[Wikipedia:Lava|lava]], and any associated hints. Flaming wall textures may reinforce the idea of a very hot area, radioactive warning signs that "nukage" has leaked, and a level name like [[E1M3: Toxin Refinery (Doom)|Toxin Refinery]] that hazardous organic substances abound.
  
[[Monsters]] are not affected by damaging floors.
+
Despite the damaging effects, it is often necessary to cross a damaging floor during play. Crossing as quickly as possible minimizes the damage. If the [[player]] has [[armors|armor]], then damage is split between [[health]] and armor as normal. Also, the [[radiation shielding suit]] protects the player from damaging floors for a limited time.
 +
 
 +
Damage is applied periodically, on every 32nd [[tic|gametic]] (approximately 0.91 seconds). The check is performed against the global level time; thus it is equally possible to receive damage immediately upon touching the sector's floor, or to cross whole sectors completely unscathed. Because of their strict periodicity, the damaging effects can be avoided by continuous [[jumping]] in those engines that employ it (such as [[Hexen]] or some [[source port]]s).
 +
 
 +
Damaging floors do not affect [[monster]]s.
  
 
==Technical information==
 
==Technical information==
The fluid appearance is implemented using [[animated flat]]s. These include [[nukage]], [[lava]], [[blood]], etc. Flats are also defined to implement blue water, but this is not usually damaging.
+
The fluid appearance is implemented using [[animated flat]]s, which include nukage, lava, [[blood]], and the like. Flats are also defined to implement blue water and sludge water, but these are not usually damaging.
  
It is not the fluid appearance, however, that makes a floor damaging. The level designer assigns a special ''type'' value to make the floor of a [[sector]] damaging when the player is within the typed sector.
+
In Doom and Heretic, the appearance of the flat does not control whether the floor is damaging. The level designer assigns a special ''type'' value to make the floor of a [[sector]] damaging when the player is within the typed sector. Thus, there can be (and are) damaging floors that do not have the usual [[animated flat|fluid appearance]], and sometimes a floor expected to be damaging because of its texture is not damaging. For instance, in [[E2M2: Containment Area (Doom)|E2M2: Containment Area]] and [[E2M7: Spawning Vats (Doom)|E2M7: Spawning Vats]], there is a rare example of a non-[[animated flat|animated]] damaging floor, using a row of intense blue lights in a trench.
  
 +
In [[Hexen]], some flats are hard-coded to do damage instead of also needing a sector type (allowing the sector to have another unrelated sector type).
 +
 +
===Damaging floor types===
 
The following damaging floor types are found in Doom:
 
The following damaging floor types are found in Doom:
 
 
{| {{prettytable}}
 
{| {{prettytable}}
 
|-
 
|-
 
! Sector type
 
! Sector type
! Damage per second
+
! Damage per cycle
 
! [[Doom source code]] comment
 
! [[Doom source code]] comment
 
! Other effects
 
! Other effects
Line 36: Line 44:
 
| Strobe hurt
 
| Strobe hurt
 
| Light blinks each 0.5 second
 
| Light blinks each 0.5 second
 +
|-
 +
| align="center"| 11
 +
| align="center"| Same as type 5 until health is < 11%
 +
| End of game hell hack
 +
| Level ends when health is below 11%. God mode cheat is nullified
 
|}
 
|}
 +
(Damage is halved, rounded down, at [[skill level]] 1.)
  
(Damage is halved, rounded down, at [[skill level]] 1.) Thus, there can be (and are) damaging floors that do not have the usual fluid appearance, and sometimes a floor expected to be damaging because of its texture is not damaging.
+
===Sector type 11===
 +
A specialized damaging floor type (11) is occasionally used in the last room of a level (e.g. [[MAP11: Hunted]]). Damage is inflicted as with type 5, but when the player's health drops below 11%, the level ends. The player's health cannot drop below 1% while within this type of sector, a fact that has strange consequences when the player is not touching the sector floor &ndash; so long as the player's mid-point remains in such a sector, he becomes essentially invulnerable after his health is reduced to 1%, but will not exit because that check is only made if he is on the floor.
  
A specialized damaging floor type (11) is occasionally used in the last room of a level (e.g. [[E1M8: Phobos Anomaly]]). Damage is inflicted as with type 5, but when the player's health drops below 11%, the level ends. Play then proceeds to the next level, if applicable, with the player's health restored to 1% if it has fallen to 0% or lower. These sectors cancel the invulnerability bestowed by the [[Doom cheat codes#All Doom versions|God mode cheat]], although the [[Invulnerability|invulnerability powerup]] is not affected.
+
These sectors cancel the invulnerability bestowed by the [[Doom cheat codes#All Doom versions|God mode cheat]], although the [[Invulnerability|invulnerability powerup]] is not affected.
  
 
==="Leaky" radiation suits===
 
==="Leaky" radiation suits===
 
+
For the 20% damage types (4 and 16), there is a small chance (6/256 &asymp; 2.3%) that the player will be damaged during a given check, even with a radiation suit. Considering the possible events independently, and averaging over time (0 through 31 tics remaining until the first check), [[Wikipedia:Binomial distribution|probability theory]] gives the cumulative effect over the full duration of a radsuit (60 seconds) as:
For the 20% damage types (4 and 16), there is a small chance (6/256 &asymp; 2.3%) that the player will be damaged during a given second even if he is wearing a radiation suit. If each of the 60 seconds is considered independently, [[Wikipedia:Binomial distribution|probability theory]] gives the cumulative effect as:
 
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 52: Line 66:
 
|-
 
|-
 
| 0%
 
| 0%
| 24.10%
+
| 21.09%
 
|-
 
|-
 
| 20%
 
| 20%
| 34.70%
+
| 33.22%
 
|-
 
|-
 
| 40%
 
| 40%
| 24.57%
+
| 25.76%
 
|-
 
|-
 
| 60%
 
| 60%
| 11.40%
+
| 13.11%
 
|-
 
|-
 
| 80%
 
| 80%
| 3.90%
+
| 4.93%
 
|-
 
|-
 
| 100%
 
| 100%
| 1.05%
+
| 1.46%
 
|-
 
|-
 
| 120%
 
| 120%
| 0.23%
+
| 0.35%
 
|-
 
|-
 
| 140%
 
| 140%
| 0.04%
+
| 0.07%
 
|-
 
|-
 
| 160% or more
 
| 160% or more
Line 79: Line 93:
 
|}
 
|}
  
Due to the periodicity of Doom's [[pseudorandom number generator]], however, it can be shown that the player instead takes damage as follows:
+
Due to the periodicity of Doom's [[pseudorandom number generator]], however, the player instead takes damage as follows:
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 87: Line 101:
 
|-
 
|-
 
| 0%
 
| 0%
| 9.77%
+
| 5.37%
 
|-
 
|-
 
| 20%
 
| 20%
Line 93: Line 107:
 
|-
 
|-
 
| 40%
 
| 40%
| 12.11%
+
| 14.31%
 
|-
 
|-
 
| 60%
 
| 60%
Line 99: Line 113:
 
|-
 
|-
 
| 80%
 
| 80%
| 1.56%
+
| 3.76%
 
|}
 
|}
  
The latter result presumably should not be accepted at face value, since it assumes that 60 numbers are pulled from the table consecutively, whereas in a real level, other phenomena (such as roaming monsters and [[Sector#Vanilla Doom|blinking lights]]) would sometimes call the generator as well. Moreover, in stock maps, it is rarely necessary to remain on the same damaging floor for 60 seconds. Testing seems to indicate that a single suit rarely "leaks" more than once.
+
The latter result presumably should not be accepted at face value, because it assumes that numbers are read from {{c|m_random.c}} consecutively; in a real level, other phenomena (such as roaming monsters and [[sector#Vanilla Doom|blinking lights]]) would frequently call the generator as well. Moreover, in stock maps, it is rarely necessary to remain on the same damaging floor for 60 seconds. Testing seems to fit the independent model better, i.e. the probability is similar for one hit and for two hits, but above that, it drops sharply.
 +
 
 +
==Trivia==
 +
The damaging floor effect is perfectly synchronous with the [[weapon]] bobbing logic, because both of these employ global ''leveltime'' checks for timing. Specifically, the damage is applied at moments when the weapon is in either top point of its cycling motion. <ref>{{dwforums|31902|Nukage rhythm}}</ref> It is unclear whether this was intentional or not.
 +
 
 +
In the [[press release beta]] version of Doom, being inside a damaging sector caused the player to make a sustained [[ouch face]] on the [[status bar]]. In an interesting and likely coincidental reversion, the [[Sony PlayStation]] version of Doom has the player grimace in this same situation, but using the face picture usually employed for direct frontal damage or prolonged weapons fire.
 +
 
 +
==References==
 +
<references/>
  
 
==Sources==
 
==Sources==
* [[Unofficial Doom Specs]]
+
*[[Unofficial Doom Specs]]
  
 
[[Category:Hazards]]
 
[[Category:Hazards]]
 +
[[Category: Doom engine]]

Revision as of 09:47, 15 May 2020

A nukage pool in Doom E1M1

Damaging floors are floors (sectors or groups of sectors) that damage the player while the player stands on them. They form part of the "dangerous Doom environment" described in the game booklets:

Slime and other radioactive waste: Many of the areas in Doom contain pools of dangerous liquids that will damage you if you walk through them. There are several varieties of waste, each doing increasing damage. If it looks fluid, beware!

Because the damaging effects are determined independently from the flats used on their area, they may be used to stand for different types of hazards and substances, according to the graphics chosen for the floor, such as green slime or lava, and any associated hints. Flaming wall textures may reinforce the idea of a very hot area, radioactive warning signs that "nukage" has leaked, and a level name like Toxin Refinery that hazardous organic substances abound.

Despite the damaging effects, it is often necessary to cross a damaging floor during play. Crossing as quickly as possible minimizes the damage. If the player has armor, then damage is split between health and armor as normal. Also, the radiation shielding suit protects the player from damaging floors for a limited time.

Damage is applied periodically, on every 32nd gametic (approximately 0.91 seconds). The check is performed against the global level time; thus it is equally possible to receive damage immediately upon touching the sector's floor, or to cross whole sectors completely unscathed. Because of their strict periodicity, the damaging effects can be avoided by continuous jumping in those engines that employ it (such as Hexen or some source ports).

Damaging floors do not affect monsters.

Technical information

The fluid appearance is implemented using animated flats, which include nukage, lava, blood, and the like. Flats are also defined to implement blue water and sludge water, but these are not usually damaging.

In Doom and Heretic, the appearance of the flat does not control whether the floor is damaging. The level designer assigns a special type value to make the floor of a sector damaging when the player is within the typed sector. Thus, there can be (and are) damaging floors that do not have the usual fluid appearance, and sometimes a floor expected to be damaging because of its texture is not damaging. For instance, in E2M2: Containment Area and E2M7: Spawning Vats, there is a rare example of a non-animated damaging floor, using a row of intense blue lights in a trench.

In Hexen, some flats are hard-coded to do damage instead of also needing a sector type (allowing the sector to have another unrelated sector type).

Damaging floor types

The following damaging floor types are found in Doom:

Sector type Damage per cycle Doom source code comment Other effects
7 5% Nukage damage
5 10% Hellslime damage
16 20% Super hellslime damage
4 20% Strobe hurt Light blinks each 0.5 second
11 Same as type 5 until health is < 11% End of game hell hack Level ends when health is below 11%. God mode cheat is nullified

(Damage is halved, rounded down, at skill level 1.)

Sector type 11

A specialized damaging floor type (11) is occasionally used in the last room of a level (e.g. MAP11: Hunted). Damage is inflicted as with type 5, but when the player's health drops below 11%, the level ends. The player's health cannot drop below 1% while within this type of sector, a fact that has strange consequences when the player is not touching the sector floor – so long as the player's mid-point remains in such a sector, he becomes essentially invulnerable after his health is reduced to 1%, but will not exit because that check is only made if he is on the floor.

These sectors cancel the invulnerability bestowed by the God mode cheat, although the invulnerability powerup is not affected.

"Leaky" radiation suits

For the 20% damage types (4 and 16), there is a small chance (6/256 ≈ 2.3%) that the player will be damaged during a given check, even with a radiation suit. Considering the possible events independently, and averaging over time (0 through 31 tics remaining until the first check), probability theory gives the cumulative effect over the full duration of a radsuit (60 seconds) as:

Total damage Probability
0% 21.09%
20% 33.22%
40% 25.76%
60% 13.11%
80% 4.93%
100% 1.46%
120% 0.35%
140% 0.07%
160% or more 0.01%

Due to the periodicity of Doom's pseudorandom number generator, however, the player instead takes damage as follows:

Total damage Probability
0% 5.37%
20% 59.77%
40% 14.31%
60% 16.80%
80% 3.76%

The latter result presumably should not be accepted at face value, because it assumes that numbers are read from m_random.c consecutively; in a real level, other phenomena (such as roaming monsters and blinking lights) would frequently call the generator as well. Moreover, in stock maps, it is rarely necessary to remain on the same damaging floor for 60 seconds. Testing seems to fit the independent model better, i.e. the probability is similar for one hit and for two hits, but above that, it drops sharply.

Trivia

The damaging floor effect is perfectly synchronous with the weapon bobbing logic, because both of these employ global leveltime checks for timing. Specifically, the damage is applied at moments when the weapon is in either top point of its cycling motion. [1] It is unclear whether this was intentional or not.

In the press release beta version of Doom, being inside a damaging sector caused the player to make a sustained ouch face on the status bar. In an interesting and likely coincidental reversion, the Sony PlayStation version of Doom has the player grimace in this same situation, but using the face picture usually employed for direct frontal damage or prolonged weapons fire.

References

  1. Nukage rhythm

Sources