O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Alpha Channel Transparency

In the previous chapters on sprite programming, you learned a technique for drawing transparent sprites using a color key. The color key of an image is a specific color that is defined as the transparent color, so that when the image is drawn, you can see through the transparent pixels in the image and the background will show. This is a reasonable way to draw transparent sprites, but it has some disadvantages. For one thing, you have to know the color key of a sprite, and unless you use the set image colorkey command for any images that have a different transparent color, some of your sprites won’t render transparently. (This problem is lessened if you choose a standard color key.)

Comparing Color Key and Alpha Channel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required