Sprite

Sprites are graphics for the Doom Things.

Some things, such as weapons, ammo, and simple obstacles and decorations look the same at all times from all angles. These have a single sprite graphic associated with them.

Some things, such as certain powerups, look the same from all angles but cycle through several different appearances as time passes. These have several sprite graphics, displayed in a rotating sequence at a controlled rate.

The most complicated things, monsters and players, look different from different angles and can take on a different appearance depending on gameplay developments. Each of these has a set of sprite graphics, for which the display sequence is determined by the Doom rendering engine. Exploding barrels are also handled this way.

Each Doom Thing has a four-character sprite prefix defined for it, and all of its graphics are named beginning with this. The fifth character of a sprite graphic name gives the animation frame ordinal, starting at A and proceeding through the alphabet. (The sequence continues past Z, if necessary, using ASCII encoding.)

The sixth character of a sprite graphic name gives the rotation or rot. If it is 0, the graphic is used for all viewing angles. Otherwise, eight graphics, with sixth character ranging from 1 to 8, must be defined. The graphic 1 is used to draw a thing looking head-on; 2 through 8 are used as the thing is rotated in 45-degree steps counterclockwise. Note that in some source ports, such as ZDoom and EDGE, that this system is expanded to 16 angles, in 22.5 degree increments, using 1-9 and A-G for the sixth-character angle names.

It is possible to use a single graphic for two rots. For example, the name TROOA2A8 defines a graphic with prefix TROO for animation frame A rot 2. The same graphic, drawn in mirror image, is used for animation frame A rot 8.

Each sprite graphic is stored in the WAD file in Doom's picture format.

Replacing sprites using a PWAD file presents certain problems.

Additional detail is given in the Unofficial Doom Specs.