Sprite

From ZDoom Wiki

(Redirected from Sprites)
Jump to: navigation, search

In Doom, a sprite is a series of images that can be used to display a thing. In the original Doom, adding or changing sprites (and flats) was a big pain in the rear involving making patches to the IWAD. ZDoom rectified this, and you can now easily add new sprites to your PWADs.

Contents

Image Names

Sprite image names have the format:

 NNNNFA[FA]

where NNNN is an arbitrary name for the sprite, F is a number specifying the frame position (walking1, walking2, shooting, etc), and A specifies the angle.

Frames

You can have 29 frames of animation for any one sprite name, one for each letter of the alphabet plus [, \ or ]. For example POSSA1 is the first walking frame of the zombie trooper, POSSG1 is the pain frame (the animations themselves can be controlled with DEHACKED or DECORATE ).

Angles

Generally, items and decorations have only one angle, denoted by a 0 (zero) after their frame letter. Eg BON1A0 will be used to represent the health bonus no matter which angle you are looking at it from.

But you can have up to 16 rotations for each sprite. Here is a table that shows what character to use for each angle:

degrees 0 22.5 45 67.5 90 112.5 135 157.5 180 202.5 225 247.5 270 292.5 315 337.5
key 1 9 2 A 3 B 4 C 5 D 6 E 7 F 8 G

e.g POSSA9 would be used to represent the trooper at an angle of 22.5 degrees. POSSAA is the trooper from a 67.5 degree angle.

You may of course leave out angles 9 to G altogether and use only 8 rotations as per the original Doom spec.

Mirroring

Every sprite image can have one alternative mirrored position. Simply add another frame letter and angle notation after the first in the image name. For example, for POSSA2A8, the actual image with this name will be flipped to show the trooper from the 315 degree angle.

Conflicting Sprite Names

ZDoom currently supports Doom(2), Heretic, Hexen, and Strife. Enemies or items from any supported game can be brought into any other supported game. However, this brings to light the fact that some sprites have the same name in one game as another sprite in another game. For example, the Doom Cacodemon uses sprites named HEAD*, but the Heretic Iron Lich uses the same name. To avoid conflicts and allow all sprites to coexist peacefully, a change was made to ZDoom which changes the name of the sprite ZDoom will look for, so long as it's looking at a PWAD. (That way the original IWADs will still work unchanged.)

Sprites are renamed as follows:

Heretic.wad

BLOD → BLUD (this makes it the same as Doom's blood sprite)
HEAD → LICH

Hexen.wad

ARM1 → AR_1
ARM2 → AR_2
ARM3 → AR_3
ARM4 → AR_4
BARL → ZBAR
BLOD → BLUD (this makes it the same as Doom's blood sprite)
CAND → BCAN
GIBS → POL5 (this makes it the same as Doom's gib sprite)
ROCK → ROKK
SUIT → ZSUI
TRE1 → ZTRE
TRE2 → TRES
WATR → HWAT

MNTRF → MNTRU (these lines make
MNTRG → MNTRV  the minotaur attack
MNTRH → MNTRW  frames the same as
MNTRI → MNTRX  in Heretic to avoid
MNTRJ → MNTRY  having to patch the
MNTRK → MNTRZ  actor itself)

ARTIINVU → ARTIDEFN (this separates it from
INVU → DEFN  Heretic's invulnerability item)

Strife1.wad

ARM1 → ARM3 
ARM2 → ARM4 
BAR1 → BARC 
BARL → BBAR 
BLST → MAUL 
BLOD → BLUD (this makes it the same as Doom's blood sprite)
CNDL → KNDL 
LOGG → LOGW 
MISL → SMIS 
PMAP → SMAP 
POT1 → MPOT 
SHRD → SHAR 
SHT2 → MPUF 
SPID → STLK 
TLMP → TECH 
TRE1 → TRET 
TRCH → TRHL 
VASE → VAZE

The upshot of this is that if you want to include custom Iron Lich graphics, you will now use the new sprite, LICH*, rather than HEAD*. If you then wanted to include Cacodemon graphics, you could safely add HEAD* graphics and there will be no conflicts.

See also

Personal tools