|
Sprites, in computer graphics and particularly in video gaming, are a method of integrating unrelated bitmaps that appear to be part of the normal bitmap on a screen. A sprite is a hardware construct that employs custom DMA channels to fetch source images and integrated them with the main screen. It is related to what a genlock does when it super-imposes two discrete video sources. They are also somewhat related to a playfield in that both or handled by the same sort of circuitry.
The advantage of sprites, as opposed to using a processor (or blitter) to manually alter the screen memory using bit block transfer operations, is to provide fast and efficient visual priority, movement, and/or collision detection. This means less processor time is used to accomplish certain goals, writing software is easier for developers and they can produce smaller programs, since the hardware provides certain innate abilities ready to be exploited in a variety of ways. The only dis-advantage that sprites have is that they are usually not as flexible as methods that manually alter the screen bitmap.
Sprites tended to be small compared to actual screen size (for home computers of the 1980s, some tens of pixels in each dimension) and optionally partially transparent, allowing them to assume shapes other than rectangles. In machines like the Amiga the sprite height was arbitrary. Generally sprite height and width do not necessarily have to be constrained by anything other than the designer's wishes and available bandwidth. The number of available sprites is also dependent on available bandwidth, register real-estate and engineering goals.
Sprites are typically used for characters and other moving objects in video games. They are also sometimes used for mouse pointers (in the form of arrows, crosshairs, etc). The Commodore 64, Atari 8-bit family, TI-99/4A, Commodore 128 and Amiga are examples of this. Contrary to popular belief, with the exception of the original IBM XGA card, Microsoft Windows does not use a sprite for the mouse pointer.
For on-screen moving objects larger than one sprite's extent, sprites may sometimes be scaled and/or combined. In Atari 400/800 terminology, sprite techniques were called Player-Missile Graphics, reflecting the usage for both characters ("players") and other objects ("missiles")—the latter, as the name suggests, referring to sprites as video game projectiles. The Atari P-M graphics were very narrow and of limited use. The Atari ST lacked sprites but this did not prevent some people from playing with the language and using oxymorons like "software sprite". Apples and Macs never incorporated true sprites, nor did IBM compatibles. However, third party graphics cards can sometimes (rarely) offer them.
A third name for sprite is Movable Object Block, or MOB. This designation was used e.g. in MOS Technology's graphics chip literature (data sheets, etc). However, Commodore, the main user of MOS chips and the owner of MOS for most of the chip maker's lifetime, applied the common term "sprite".
For relevant examples of well-featured sprite-handling chips of the 8-bit home computer / video game era, see the articles on the MOS Technology VIC-II and the Atari ANTIC. 16 and 32 bit video systems that included sprite generation hardware were found in the Amiga Agnus and Denise custom ASICs.
Character scaling is used to make a sprite appear nearer or further away from the player by scaling the sprite (making it bigger or smaller) in order to give the feeling of perspective. The first game that used this technique was The Secret of Monkey Island.
Sprites are actually very rare in most video hardware today. More commonly, a brute-force method is employed for rendering any moving objects, because processing power has increased. Designing exotic video hardware is costly and many companies don't want to do it if the burden can be handled by the user's processor or graphics co-processor. Early computer and video game hardware were designed to offer sprites because creating motion or other effects by writing to the main bitmap framebuffer was computationally expensive. Many also had advanced functions for detecting collisions, or even for zooming and rotating them before drawing, like the Atari Lynx. Today this is usually not common; contemporary CPUs are typically fast enough to manage the illusion of a large number of on-screen objects by themselves. Even if this not sufficient, today's graphics hardware is often so flexible that it can assist the CPU in drawing/moving objects without requiring specialized sprite hardware for this task.
With the advent of 3D computer graphics in the 1990s, the term sprite began to be used to refer to a two-dimensional image rendered into a three-dimensional world. For example, a character would be rendered (or drawn) from eight different angles, and one of these eight images would be displayed depending on which angle the character is being viewed from. This technique was popular in early 3D games such as Doom and Carmageddon. As 3D rendering hardware became more powerful in the late 1990s, the use of this technique declined sharply.
|