Doom Wiki
No edit summary
 
No edit summary
Line 27: Line 27:
   
 
[[Category: Tactics]]
 
[[Category: Tactics]]
[[Category: Bugs]]
+
[[Category: Errors and bugs]]

Revision as of 17:53, 8 July 2005

The Silent BFG trick is a tactic used in deathmatch to silence the BFG 9000 when firing. The BFG makes a loud and conspicuous sound effect when firing. Because the BFG is more powerful than any other weapon, the ability to silence it this sound can give the player a great advantage when playing in a multiplayer game. The trick relies on a limitation in the Doom engine.

Performing the trick

Performing the trick involves "replacing" the BFG firing sound with the "oof" sound effect heard when the player falls from a height or pushes on a wall. The player must either press on a wall immediately after firing the BFG, or time firing the BFG to coincide with hitting the ground. To be used effectively, the player must trigger the sound effect almost immediately after pressing the fire button. Being able to do this reliably takes practise.

Technical

When a sound effect in Doom plays, it is attached to a particular level object (such as a player or monster). The position of the object is then tracked relative to the player's position for the "stereo sound" effect. Sectors have a dummy object which is used for "moving platform" effects, such as opening doors. Each level object can only have one playing sound associated with it at once. This can be seen by opening a door and closing it while it is opening: the "opening door" sound effect is immediately replaced by the "closing door" sound effect.

When a weapon is fired, the "weapon firing" sound effect is associated with the avatar object of the player firing the weapon. This can be seen in the following code which is used to trigger the BFG sound effect:

void
A_BFGsound
( player_t*     player,
  pspdef_t*     psp )
{
    S_StartSound (player->mo, sfx_bfg);
}

However, the player object is also used for the "oof" sound generated when a wall is pushed on or the player hits the floor. The following code in S_StartSound checks for existing playing sound effects using the same object and stops them:

 // kill old sound
 S_StopSound(origin);

Because the "oof" sound effect also uses the player object, triggering this stops any playing weapon firing sound.