display | more...

Screen-Door Transparency is a faux transparency effect used in primitive video games in order to save processing power. The basic technique of blending two pixels together is well-known but computationally intensive, so this method is used instead.

This effect is performed by plotting an image with "holes" in it, such that alternating pixels are not drawn. Odd rows (for example) are offset by one, so that instead of vertical lines, a very fine grid is drawn. This grid is generally drawn with black or dark grey pixels.

This technique is even used on some 3D gaming platforms to emphasize a 2D overlay (such as a map or some text) without having to spend a lot of cycles doing an alpha blend on your scene.

Assuming the use of simple direct video access, doing a screen-door effect in (for example) assembly language would be trivial, and thus occur very quickly. You would point some address pointer register to the area you wanted to put it in, and you would move (copy) the byte or word for the appropriate color of pixel, and then increment your address pointer. You would do this however many times you wanted to put pixels up (the width of the effect divided by two) and then increment the offset by however many pixels to get to the appropriate part of the next line, and begin the process again. You do this for the number of rows you would like to draw (the height of the effect) and then you are done. You are only using mov, inc, add, and some type of store instruction, all of which complete fairly rapidly.

By contrast, doing a blended transparency effect (which admittedly looks much nicer) in software requires setting up source and destination address pointers. The source is your source image which will be layered over the other image, and the destination is video memory. You then read a byte (or word or whatever the size of your pixel is) from memory, because you cannot act on values in memory except to load them into a register, or store them from a register. You then have to load a pixel from the source bitmap, and do something with the two of them. If you want to support variable-alpha transparency, which is to say more or less transparent, you will also need either an alpha channel (typically raising the size of a pixel to 32 bits, or four bytes) or a mask which requires loading information from still another location. You then compute the difference between the two images, divide it by your alpha factor (or its complement depending on whether your alpha value determines transparency or opacity) and store the new (updated) pixel to video memory. This takes considerably longer, generally involves costly divide operations, and slows down the whole process considerably.

Screen-door transparency effects can be seen in many popular arcade games, even those which use 3D graphics, such as Daytona USA, on which it is used to increase contrast to enhance viewing of the map. It was used in many platform and fighting games such as Golden Axe to do shadows. Finally, even on the relatively recent Sega Saturn console game system there is no support for hardware transparency and many games use this method to mimic transparency effects. You will see much less of this on the Sony Playstation as it does have hardware to support this function.