Particle

From DoomWiki.org

Revision as of 13:28, 2 July 2006 by Bloodshedder (talk | contribs) (singularity)


A particle is a small, optionally translucent rectangle used in place of sprites for transient liquid or gas effects in many games. As applied to the Doom engine by various source ports, particles are useful for effects such as blood, smoke, sparks, drips, and weather simulation. Particles require only minimal linkage to the rest of the game simulation and are therefore lightweight and fast both to process and to render. Use of sprites for such effects would incur significant speed and memory penalties.

In true 3D games such as Quake II, particles are actually tiny alpha-blended polygons with a typically 1-pixel texture applied to their surfaces. In the implementation shared by ZDoom and the Eternity Engine, particles are folded into the existing vissprite system. When the game starts to draw a vissprite and finds out it is actually a particle, it calls an alternate, optimized routine to draw a small single-colored rectangle. The square shape makes scaling and clipping operations extremely simple compared to those required for sprites, though this comes at the price of some attractiveness.