Secret

Most levels contain secrets. 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. 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.

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.

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, if the model sector is not secret or the linedef action sets the sector type to 0, will cause the secret to be erased from the map the moment the type change occurs, preventing 100% Secrets. 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.

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, if it is ever seen at all.

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.

Source

 * Common Doom/Doom II Myths, by Ledmeister