<?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>Blog.birdsigh &#187; Coding</title>
	<atom:link href="http://blog.birdsigh.com/topics/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.birdsigh.com</link>
	<description></description>
	<lastBuildDate>Thu, 11 Feb 2010 00:56:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Playing With Particles Pt.2</title>
		<link>http://blog.birdsigh.com/2010/02/11/playing-with-particles-pt2/</link>
		<comments>http://blog.birdsigh.com/2010/02/11/playing-with-particles-pt2/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 00:54:20 +0000</pubDate>
		<dc:creator>Tim Crook</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://blog.birdsigh.com/?p=256</guid>
		<description><![CDATA[Since my previous post I have had a chance to play around with a very basic implementation of soft body physics in Flash, using Verlet integration. Using lots of particles constrained into one blob would have required far more processing power than is feasible, and hopefully using Verlet integration will give the results I want [...]]]></description>
			<content:encoded><![CDATA[<p>Since my <a href="http://blog.birdsigh.com/2010/02/06/playing-with-particles/" title="Playing With Particles Pt.1">previous post</a> I have had a chance to play around with a very basic implementation of soft body physics in Flash, using Verlet integration. Using lots of particles constrained into one blob would have required far more processing power than is feasible, and hopefully using Verlet integration will give the results I want without such a great performance cost. A very useful introduction and further details about the basics of the Verlet integration method can be found <a title="Advanced Character Physics - Verlet Integration" href="http://www.teknikus.dk/tj/gdc2001.htm" target="_blank">here</a>, from Thomas Jakobsen. This paper describes in brief the algorithms that were developed for IO Interactive’s game &#8216;Hitman: Codename 47&#8242;, the details of the Verlet integration are abstract enough that they can be applied elsewhere. In this case, AS3!</p>
<p><br/></p>
<div align="center"><object id="test-3" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://allofus.birdsigh.com/me3/test-3.swf" /><param name="name" value="test-3" /><param name="allowfullscreen" value="false" /><embed id="test-3" type="application/x-shockwave-flash" width="400" height="400" src="http://allofus.birdsigh.com/me3/test-3.swf" name="test-3" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></div>
<p>After much trial and error I was able to get a simple version of verlet integration running for my blobs. After more tweaking, and adding a secondary internal boundary for stability, I was getting somewhere closer to the end result I wanted. As you can see there are still issues when the blobs collide with each other, and when the force applied to the blob is too great it can sometimes fold in on itself.</p>
<p>For this reason I decided to try and adapt some of what I had here and combine it with both the fluid filters I had already come up with, to merge boundaries, and the particle engine to control the position and velocity of the blobs.</p>
<p><br/></p>
<div align="center"><object id="test-4" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://allofus.birdsigh.com/me3/test-4.swf" /><param name="name" value="test-4" /><param name="allowfullscreen" value="false" /><embed id="test-4" type="application/x-shockwave-flash" width="400" height="400" src="http://allofus.birdsigh.com/me3/test-4.swf" name="test-4" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></div>
<p>Using a tweaked version of the soft body physics blobs (to fix some of the more erratic behaviour) I have so far only added the fluid filters (as shown above). Controlling the position of the blobs using Flint is proving to be a little more tricky and will likely require some reworking of the Verlet integration used. The performance at smaller scales such as above is quite satisfactory, but scaling it up to the large resolutions I will need means the frame-rate dropping to 10fps and below when a large number of blobs are colliding. Hopefully I can regain some of the lost performance by doing as much of the bitmap processing in Pixel Blender as possible, and controlling the particle motion with Flint.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.birdsigh.com/2010/02/11/playing-with-particles-pt2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing With Particles Pt.1</title>
		<link>http://blog.birdsigh.com/2010/02/06/playing-with-particles/</link>
		<comments>http://blog.birdsigh.com/2010/02/06/playing-with-particles/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 20:00:26 +0000</pubDate>
		<dc:creator>Tim Crook</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://blog.birdsigh.com/?p=237</guid>
		<description><![CDATA[I have recently started playing around with particles in Flash for an upcoming project and thought I might share some of the results I have had with the FLINT particle system. You can click on the examples to move the particles around. I started by experimenting with the basic behaviours and actions available in FLINT. [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently started playing around with particles in Flash for an upcoming project and thought I might share some of the results I have had with the <a title="FLINT Particle System" href="http://flintparticles.org/" target="_blank">FLINT particle system</a>. You can click on the examples to move the particles around.</p>
<p><br/></p>
<div align="center"><object id="test-1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://allofus.birdsigh.com/me3/test-1.swf" /><param name="name" value="test-1" /><param name="allowfullscreen" value="false" /><embed id="test-1" type="application/x-shockwave-flash" width="400" height="400" src="http://allofus.birdsigh.com/me3/test-1.swf" name="test-1" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></div>
<p>I started by experimenting with the basic behaviours and actions available in FLINT. Combining different actions such attractors, velocity matching, minimum distance, collision and many more allow you to quickly and easily come up with complex particle behaviour and flocking.</p>
<p><br/></p>
<div align="center"><object id="test-1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://allofus.birdsigh.com/me3/test-2.swf" /><param name="name" value="test-1" /><param name="allowfullscreen" value="false" /><embed id="test-1" type="application/x-shockwave-flash" width="400" height="400" src="http://allofus.birdsigh.com/me3/test-2.swf" name="test-1" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></div>
<p>I then used some basic filters to create a fluid effect when particles are close to each other, a bit too much like a lava-lamp for what I want, but nice nonetheless! Ultimately I want to create large &#8216;blobs&#8217; with boundaries that can ripple and respond to collisions in a way that is convincingly fluid-like. I did some quick tests (shown in the video below) to try and achieve this, but the CPU usage is far above what I will have available for this project. Hopefully I can get something similar to this running efficiently enough to work on a Mac Mini. I think I may end up using a combination of what I have here along with an implementation of soft-body physics using Verlet integration, however, that in itself is likely to be rather CPU intensive so I think more research is needed first&hellip;</p>
<p><br/></p>
<div align="center"><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9255186&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9255186&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>
<p><a href="http://vimeo.com/9255186">Watch &#8216;Blob Test&#8217; in HD</a> from <a href="http://vimeo.com/birdsigh">birdsigh</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
</div>
<p><br/></p>
<p><a href="http://blog.birdsigh.com/2010/02/11/playing-with-particles-pt2/" title="Playing With Particles Pt.2">Read Pt.2 of &#8216;Playing with Partilcles&#8217;&hellip;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.birdsigh.com/2010/02/06/playing-with-particles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flame Alc &#8211; on!!</title>
		<link>http://blog.birdsigh.com/2008/11/30/flame_alc-on/</link>
		<comments>http://blog.birdsigh.com/2008/11/30/flame_alc-on/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 01:28:33 +0000</pubDate>
		<dc:creator>Tim Crook</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://blog.birdsigh.com/?p=183</guid>
		<description><![CDATA[Adobe recently announced the first public release of a research project code-named Alchemy. Alchemy is a C/C++ to ActionScript compiler, which opens up a huge new world for the Flash platform. Compiling some C or C++ code with Alchemy will result with a class that is basically a virtual machine, written in ActionScript and AVM2 [...]]]></description>
			<content:encoded><![CDATA[<p><span>Adobe recently announced the first public release of a research project code-named <a onclick="javascript:urchinTracker('/outbound/labs.adobe.com/technologies/alchemy/');" href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a>. Alchemy is a C/C++ to ActionScript compiler, which opens up a huge new world for the Flash platform. Compiling some C or C++ code with Alchemy will result with a class that is basically a virtual machine, written in ActionScript and AVM2 bytecode.</span></p>
<p>Following the <a title="Adobe Alchemy: Getting Started" href="http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started" target="_blank">getting started</a> on the Adobe Labs site <a title="Marc Hibbins" href="http://hibbins.wordpress.com/2008/12/02/find-a-way/">Marc</a> and I set about trying to setup Alchemy on Linux and OSX respectively. Cue much frustration and cursing! The guide given on the site is actually very straight forward and easy to follow, but (for the moment at least) following the guide will not mean you are ready to start playing with Alchemy.</p>
<p>Unfortunately, the symlinks in the Alchemy bin directory for <em>&#8216;g++&#8217;</em> and <em>&#8216;gcc&#8217;</em> ($ALCHEMY/bin/llvm-gcc) will point to the sub-folder <em>&#8216;llvm-gcc4-ubuntu-install&#8217;</em> in the bin directory ($ALCHEMY/bin/llvm-gcc4-ubuntu-install/bin/llvm-gcc). This may be fine if that happens to be the version you are setting up uses this structure, if not then you could waste a lot of time trying to find out why gcc and g++ silently fail whenever they are run. These symlinks should be changed to match the sub-folder in the bin directory of Alchemy. In the case of gcc this symlink should be changed to:</p>
<blockquote><p>&#8216;$ALCHEMY/bin/llvm-gcc4-[flavour of os here]-install/bin/gcc</p>
<p>e.g. &#8216;$ALCHEMY/bin/llvm-gcc4-darwin-install/bin/gcc&#8217;, in the case of OSX.</p></blockquote>
<p>This has been <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&amp;catid=755&amp;threadid=1406714&amp;enterthread=y">noted</a> (as of 11/20/2008) and the config will be fixed to resolve this issue in the next release. But for now, check your symlinks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.birdsigh.com/2008/11/30/flame_alc-on/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
