<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>transparent objects</title>
		<link>http://www.allegro.cc/forums/view/591381</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 15 May 2007 05:25:29 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Within an isometric game, I&#39;d like to create the effect of seeing through a wall or object that a character has moved behind. Where the character stands, the wall or object is completely transparent. The transparency reduces radially away from the character until it becomes completely opaque a given number of pixels away. Would the following way work, or is there a better/faster way around it?</p><p>At the start of the game, create a 32bit completely opaque and black (0,0,0,0) bitmap. Update the alpha channel from completely transparent at the centre of the bitmap to completely opaque at the edges. Call this the alpha_bitmap. All loaded game bitmaps are 32bit, with alpha channel set to opaque (0).</p><p>During the game, blit the wall section to a temporary bitmap. Call this temp_bitmap. Using an additive blender, draw the alpha_bitmap onto the temp_bitmap . Then using an alpha blender, draw the temp_bitmap to the buffer.</p><p>Am I correct in thinking that the step using the additive blender will add only the alpha channel as the rest of the image is black and not affect the visible image?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HardTranceFan)</author>
		<pubDate>Mon, 14 May 2007 05:28:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Alternatively you could set the wall as pattern and draw a bunch of expanding circles.  Not sure if the CPU effort of circle drawing would outweigh the bunch of blits your method entails.
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/drawing_mode" target="_blank"><span class="a">drawing_mode</span></a>
<a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a>
<a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 15 May 2007 05:25:29 +0000</pubDate>
	</item>
</rss>
