<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Robert Muller Design &#187; Demoscene</title>
	<atom:link href="http://rmd.com.au/archives/category/demoscene/feed" rel="self" type="application/rss+xml" />
	<link>http://rmd.com.au</link>
	<description></description>
	<lastBuildDate>Tue, 12 Oct 2010 23:47:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Water For Life Microsite using Papervision3D</title>
		<link>http://rmd.com.au/archives/water-for-life</link>
		<comments>http://rmd.com.au/archives/water-for-life#comments</comments>
		<pubDate>Tue, 26 May 2009 13:52:58 +0000</pubDate>
		<dc:creator>Rob Muller</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[My Work]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Euro RSCG]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://rmd.com.au/?p=336</guid>
		<description><![CDATA[Euro has just launched an integrated campaign for the NSW Government called &#8220;Water For Life&#8221;, which aims to inform the public about new water sources, and ways in which we can use our existing sources more efficiently. The campaign presents a &#8220;day-in-the-life&#8221; view of a water drop&#8217;s journey through our water system, and includes TV [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.waterforlife.com.au/"><img src="/wp-content/uploads/2009/05/water4life_01.jpg" alt="Water4Life Homepage" title="Water4Life Homepage" width="420" height="236" class="alignnone size-full wp-image-338" /></a></p>
<p>Euro has just launched an integrated campaign for the NSW Government called &#8220;Water For Life&#8221;, which aims to inform the public about new water sources, and ways in which we can use our existing sources more efficiently. The campaign presents a &#8220;day-in-the-life&#8221; view of a water drop&#8217;s journey through our water system, and includes TV commercials, printed and online advertising, and a microsite.</p>
<p>The aim of the microsite was to unify the journeys presented in each TV commercial, and provide a little more depth of information without becoming too heavy on details. We wanted to reuse and maintain the visual style of the TVCs, with the almost anthropomorphic focus on the water drop itself, so we decided to build a set of 3D scenes where people could discover additional information on water efficiency at various points on the drop&#8217;s journey.</p>
<p><a href="http://www.waterforlife.com.au/"><img src="/wp-content/uploads/2009/05/water4life_02b.jpg" alt="Water4Life Bathroom Scene" title="Water4Life Bathroom Scene" width="420" height="236" class="alignnone size-full wp-image-339" /></a></p>
<p>We used Papervision3D to render the scenes, which were partly modelled in 3D Studio Max and textured using a combination of texture-baking in 3DS and plenty of post-production in Photoshop. Then additional elements were added directly in Papervision, such as the refractive water drop, depth-of-field particles, tree decals, skyboxes, lens flares, etc.</p>
<p><a href="http://www.waterforlife.com.au/"><img src="/wp-content/uploads/2009/05/water4life_03.jpg" alt="Water4Life Map Scene" title="Water4Life Map Scene" width="420" height="236" class="alignnone size-full wp-image-337" /></a></p>
<p>I&#8217;m really happy with the final result, as well as the performance of the 3D scenes thanks to some optimisation tricks and techniques. I&#8217;m planning on doing a series of posts going into further detail on some of the effects and optimisation techniques, including source code where possible. If there&#8217;s anything specific you&#8217;d like me to cover, leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://rmd.com.au/archives/water-for-life/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>#tweetcoding Part 4 &#8211; Bubbles, Sineribbon &amp; Feedback Vortex</title>
		<link>http://rmd.com.au/archives/tweetcoding-part-4-bubbles-sineribbon-feedback-vortex</link>
		<comments>http://rmd.com.au/archives/tweetcoding-part-4-bubbles-sineribbon-feedback-vortex#comments</comments>
		<pubDate>Tue, 24 Feb 2009 12:47:52 +0000</pubDate>
		<dc:creator>Rob Muller</dc:creator>
				<category><![CDATA[Beer]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[bubbles]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://rmd.com.au/?p=214</guid>
		<description><![CDATA[Number eight is Bubbles. Of my #tweetcoding entries, this is possibly my favourite. It&#8217;s nothing special technically, but I love recreating natural/physical phenomena, and to do so in 140 characters is even better. I was inspired when staring into a glass of beer &#8211; unfortunately I was unable to implement a nice amber colour within [...]]]></description>
			<content:encoded><![CDATA[<p>Number eight is <a href="/labs/tweetcoding/bubbles.html">Bubbles</a>. Of my #tweetcoding entries, this is possibly my favourite. It&#8217;s nothing special technically, but I love recreating natural/physical phenomena, and to do so in 140 characters is even better. I was inspired when staring into <a href="https://www.littlecreatures.com.au/">a glass of beer</a> &#8211; unfortunately I was unable to implement a nice amber colour within the constraints.</p>
<p> Love the pseudo-3D parallax effect, random motion, differing colours &#038; transparency. The only thing I would improve is the visual appearance of the bubbles &#8211; it&#8217;d be nice to add some shading. Otherwise I&#8217;m pretty happy with this one.</p>
<p><a href="/labs/tweetcoding/bubbles.html"><img src="/wp-content/uploads/2009/02/bubbles.jpg" alt="bubbles" title="bubbles" width="420" height="305" class="alignnone size-full wp-image-215" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>i=j=<span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">?</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>=<span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>j<span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>j<span style="color: #000066; font-weight: bold;">,</span>s<span style="color: #000066; font-weight: bold;">:</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">:</span>p=o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">with</span><span style="color: #000000;">&#40;</span>p<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>ls<span style="color: #000000;">&#40;</span>s<span style="color: #000066; font-weight: bold;">,</span>j<span style="color: #000066; font-weight: bold;">+</span>i<span style="color: #000066; font-weight: bold;">,.</span>2<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span>y<span style="color: #000066; font-weight: bold;">-</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>p<span style="color: #000066; font-weight: bold;">.</span>s<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>y<span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #004993;">y</span>=j<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></div></div>
<p>Nine is <a href="/labs/tweetcoding/sineribbon.html">Sineribbon</a>. This was an attempt to recreate one of my favourite effects, seen here in another classic PC demo &#8211; <a href="http://www.youtube.com/watch?v=_itMu1ZbY6c">X14 by Orange</a> from 1995. Skip to the 2:50 mark to see the effect or, better still, watch the whole thing. Unfortunately for me, the character constraint was too limiting, so I ended up with what you see here. I might try and revisit this one though.</p>
<p><a href="/labs/tweetcoding/sineribbon.html"><img src="/wp-content/uploads/2009/02/sineribbon.jpg" alt="sineribbon" title="sineribbon" width="420" height="305" class="alignnone size-full wp-image-217" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">q=<span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">;</span>g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000066; font-weight: bold;">.</span>a<span style="color: #000000;">&#41;</span>o<span style="color: #000066; font-weight: bold;">.</span>a=o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span>=<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">with</span><span style="color: #000000;">&#40;</span>o<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>a<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>03<span style="color: #000066; font-weight: bold;">;</span>b<span style="color: #000066; font-weight: bold;">-</span>=<span style="color: #000066; font-weight: bold;">.</span>07<span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>j=<span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">;</span>j<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>p=s<span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">/</span>q<span style="color: #000066; font-weight: bold;">+</span>s<span style="color: #000000;">&#40;</span>a<span style="color: #000066; font-weight: bold;">+</span>j<span style="color: #000066; font-weight: bold;">/</span>q<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">+</span>s<span style="color: #000000;">&#40;</span><span style="color: #004993;">b</span><span style="color: #000066; font-weight: bold;">+</span>j<span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">179</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>q<span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000066; font-weight: bold;">+</span>q<span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">,</span>q<span style="color: #000066; font-weight: bold;">-</span>p<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">,</span>q<span style="color: #000066; font-weight: bold;">+</span>p<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></div></div>
<p>Ten &#8211; <a href="/labs/tweetcoding/feedbackvortex.html">Feedback Vortex</a>. Video Feedback goes all the way back to <a href="http://en.wikipedia.org/wiki/Videofeedback">the advent of analogue video</a> back in 1956, although it wasn&#8217;t used purposefully until the 1960s and didn&#8217;t really take off until decades later. Creating this effect in Flash is simple &#8211; just add a bitmap to the stage and, each frame, copy the entire stage into the bitmap, with input image, noise or colour around the bitmap to start the effect off. Over multiple frames, this generates copies of the input image &#8211; each one nested within the last. By adjusting the scale and rotation of the bitmap, the copies can be made to spiral, or zoom in and out.</p>
<p>My favourite demoscene example is again from <a href="http://www.youtube.com/watch?v=_itMu1ZbY6c">X14 by Orange</a>, at the 2:40 mark.</p>
<p>Credit is due to Quasimondo for the <a href="http://twitter.com/Quasimondo/status/1227969633">first #tweetcoding entry to use bitmap feedback</a>, but I&#8217;m no stranger to the effect either, having implemented it in Director back in the day, and <a href="/f8_infinity.html">again in Flash</a> when the FP8 beta was released.</p>
<p><a href="/labs/tweetcoding/feedbackvortex.html"><img src="/wp-content/uploads/2009/02/feedbackvortex.jpg" alt="feedbackvortex" title="feedbackvortex" width="420" height="305" class="alignnone size-full wp-image-216" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">q=<span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">;</span>g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span><span style="color: #000000;">&#41;</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">c</span>=<span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000000;">&#40;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span>=<span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000000;">&#40;</span>q<span style="color: #000066; font-weight: bold;">,</span>q<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span>=<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>z=s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>03<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">70</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">30</span><span style="color: #000066; font-weight: bold;">;</span>ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">,</span>i<span style="color: #000066; font-weight: bold;">*</span>q<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>q<span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://rmd.com.au/archives/tweetcoding-part-4-bubbles-sineribbon-feedback-vortex/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>#tweetcoding Part 3 &#8211; Starfield, Sinescroller, TweetSynth &amp; VintageFlash</title>
		<link>http://rmd.com.au/archives/tweetcoding-part-3-starfield-sinescroller-tweetsynth-vintageflash</link>
		<comments>http://rmd.com.au/archives/tweetcoding-part-3-starfield-sinescroller-tweetsynth-vintageflash#comments</comments>
		<pubDate>Sun, 22 Feb 2009 00:35:56 +0000</pubDate>
		<dc:creator>Rob Muller</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[starfield]]></category>
		<category><![CDATA[synthesis]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://rmd.com.au/?p=201</guid>
		<description><![CDATA[My fourth entry is Starfield &#8211; another classic demoscene effect. Nothing special about this one &#8211; it simply uses FP10&#8242;s new 3D abilities to move some 2&#215;2 pixel bitmaps. Would have been nice to get some rotation in there, but unfortunately most of the 140 characters are use up with creating the stars. for&#40;i=j=550;i--;&#41;&#123;if&#40;!o&#91;i&#93;&#41;&#123;o&#91;i&#93;=addChild&#40;new Bitmap&#40;new [...]]]></description>
			<content:encoded><![CDATA[<p>My fourth entry is <a href="/labs/tweetcoding/starfield.html">Starfield</a> &#8211; another classic demoscene effect. Nothing special about this one &#8211; it simply uses FP10&#8242;s new 3D abilities to move some 2&#215;2 pixel bitmaps. Would have been nice to get some rotation in there, but unfortunately most of the 140 characters are use up with creating the stars.</p>
<p><a href="/labs/tweetcoding/starfield.html"><img src="/wp-content/uploads/2009/02/starfield.jpg" alt="Starfield" title="Starfield" width="420" height="305" class="alignnone size-full wp-image-161" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>i=j=<span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>=<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>p=o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>j<span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>j<span style="color: #000066; font-weight: bold;">*.</span>72<span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span>z=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>j<span style="color: #000000;">&#125;</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>z<span style="color: #000066; font-weight: bold;">-</span>=<span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">;</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>z<span style="color: #000066; font-weight: bold;">%</span>=j<span style="color: #000000;">&#125;</span></div></div>
<p>Fifth is <a href="/labs/tweetcoding/sinescroller.html">Sinescroller</a>. Perhaps the most common demoscene effect &#8211; scrollers go all the way back to the early crackintros in which coders would inject personal messages, greetings  or credits. Unfortunately this is a fairly unimpressive sinescroller &#8211; only 3 characters, and pretty poor kerning.</p>
<p><a href="/labs/tweetcoding/sinescroller.html"><img src="/wp-content/uploads/2009/02/sinescroller.jpg" alt="Sinescroller" title="Sinescroller" width="420" height="38" class="alignnone size-full wp-image-160" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">x</span>=<span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">;</span>t=<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;R&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;M&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;D&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>j=<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span>j<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>o<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>=<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=textfield%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:textfield.html"><span style="color: #004993;">TextField</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span>=t<span style="color: #000000;">&#91;</span>j<span style="color: #000066; font-weight: bold;">%</span>4<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span>o<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span>=j<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">;</span>p=o<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span>=<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">%</span>=<span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span>=s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000000;">&#125;</span></div></div>
<p><a href="/labs/tweetcoding/tweetsynth.html">TweetSynth</a> is my sixth entry, and the first entry to use audio <a href="http://twitter.com/zachberry/status/1229331282">by seven minutes</a>. Nothing to see here, but make sure your volume is down low first. I didn&#8217;t want to use random data, so I played with the numbers until it sounded interesting. Check out <a href="http://twitter.com/zachberry/status/1229276672">Zachberry&#8217;s entry</a> too &#8211; he managed to get a much more interesting sound going.</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#40;</span>o=<span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=sound%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sound.html"><span style="color: #004993;">Sound</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;sampleData&quot;</span><span style="color: #000066; font-weight: bold;">,</span>l<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #339966; font-weight: bold;">function</span> l<span style="color: #000000;">&#40;</span>e<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span>=5e3<span style="color: #000066; font-weight: bold;">;</span>c<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>w=e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">writeFloat</span><span style="color: #000066; font-weight: bold;">;</span>w<span style="color: #000000;">&#40;</span>s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>w<span style="color: #000000;">&#40;</span>s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #004993;">c</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></div></div>
</p>
<p>Number seven is <a href="/labs/tweetcoding/vintageflash.html">VintageFlash</a>, an attempt at recreating an &#8220;old film effect&#8221;. Managed to squeeze three separate elements into this one &#8211; the background flicker, random noise to simulate dust, and the vertical lines simulating scratches in the film.</p>
<p><a href="/labs/tweetcoding/vintageflash.html"><img src="/wp-content/uploads/2009/02/vintageflash.jpg" alt="vintageflash" title="vintageflash" width="420" height="305" class="alignnone size-full wp-image-162" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">p=<span style="color: #000000; font-weight:bold;">900</span><span style="color: #000066; font-weight: bold;">;</span>n=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>ls<span style="color: #000000;">&#40;</span>p<span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,.</span>1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>i=<span style="color: #000066; font-weight: bold;">!</span>i<span style="color: #000000;">&#41;</span>g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span>n<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>p<span style="color: #000066; font-weight: bold;">,</span>n<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>m<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">round</span><span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>o=n<span style="color: #000066; font-weight: bold;">*</span>p<span style="color: #000066; font-weight: bold;">;</span>ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span>o<span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>o<span style="color: #000066; font-weight: bold;">+</span>=n<span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>k=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>p<span style="color: #000066; font-weight: bold;">;</span>l=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>p<span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span>k<span style="color: #000066; font-weight: bold;">,</span>l<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>k<span style="color: #000066; font-weight: bold;">,</span>l<span style="color: #000066; font-weight: bold;">+</span>n<span style="color: #000000;">&#41;</span></div></div>
<p>Onwards to <a href="/archives/tweetcoding-part-4-bubbles-sineribbon-feedback-vortex">Part 4</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rmd.com.au/archives/tweetcoding-part-3-starfield-sinescroller-tweetsynth-vintageflash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#tweetcoding Part 2 &#8211; Interference, Plasma &amp; Fountain</title>
		<link>http://rmd.com.au/archives/tweetcoding-part-2-interference-plasma-fountain</link>
		<comments>http://rmd.com.au/archives/tweetcoding-part-2-interference-plasma-fountain#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:20:35 +0000</pubDate>
		<dc:creator>Rob Muller</dc:creator>
				<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Amiga]]></category>
		<category><![CDATA[C64]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://rmd.com.au/?p=170</guid>
		<description><![CDATA[Following on from my previous post, my first entry is a classic demoscene effect called &#8220;Interference&#8221;. Two sets of concentric circles intersect and invert each other out, causing crazy Moiré patterns which strobe like early 90s rave visuals. The effect has been used in countless demos on pretty much every platform, but the best example [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from <a href="/archives/tweetcoding-part-1">my previous post</a>, my first entry is a classic demoscene effect called <a href="http://twitter.com/rmdesign/status/1225183171">&#8220;Interference&#8221;</a>. Two sets of concentric circles intersect and invert each other out, causing crazy <a href="http://en.wikipedia.org/wiki/Moir%C3%A9_pattern">Moiré patterns</a> which strobe like early 90s rave visuals. The effect has been used in countless demos on pretty much every platform, but the best example has to be the classic Amiga demo <a href="http://www.youtube.com/watch?v=c5kuYfTCGLg">State of the Art by Spaceballs</a>, from back in 1992.</p>
<p>Flash&#8217;s <a href="http://en.wikipedia.org/wiki/Even-odd_rule">even-odd fill rule</a> happily handles the inversion automatically, so all you need to do is draw both sets in one beginFill/endFill block.</p>
<p><a href="/labs/tweetcoding/interference.html">Here it is in action</a>.</p>
<p><a href="/labs/tweetcoding/interference.html"><img src="/wp-content/uploads/2009/02/interference.jpg" alt="Interference" title="Interference" width="420" height="305" class="alignnone size-full wp-image-158" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">c</span>=g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawCircle</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">++;</span>h=s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">*.</span>011<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">;</span>v=s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">*.</span>01<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">;</span>g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>j=<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span>j<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">c</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">275</span><span style="color: #000066; font-weight: bold;">+</span>h<span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">+</span>v<span style="color: #000066; font-weight: bold;">,</span>j<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #004993;">c</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">275</span><span style="color: #000066; font-weight: bold;">-</span>h<span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">-</span>v<span style="color: #000066; font-weight: bold;">,</span>j<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span></div></div>
<p>Next up is <a href="http://twitter.com/rmdesign/status/1225650582">&#8220;Fountain&#8221;</a>, another common effect, and probably the most basic particle emitter. A nice side-effect of incrementing the particles&#8217; positions on the lineTo call is that they elongate as their velocity increases. One of those rare situations where an optimisation actually improves the effect.</p>
<p>Another nice optimisation involved the boundary checking. Instead of testing whether a particle has dropped off the bottom of the screen then resetting its position &#8211; if(p.y>400){p.x=275;p.y=400} etc &#8211; I simply check that its velocity has gone beyond a certain value at the same time as the gravity is applied, then re-use the initialisation code to reset it.</p>
<p><a href="/labs/tweetcoding/fountain.html"><img src="/wp-content/uploads/2009/02/fountain.jpg" alt="Fountain" title="Fountain" width="420" height="305" class="alignnone size-full wp-image-158" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">g<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span>i=<span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">--;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #000066; font-weight: bold;">!</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">?</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>=<span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">275</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">400</span><span style="color: #000066; font-weight: bold;">,</span>j<span style="color: #000066; font-weight: bold;">:</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span>k<span style="color: #000066; font-weight: bold;">:-</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">:</span>p=o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">,</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>mt<span style="color: #000000;">&#40;</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>lt<span style="color: #000000;">&#40;</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span>=p<span style="color: #000066; font-weight: bold;">.</span>j<span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">+</span>=p<span style="color: #000066; font-weight: bold;">.</span>k<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000;">&#40;</span>p<span style="color: #000066; font-weight: bold;">.</span>k<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">?</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#125;</span></div></div>
<p>Third is <a href="http://twitter.com/rmdesign/status/1226436252">&#8220;Plasma&#8221;</a>, another classic demoscene effect going all the way back to the C64 &#8211; it&#8217;s hard to find an old-school demo that doesn&#8217;t feature a plasma effect of some sort. Mario Klingemann (AKA Quasimondo) posted <a href="http://twitter.com/Quasimondo/status/1223779411">the first entry to use Perlin noise</a> and I set about improving it to use the offsets parameter, causing the octaves to move and interact with each other.</p>
<p><a href="/labs/tweetcoding/plasma.html"><img src="/wp-content/uploads/2009/02/plasma.jpg" alt="Plasma" title="Plasma" width="420" height="305" class="alignnone size-full wp-image-158" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">p=<a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000066; font-weight: bold;">;!</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span><span style="color: #000066; font-weight: bold;">?</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">c</span>=<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000000;">&#40;</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span>=<span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">550</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">400</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>o<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">b</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">perlinNoise</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">500</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">7</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000;">&#91;</span><span style="color: #0033ff; font-weight: bold;">new</span> p<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">,</span>i<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">new</span> p<span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">-</span>i<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">,-</span>i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span></div></div>
<p>On to <a href="/archives/tweetcoding-part-3-starfield-sinescroller-tweetsynth-vintageflash">#tweetcoding Part 3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rmd.com.au/archives/tweetcoding-part-2-interference-plasma-fountain/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>#tweetcoding Part 1</title>
		<link>http://rmd.com.au/archives/tweetcoding-part-1</link>
		<comments>http://rmd.com.au/archives/tweetcoding-part-1#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:04:24 +0000</pubDate>
		<dc:creator>Rob Muller</dc:creator>
				<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[C64]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://rmd.com.au/?p=156</guid>
		<description><![CDATA[Grant Skinner recently started a little challenge on Twitter to see what could be done in 140 characters of AS3. I took a stab at it too, with this sinewave routine (which looks a bit like Sonic the Hedgehog, or the Drupal logo): var i=0,j=0,s=Math.sin;addEventListener&#40;&#34;enterFrame&#34;,function&#40;&#41;&#123;with&#40;graphics&#41;&#123;lineStyle&#40;3&#41;;lineTo&#40;99-&#40;x-=s&#40;i+=.003&#41;&#41;,99-&#40;y-=s&#40;j+=.005&#41;&#41;&#41;&#125;&#125;&#41; &#8230;but it became pretty obvious that with ActionScript&#8217;s fairly verbose [...]]]></description>
			<content:encoded><![CDATA[<p>Grant Skinner recently started a little challenge on Twitter to see what could be done in <a href="http://gskinner.com/playpen/tweetCoding1.html">140 characters of AS3</a>. I took a stab at it too, with <a href="/labs/tweetcoding/sinic.html">this sinewave routine</a> (which looks a bit like Sonic the Hedgehog, or the Drupal logo):</p>
<p><a href="/labs/tweetcoding/sinic.html"><img src="/wp-content/uploads/2009/02/sinic.jpg" alt="Sinic" title="Sinic" width="420" height="305" class="alignnone size-full wp-image-163" /></a></p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> i=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span>j=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span>s=<a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;enterFrame&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">with</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">graphics</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">lineStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000;">&#40;</span>x<span style="color: #000066; font-weight: bold;">-</span>=s<span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>003<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">99</span><span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000;">&#40;</span>y<span style="color: #000066; font-weight: bold;">-</span>=s<span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>005<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span></div></div>
<p>&#8230;but it became pretty obvious that with ActionScript&#8217;s fairly verbose syntax (particularly considering event listeners), there isn&#8217;t much room to move. So Grant proposed a template of &#8220;gimme code&#8221;, which defines a set of shortcuts to commonly used functions, and kicked off the <a href="http://gskinner.com/playpen/tweetcoding.html">#tweetcoding competition</a>. First prize is a copy of Flash CS4 from Adobe plus a copy of &#8220;AdvancED ActionScript 3.0 Animation&#8221; by Keith Peters. Second and third runners up will also receive a copy of Keith&#8217;s book.</p>
<p><a href="http://twitter.com/machine501">Robert Cadena</a> has set up a page which, aside from <a href="http://tweetcoding.machine501.com/">tracking the competition entries</a>, also conveniently compiles each entry as well.</p>
<p>As <a href="http://twitter.com/gskinner/status/1228228406">Grant Skinner noted</a> the competition is reminiscent of the old Flash 4 days. It also has parallels with the <a href="http://www.assembly.org/2006/compos/realtime/demo/">Demoscene 4k and 64k competitions</a>, and sceners&#8217; abilities to squeeze <a href="http://www.youtube.com/watch?v=yFdjWSaDlIo">amazing real-time effects and music</a> into very tight constraints (that&#8217;s <a href="http://en.wikipedia.org/wiki/Commodore_64">30-year-old hardware</a> right there).</p>
<p>So, given my history with the scene, I felt naturally drawn to the comp. There&#8217;s something inexplicably cool (yes, and geeky) about getting a computer to perform for you by using a minimal amount of instructions. Realising that you can optimise a routine by tweaking a few instructions or characters here or there gives you a rush that only computer programmers know. When you succeed in shaving off individual characters to just fit within the 140 character limit, it feels good. And if you&#8217;ve got characters to spare then that&#8217;s just exorbitant, like you&#8217;ve left half your food on your plate.</p>
<p>Anyway, I think I&#8217;ve geeked-out enough for this post.</p>
<p>Next post &#8211; <a href="http://rmd.com.au/archives/tweetcoding-part-2-interference-plasma-fountain">my first three entries</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rmd.com.au/archives/tweetcoding-part-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

