Ouch face

Ouch face being demonstrated on E1M4 (see demo below)

The ouch face is one of the status bar face graphics (STFOUCH*), for when the player is shocked by great pain. During normal play it is seen only rarely, and for a long time the face was considered an almost random occurrence.

The ouch face actually originates in Spear of Destiny, where it will appear if B.J. Blazkowicz takes 30 damage or more from a single attack. It is, however, not present in the original Wolfenstein 3D. Following the release of Spear of Destiny and the start of Doom's development, the ouch face was brought back once the game implemented its modern HUD iteration, but it was initially given a different purpose. As a result, the Doom press release beta contained an apparently non-buggy version of the ouch face. Crossing pools of nukage or lava would result in a sustained ouch face until the player escaped the hazard. The ouch face can be briefly glimpsed in the video "A Visit to id Software", triggered by the same logic, and showing that this behavior was still present until very late in development before it was decided to revert it to the behavior seen in Spear of Destiny. However, a bug in the code prevented the intended implementation from functioning properly.

When Doom's source code was released, it became apparent that the code that displayed the face was in error. The programmers had used the expression (plyr->health - st_oldhealth > ST_MUCHPAIN) instead of the correct expression (st_oldhealth - plyr->health > ST_MUCHPAIN). The code should have displayed the face whenever a player was subject to 20 hit points of damage or more during a single tic. As it is, the code only displays the face when the player gains more than 20 hit points during that period, which is a rare occurrence.

There are several ways to see the ouch face. One is to start a level with the player standing on a damaging floor sector, such as in Memento Mori MAP13: The Inmost Dens II. The most common way, however, is to receive damage while simultaneously picking up a large health increasing item (such as by being hit by a projectile while picking up a supercharge, or using the iddqd cheat code while on a damaging floor; see the E1M3 demo in shareware Doom v1.666), resulting in a health which is far greater than it was before the series of events took place.

Contents

TechnicalEdit

The ouch face being triggered on E1M4 by the player picking up a soul sphere while simultaneously taking rocket damage.

The code relating to the bug is found in the file st_stuff.c and is as follows (comments added for clarity):

  if (plyr->health - st_oldhealth > ST_MUCHPAIN) // ST_MUCHPAIN is 20
  {
     st_facecount = ST_TURNCOUNT;  // ST_TURNCOUNT is 35
     st_faceindex = ST_calcPainOffset() + ST_OUCHOFFSET; // ST_OUCHOFFSET is 5
  }

The relevant portion is in the first line, which essentially states that the ouch face will only appear if the player's current health is more than 20 points greater than their health in the previous tic. Since this portion of code is only called when the player receives damage, it is very unusual through normal play for a player receiving damage to end up with a great deal more health than he started with. Much like all the other faces, the ouch face gets bloodier the more damage the player has taken.

Presence in portsEdit

The ouch face in Spear of Destiny, working with the behavior intended for Doom, albeit with a higher damage value required to trigger it.

Some modern source ports, such as ZDoom and Eternity, have reversed the code, resulting in behavior which is not present in the games out of the box, but correcting what could nevertheless be considered a "bug". A binary patch for the DOS executables similarly changing the face behavior has been written by the programmer of PrBoom+, Andrey Budko.

The PlayStation and Sega Saturn console ports include the ouch face. It usually occurs when the player is hit from behind.

The official Xbox 360 port of Doom also has the ouch face, but it is harder to trigger. The bug was fixed in a patch of the Doom Classic Unity port.

DemoEdit

See alsoEdit