<?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>FUNCTION &#187; 2D</title>
	<atom:link href="http://www.functionblog.com/?feed=rss2&#038;tag=2d" rel="self" type="application/rss+xml" />
	<link>http://www.functionblog.com</link>
	<description>blog about AS3, PHP &#039;n tech</description>
	<lastBuildDate>Mon, 01 Feb 2010 17:37:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ponstructor beta release!</title>
		<link>http://www.functionblog.com/?p=151</link>
		<comments>http://www.functionblog.com/?p=151#comments</comments>
		<pubDate>Sun, 11 Jan 2009 19:11:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[LOL]]></category>
		<category><![CDATA[Released]]></category>

		<guid isPermaLink="false">http://www.functionblog.com/?p=151</guid>
		<description><![CDATA[Since the last post I&#8217;ve been quietly working on a real good version of the bridge builder game for flash.  Take a look at the result after the &#8216;Continue Reading&#8217; link and tell me what you think, (or if you spotted a bug) in the comments.


]]></description>
			<content:encoded><![CDATA[<p>Since the last post I&#8217;ve been quietly working on a real good version of the bridge builder game for flash.  Take a look at the result after the &#8216;Continue Reading&#8217; link and tell me what you think, (or if you spotted a bug) in the comments.</p>
<p><span id="more-151"></span></p>
<p><embed src="http://games.mochiads.com/c/g/ponstructor/ponstructor.swf" width="550" height="500"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.functionblog.com/?feed=rss2&amp;p=151</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Bridge Builder Game! (Concept)</title>
		<link>http://www.functionblog.com/?p=142</link>
		<comments>http://www.functionblog.com/?p=142#comments</comments>
		<pubDate>Sun, 28 Dec 2008 15:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Proof of concepts]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Proof of concept]]></category>
		<category><![CDATA[Rigid Body]]></category>

		<guid isPermaLink="false">http://www.gamitude.nl/?p=142</guid>
		<description><![CDATA[
Some of you might remember a game called pontifex or bridge builder if you don&#8217;t; it&#8217;s a game in which you construct a bridge with beams and than let a train or car drive over it to see whether it holds. It is really fun and quite educational at the same time (equals morally appropriate [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<div id="attachment_144" class="wp-caption aligncenter" style="width: 453px"><img class="size-full wp-image-144" title="bridge" src="http://www.gamitude.nl/wp-content/uploads/2008/12/bridge.jpg" alt="Constraint based bridge simulator" width="443" height="71" /><p class="wp-caption-text">Constraint based bridge simulator</p></div>
<p>Some of you might remember a game called pontifex or bridge builder if you don&#8217;t; it&#8217;s a game in which you construct a bridge with beams and than let a train or car drive over it to see whether it holds. It is really fun and quite educational at the same time (equals morally appropriate right?). After some more research into rigid body constraints I found out that pontifex probably used the same stuff like I used in the <a href="http://www.gamitude.nl/?p=134" target="_blank">2D constraint based rope</a>. So with some minor modifications it was easy to create a bridge simulator and with a littlebit more code even a bridge builder. It is still far from a game suitable for release and profit but it is definatly a playable minigame. Take a look at the working example by clicking the  &#8216;Continue Reading&#8217; link.</p>
<p><span id="more-142"></span></p>
<p>You can build beams by first selecting a particle and than clicking somewhere else (within the &#8216;build length&#8217;) to place a particle to connect it with. To connect two particles with each other select one, and than hover over the other to make it blue and click. To simulate the whether the bridge will hold you need to click the &#8216;Simulate&#8217; button. Press &#8216;Stop&#8217; to stop the simulation and return to the old state. In the simulation you can remove beams by clicking on them.</p>
<p style="text-align: center;"><object width="550" height="300" data="flash/bridgeBuilder/builder.swf" type="application/x-shockwave-flash"><param name="id" value="test" /><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="flash/bridgeBuilder/builder.swf" /><param name="allowfullscreen" value="false" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.functionblog.com/?feed=rss2&amp;p=142</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2D Constraint based rope</title>
		<link>http://www.functionblog.com/?p=134</link>
		<comments>http://www.functionblog.com/?p=134#comments</comments>
		<pubDate>Fri, 26 Dec 2008 16:24:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Rigid Body]]></category>

		<guid isPermaLink="false">http://www.gamitude.nl/?p=134</guid>
		<description><![CDATA[So I was looking into some cool stuff to do with my 3D engine when I came across this. I&#8217;ve always been a fan of physics simulation based realism so I began to work this out in 2D. The first demo was using elastic constraints between particles but that made a very instable system. It [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_133" class="wp-caption alignright" style="width: 135px"><img class="size-full wp-image-133" title="Constraint based rope" src="http://www.gamitude.nl/wp-content/uploads/2008/12/constraintrope.jpg" alt="Constraint based rope simulation" width="125" height="130" /><p class="wp-caption-text">Constraint based rope simulation</p></div>
<p>So I was looking into some cool stuff to do with my 3D engine when I came across <a href="http://seraf.mediabox.fr/wow-engine/wow-engine-technical-advanced-demo-cloth-demo-01/">this</a>. I&#8217;ve always been a fan of physics simulation based realism so I began to work this out in 2D. The first demo was using elastic constraints between particles but that made a very instable system. It can be improved with better integrators like RK4 but that still didn&#8217;t result in the desired result. I might have other plans for these elastic constraints later though. You can read more about elastic constraints <a title="Gaffer's Spring Physics" href="http://gafferongames.wordpress.com/game-physics/spring-physics/" target="_blank">here [Gaffer's tutorial on spring physics]</a> and <a title="Gamasutra's 'Exploring Spring models' tutorial" href="http://www.gamasutra.com/features/20011005/oliveira_01.htm" target="_blank">here [Gamasutra's "Exploring spring models"]</a>. So I went on with inelastic infinitely &#8217;stiff&#8217; constraints which were mentioned in <a title="Advanced Character Physics by Thomas Jakobsen" href="http://www.teknikus.dk/tj/gdc2001.htm" target="_blank">this ["Advanced Character Physics" by Thomas Jakobsen]</a> great resource on computer physics simulation. The result worked out pretty well and will be easy to port to 3D. Which will happen when I&#8217;m done with a little (very interesting) side project using the same code. More about that later&#8230; Check out the working demo after the &#8216;Continue Reading&#8217; link.  <span id="more-134"></span></p>
<p>Below is the working simulation, use your mouse to move the rope. The simulation uses quite a lightweight rope with little friction. Combinations of elastic and inelastic constraints can be used to simulate a lot of different interesting stuff like pudding, crashing cars, stresses on buildings and cloth. Expect more examples soon.</p>
<p style="text-align: center;"><object id="test" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" 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="flash/rope/stick.swf" /><param name="allowfullscreen" value="false" /><embed id="test" type="application/x-shockwave-flash" width="550" height="400" src="flash/rope/stick.swf" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></p>
<p><a title="Constraint based rope source code" href="http://www.functionblog.com/wp-content/uploads/2009/07/Constraint.zip" target="_blank">Download source code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.functionblog.com/?feed=rss2&amp;p=134</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Proof of concept: Flexible 2D Particle System</title>
		<link>http://www.functionblog.com/?p=26</link>
		<comments>http://www.functionblog.com/?p=26#comments</comments>
		<pubDate>Tue, 19 Aug 2008 11:03:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Proof of concepts]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[POCs]]></category>
		<category><![CDATA[Proof of concept]]></category>

		<guid isPermaLink="false">http://www.gamitude.nl/?p=26</guid>
		<description><![CDATA[Something very powerfull for creating reallistic and flexible effects is a particle system. This is a flexible and basic particle system I created about 2 months ago. Again this is just a proof of concept, currently the max. number of particles is about 400-500. But this can be greatly increased by removing the blur and [...]]]></description>
			<content:encoded><![CDATA[<p>Something very powerfull for creating reallistic and flexible effects is a particle system. This is a flexible and basic particle system I created about 2 months ago. Again this is just a proof of concept, currently the max. number of particles is about 400-500. But this can be greatly increased by removing the blur and replacing it with an image, this would however make it lose some of it&#8217;s flexibility. Below is a smoke demo, but the posibilities are endless, steam, fire, explosions to name a few&#8230;</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="id" value="test" /><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="flash/POCs/ParticleSystem/test.swf" /><embed id="test" type="application/x-shockwave-flash" width="550" height="100" src="flash/POCs/ParticleSystem/test.swf" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></p>
<p style="text-align: left;">Usage is as follows:<br />
[sourcecode language='actionscript']import com.particles.particleSystem;</p>
<p>var scene:particleSystem = new particleSystem();<br />
this.addChild(scene);<br />
scene.pX = 40; // The x-position of the particle&#8217;s source<br />
scene.pY = 50; // The y-position of the particle&#8217;s source<br />
scene.vY = 0; // The speed on the y axis (can also be negative)<br />
scene.vX = 4; // The speed on the x axis (can also be negative)<br />
scene.deviation = 2; // The possible deviation from the standard speed<br />
scene.transparency = 1; // The transparency of the particles (levels lower than 1 greatly deteriorate the performance<br />
scene.color = 0&#215;000000; // Colour of the particles<br />
scene.lifetime = 5000; // Lifetime of the particles in milliseconds<br />
scene.size = 10; // Size of the particles<br />
scene.maxParticles = 300; // Maximum number of particles<br />
scene.startBlur = 10; // The amount of blur<br />
scene.bExplode = false; // Set this to true if you want to let the particles all explode at once</p>
<p>scene.start();[/sourcecode]<br />
There is still quite some room for improvement, especially getting to know when to stop the particle system is a bit tricky.</p>
<p style="text-align: left;">Download the <a href="http://www.gamitude.nl/flash/particle/2DParticle.zip" target="_blank">Particle System class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.functionblog.com/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
