<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>palette fading to black and back again</title>
		<link>http://gamedesign.wikidot.com/forum/t-20608/palette-fading-to-black-and-back-again</link>
		<description>Posts in the discussion thread &quot;palette fading to black and back again&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Fri, 17 Apr 2026 14:47:29 +0000</lastBuildDate>
		
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20608#post-51490</guid>
				<title>Re: palette fading to black and back again</title>
				<link>http://gamedesign.wikidot.com/forum/t-20608/palette-fading-to-black-and-back-again#post-51490</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 21:15:14 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>10978</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Sorry I couldn't be more help. I've been up on one of my famous no-sleep sprees. This is about to end immediately. I'll be back in action at GDN after Monday. Until then, expect me to me slightly&#8230; dumb.</p> <p>&#8212;hartnell</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20608#post-51418</guid>
				<title>Re: palette fading to black and back again</title>
				<link>http://gamedesign.wikidot.com/forum/t-20608/palette-fading-to-black-and-back-again#post-51418</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 15:56:23 +0000</pubDate>
				<wikidot:authorName>Daxter</wikidot:authorName>				<wikidot:authorUserId>36787</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Aha! Nah its cool it wasnt a qbasic/freebasic difference I needed to get rid of the = signs for the transition back to color or I think it just kept looping forever&#8230; seems to be working ok now. Thanks!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20608#post-51413</guid>
				<title>Re: palette fading to black and back again</title>
				<link>http://gamedesign.wikidot.com/forum/t-20608/palette-fading-to-black-and-back-again#post-51413</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 15:20:58 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>10978</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Have you checked the &quot;Differences from QB&quot; section in the introduction of the FB manual? &#8212;hartnell</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20608#post-51389</guid>
				<title>palette fading to black and back again</title>
				<link>http://gamedesign.wikidot.com/forum/t-20608/palette-fading-to-black-and-back-again#post-51389</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 12:46:31 +0000</pubDate>
				<wikidot:authorName>Daxter</wikidot:authorName>				<wikidot:authorUserId>36787</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi, I have been working through qbasic tutorials provided on petesqbsite (using freebasic though) and have been trying to work things out for myself rather than ask questions for every little thing, but I've finally hit a brick wall. One of the programs in the tutorials teaches about palettes and provides an example to fade the screen to black. I am trying to modify it so it fades to black, then back to the original color again. It works SOME of the time, but other times will not END or will suddenly switch to a random color after the fade-up (the fade to black works fine every time).<br /> Can anybody see anything wrong with my code? I've also posted this on the freebasic forums, I think some of you guys use both, any help is much appreciated!</p> <div class="code"> <pre><code>Cls Screen 20 Print &quot;Specify a color to fade&quot; Input Col Cls Paint (1, 1), Col Sleep Out &amp;H3C7, Col R = Inp(&amp;H3C9) G = Inp(&amp;H3C9) B = Inp(&amp;H3C9) SR = R SG = G SB = B Do If R &gt;= 1 Then R = R - 1 If G &gt;= 1 Then G = G - 1 If B &gt;= 1 Then B = B - 1 Out &amp;H3C8, Col Out &amp;H3C9, R Out &amp;H3C9, G Out &amp;H3C9, B For PAUSE = 1 To 1000000: Next Loop Until R = 0 And G = 0 And B = 0 Sleep Do If R &lt;= SR Then R = R + 1 If G &lt;= SG Then G = G + 1 If B &lt;= SB Then B = B + 1 Out &amp;H3C8, Col 'Go To Port To Write Palette Information Out &amp;H3C9, R 'Change Red Value to R (our variable) Out &amp;H3C9, G 'Do the same with Green Out &amp;H3C9, B 'And with Blue For PAUSE = 1 To 1000000: Next Loop Until R = SR And G = SG And B = SB End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>