<?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; Rigid Body</title>
	<atom:link href="http://www.functionblog.com/?feed=rss2&#038;tag=rigid-body" 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>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>
	</channel>
</rss>
