Secret

Most levels contain secret areas. At the end of each level, the percentage of secrets found is displayed on the intermission screen.

Secret areas are usually hidden to some extent. In many cases, there is some clue to indicate a secret area, such as an off-color wall that is actually a door. By convention, most stock levels are designed so that it is not necessary to find any of the secret areas to reach the exit. Traditionally, however, secret areas are quite helpful to the player, often containing weapons and large powerups.

A special sector type (type 9) is used to calculate the secrets percentage. The number of type 9 sectors in the level is the total number of secrets. When a player first enters a type 9 sector, the number of secrets found is incremented by one. A secret area may encompass any number of sectors, but will normally include exactly one sector of type 9 in order to give the secrets percentage a straightforward interpretation. In Doom, Doom II and Heretic, no indication is given in-game when a secret area is found, although some source ports have added a message and a sound to inform the user, as in Quake. Strife, however, has a notification worth mentioning; when the player triggers a secret sector, a sound effect called is played.

Linedefs can also have a "secret" flag bit (bit 5). This flag makes a two-sided linedef appear on the automap in red instead of yellow, that is, just like a single-sided linedef. It is typically used to hide entrances to secret areas on the automap (this happens more often in stock levels than in PWADs), but has nothing to do with the calculation of the secrets percentage. In addition, a linedef of type 1 (standard push door) cannot be activated by monsters if it has the secret flag, although monsters can normally open such doors.

Occasionally, the word "secret" is used in a colloquial or dictionary sense, to mean any hidden area on a map (irrespective of type 9 sectors). For example, this may occur on Usenet or in documentation written by inexperienced PWAD authors.

A secrets percentage of 0% means the player found none of the secrets, but it could also mean that the level has no secrets to find. Some source ports take the other approach and display 100% in the latter case, and others display the ratio of secrets found, as Heretic does, to eliminate ambiguity at the cost of immediately giving away the total number of secrets in the level. Many PWAD authors also design their levels to avoid this problem by marking an unavoidable sector in the level (usually either the starting sector or the sector surrounding the exit) as a secret in a level that would otherwise have no secrets.

Bugs
A secret can only be toggled and added to the number of secrets found if the player's axis makes contact with the floor of the secret sector. In some maps, the design can prevent this from occurring, rendering 100% Secrets impossible. One example is Doom II MAP15, where a narrow secret sector is located just before a raised teleporter. This prevents the player from toggling it, as they will be lifted by the edge of the teleporter pad before they can touch the secret sector's floor.

As a sector type is used to flag a sector as secret, linedef actions applied to a secret sector that change the sector type can cause the secret to be erased from the map the moment the type change occurs, preventing 100% Secrets. This most commonly occurs when the linedef action sets the sector type to 0, or if the model sector is not secret. An example of a map affected by this is Requiem MAP29, where a type-zeroing platform action used to raise a bridge is erroneously tagged to a secret sector as well, causing the secret to be deleted when the action is triggered. Another variant of the error, while less common, occurs if a linedef action assigns blinking lights to a sector, as the effect is accomplished by changing the sector type to 1. One level affected by this is E2M6, where apart from a more typical case of a secret being deleted by a type-zeroing linedef, two secrets can have their flags erased by blinking-lights linedefs if the linedefs are triggered before the player finds them.

Conversely, if a type-changing linedef action is applied to a non-secret sector, and the model sector is secret, an extra secret will be added, which, if triggered along with the other secrets present on a map, can cause the secrets percentage to go over 100%. However, in comparison to the above, this is rarely seen in most levels. One example in a published level occurs in E3M9, where it is possible to get 112% secrets if the player waits until a barrier blocking a secret sinks completely into the floor before entering it.

Demos

 * [[Media:LOSTSCRT.WAD|A level demonstrating how a secret can be erased from a map in-game by a linedef action that changes the sector type]] (file info). This level contains two secrets; one is a pillar in a pool bearing a soul sphere, the other is a compartment containing combat armor. Grabbing the armor will cause the pillar to lower; if the pillar is allowed to sink completely into the pool, the secret flag will be deleted and only 50% Secrets will be possible.
 * [[Media:EXTRA_50.WAD|A level demonstrating how a secret can be added to a map in-game by a linedef action that changes the sector type]] (file info). This level contains two secrets; one is a soul sphere protected by a barrier, the other is a closet containing combat armor. Grabbing the armor will cause the barrier to lower; after this, grabbing the soul sphere and exiting the map will cause the secrets percentage to read 150%, due to the barrier inheriting the adjacent sector's secret flag, adding a third secret to the map.

Strife
While Strife's levels contain many helpful hidden areas that are similar to the secrets in Doom and Heretic, only a few have been marked as secrets. As the game world is hub-based, there are no intermission screens where secrets would be tallied. Thus, the purpose of sector type 9 is restricted to playing the sound effect when the player enters the sector.

The game contains the following numbers of type 9 sectors:

Source

 * Common Doom/Doom II Myths, by Ledmeister