<?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>Parade of Rain &#187; Links</title>
	<atom:link href="http://www.paradeofrain.com/category/game-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paradeofrain.com</link>
	<description>Indie Game Development</description>
	<lastBuildDate>Sun, 22 Jan 2012 03:49:57 +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>Links for Thought</title>
		<link>http://www.paradeofrain.com/2010/08/links-for-thought/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=links-for-thought</link>
		<comments>http://www.paradeofrain.com/2010/08/links-for-thought/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 17:50:23 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[idevblogaday]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[tilt to live]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=987</guid>
		<description><![CDATA[It&#8217;s been busy, busy, busy as of late. We&#8217;re in full swing trying to get Tilt to Live HD ready for the iPad. It&#8217;s looking amazing thus far and plays a lot better than just the 2x mode for the original Tilt to Live. Frostbite mode just went out the door a few days ago, [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin-right: 10px; margin-bottom: 10px;" title="TTLHD" src="http://www.paradeofrain.com/wp-content/uploads/2010/08/icon72.png" alt="" width="72" height="72" />It&#8217;s been busy, busy, busy as of late. We&#8217;re in full swing trying to get Tilt to Live HD ready for the iPad. It&#8217;s looking amazing thus far and plays a lot better than just the 2x mode for the original Tilt to Live. Frostbite mode just went out the door a few days ago, and the response has been positive so far. We&#8217;ve been getting some responses from users saying the game has become too easy in the other modes. I haven&#8217;t tweaked anything in the other modes for ages so my hunches to why users are believing this are:</p>
<ul>
<li>It&#8217;s been a while since they&#8217;ve played and when they came back it was like riding a bicycle and they instantly got into the flow of the game.</li>
<li>Performance has degraded on the lower end devices (particularly when running iOS4), which slows the game down and as a result makes it &#8216;easier&#8217;.</li>
</ul>
<p>I&#8217;ve tested the game on a 2nd gen ipod touch with iOS4 and it seems to run fine performance-wise. So it&#8217;s something I guess I&#8217;ll just keep on my mind when doing further updates to the game. Maybe revisiting Code Red mode and making it <strong>even harder</strong> could be a possibility to appease the hardcore users.</p>
<p style="text-align: center;"><a href="http://www.paradeofrain.com/wp-content/uploads/2010/08/titlescreen.png" rel="lightbox[987]"><img class="size-medium wp-image-1009 aligncenter" title="titlescreen" src="http://www.paradeofrain.com/wp-content/uploads/2010/08/titlescreen-300x225.png" alt="" width="300" height="225" /></a></p>
<h4>Some Reading Links</h4>
<p>Whenever I have time to kill I go browsing through my RSS feed to catch up on things. I decided to share a few of my usual reading links. Maybe you&#8217;ll find something of interest in this pile as I tried to focus on reading links that are outside the iphone development community. A lot I&#8217;m sure are common go-to places for a lot of indie devs regardless of platform.</p>
<p><a href="http://positech.co.uk/cliffsblog/">Cliffski&#8217;s Blog</a></p>
<p>I feel like just about anyone that has any semblance of what goes on in the indie world is at least aware of Cliff Harris and his musings on his blog on both his own games and the industry as a whole.</p>
<p><a href="http://fullbright.blogspot.com/">Fullbright</a></p>
<p>Steve Gaynor&#8217;s [Bioshock 2] video game design blog. Always a good read and has valuable insights into not only the design of mechanics in games but about the medium of games overall.</p>
<p><a href="http://blogs.msdn.com/b/shawnhar/">Shawn Hargreaves </a></p>
<p>For a time I worked mostly in XNA and C#. While most of his recent posts are about gearing up for windows phone 7 and other XNA tech, his technical but easily readable posts were extremely helpful not just in XNA, but any platform you may be starting out on. Great learning for those that don&#8217;t have true game industry experience (like me). His credits include Extreme-G (N64), Moto GP (Xbox/PC), and several other racing games.</p>
<p><a href="http://marksibly.blogspot.com/">Mark Sibly</a></p>
<p>Ok, not many updates for this blog but that&#8217;s not the point. Creator of Blitz Basic and <a href="http://blitzmax.com/">Blitzmax</a>. For those that don&#8217;t know anything about it, Blitzmax is a very nice cross platform language (PC/Mac/Linux) for developing 2D (and 3D) games. It&#8217;s a very small and friendly community, but one I spent a lot of time in when I first started getting serious about making independent games. The tech he currently is working on seems like really exciting stuff: <strong>A language that allows you to target HTML5, flash, XNA, Android, iPhone, native GL for game development</strong>. Very ambitious, but very exciting to keep tabs on!</p>
<p><a href="http://beautifulpixels.blogspot.com/">Beautiful Pixels</a></p>
<p>Great graphics and game development blog. I believe he recently went to work for Google on Chrome OS. Great posts to browser through, and I&#8217;m sure some very useful ones in the coming future. Despite having a lot of &#8216;game oriented&#8217; blogs on my feed, I tend to follow developers outside the game industry as well. And now that he&#8217;s at Google, I&#8217;m sure lots of good will come of it <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><a href="http://gamearchitect.net/">Game Architect</a></p>
<p>A great blog on finding the &#8216;hard to find in a book&#8217; answers to questions that come up during development. Like what&#8217;s a good way to <a href="http://gamearchitect.net/2008/06/01/an-anatomy-of-despair-aggregation-over-inheritance/">keep you from creating a crazy object hierarchy but still have flexibility</a>. Great thoughts on middleware as well.</p>
<p><a href="http://greyaliengames.com/blog/">Grey Alien Games</a></p>
<p>I&#8217;ve been following Jake Birkett for several years now as I was going through high school and college. His success as an indie was very inspiring. Great place to read for motivational and lifestyle posts as well as general independent game development. He was also a very involved community member in the Blitzmax community, writing a pretty successful game framework to allow developers to more quickly make indie casual games on the PC.</p>
<p><a href="http://www.lostgarden.com/">Lost Garden</a></p>
<p>If you haven&#8217;t heard of this site and Danc by now, then&#8230;I don&#8217;t know what more to say.</p>
<p><a href="http://bittermanandy.wordpress.com/">Pandemonium</a></p>
<p>Andy Patrick&#8217;s blog. Great info from an experienced developer. He previously worked at Rare on Kameo and Viva Pinata. Hasn&#8217;t had an update in over a year but some good content on programming things like cameras, game programming in a garbage collected environment, and tool recommendations. One article I really liked was going over <a href="http://bittermanandy.wordpress.com/2008/08/05/at-your-command/">how to implement infinite undo/redo in an game editor</a>.</p>
<p><a href="http://anawiki.com/sellmoregames/">Sell More Games</a></p>
<p>Great site has articles focusing more on the marketing and business side of indie game development. Mostly geared towards the PC market, but I feel all of it is still applicable to the iPhone market.</p>
<p><a href="http://makeitbigingames.com/">Make it BIG in games</a></p>
<p>I believe I&#8217;ve referenced Jeff Tunnell&#8217;s <a href="http://makeitbigingames.com/2009/01/one-way-to-divide-your-company-equity-at-start-up/">blog entries</a> before, but it&#8217;s worth listing again.</p>
<p><a href="http://designreboot.blogspot.com/">Gausswerks Design Reboot</a></p>
<p>Another great game design blog. Less on the technical and more on the design and art of games. I&#8217;m ashamed to admit I don&#8217;t read enough of these articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2010/08/links-for-thought/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Games speaking to the human condition</title>
		<link>http://www.paradeofrain.com/2010/01/games-speaking-to-the-human-condition/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=games-speaking-to-the-human-condition</link>
		<comments>http://www.paradeofrain.com/2010/01/games-speaking-to-the-human-condition/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 20:20:13 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=706</guid>
		<description><![CDATA[I had seen a few things written about &#8220;Everyday the same dream&#8220;, a game created by but never took the time to try it out myself until recently. It&#8217;s a compelling art game where you try to subvert you&#8217;re daily routine. It took me a few minutes to figure out what to do after a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.paradeofrain.com/wp-content/uploads/2010/01/edtsd.jpg" rel="lightbox[706]"><img class="size-full wp-image-707 aligncenter" title="Everyday the same dream" src="http://www.paradeofrain.com/wp-content/uploads/2010/01/edtsd.jpg" alt="" width="500" height="375" /></a></p>
<p>I had seen a few things written about &#8220;<a href="http://www.molleindustria.org/everydaythesamedream/everydaythesamedream.html">Everyday the same dream</a>&#8220;, a game created by but never took the time to try it out myself until recently. It&#8217;s a compelling art game where you try to subvert you&#8217;re daily routine. It took me a few minutes to figure out what to do after a few days of the mundane routine, but  that added to the whole experience of the game itself. It&#8217;s a very subtle, but clever design that speaks to a wider audience.</p>
<p>Be sure to give it a <a href="http://www.molleindustria.org/everydaythesamedream/everydaythesamedream.html">try</a>. It only takes 5-10 minutes to play through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2010/01/games-speaking-to-the-human-condition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iSimulate or Bust</title>
		<link>http://www.paradeofrain.com/2009/10/isimulate-or-bust/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=isimulate-or-bust</link>
		<comments>http://www.paradeofrain.com/2009/10/isimulate-or-bust/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 21:28:54 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iSimulate]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=580</guid>
		<description><![CDATA[I finally got rid of the stupid&#8230; "ld: warning in &#60;foo&#62;.so, file is not of required architecture." &#8230;warning when using iSimulate. If you&#8217;re not using iSimulate or a similar technology you&#8217;re losing valuable time even if you don&#8217;t use the accelerometer or GPS functions. Then again, I might not be the best spokesperson on time [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got rid of the stupid&#8230;</p>
<blockquote><p><tt>"ld: warning in &lt;foo&gt;.so, file   is not of required architecture." </tt></p></blockquote>
<p>&#8230;warning when using <a href="http://www.vimov.com/isimulate/">iSimulate</a>. <strong>If you&#8217;re not using iSimulate or a similar technology you&#8217;re losing valuable time</strong> even if you don&#8217;t use the accelerometer or GPS functions. Then again, I might not be the best spokesperson on time since I spent the <a href="http://www.paradeofrain.com/2009/10/eureka-multi-threaded-iphone-texture-loading-is-a-go/">weekend re-inventing the wheel</a>.</p>
<p style="text-align: center;"><img class="size-full wp-image-590 aligncenter" title="isimulate" src="http://www.paradeofrain.com/wp-content/uploads/2009/10/isimulate.jpg" alt="isimulate" width="350" height="262" /></p>
<p style="text-align: left;">I have this need to make sure my projects compile w/o warnings. I let it sit for a while because I&#8217;m not an XCode expert so I knew I wanted to conditionally link it in but I couldn&#8217;t find the UI for it. <a href="http://www.vimov.com/isimulate/documentation/#installation">The process in which they suggest you integrate iSimulate</a> into your XCode project truly is <em>easy</em>, but I felt icky when it came up with warnings when you compile against the actual device.  <strong>There are better ways of doing that</strong>. Namely, <a href="http://developer.apple.com/iPhone/library/documentation/DeveloperTools/Conceptual/XcodeProjectManagement/210-Building_Products/building.html#//apple_ref/doc/uid/TP40002693-SW43">conditional build settings</a>. Of course, it requires a few more steps and a bit more knowledge of the XCode environment so I suspect that wouldn&#8217;t help their marketing. Regardless, having the iSimulate linker flags and library search paths only be added when you&#8217;re compiling for a simulator is relatively easy to setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2009/10/isimulate-or-bust/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Canabalt: Powerful, simple, game design</title>
		<link>http://www.paradeofrain.com/2009/10/canabalt-powerful-simple-game-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=canabalt-powerful-simple-game-design</link>
		<comments>http://www.paradeofrain.com/2009/10/canabalt-powerful-simple-game-design/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 05:32:25 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[canabalt]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=558</guid>
		<description><![CDATA[Every now and then I come across a game that is rather inspiring. Strangely, a lot of them come from the flash community. I really like it when someone can take a game mechanic that is so utterly constrained and create something so enjoyable out of it. The epitome of these design challenges might be [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.canabalt.com/"><img class="size-full wp-image-559 aligncenter" title="canabalt" src="http://www.paradeofrain.com/wp-content/uploads/2009/10/canabalt-378x253.jpg" alt="canabalt-378x253" width="378" height="253" /></a></p>
<p>Every now and then I come across a game that is rather inspiring. Strangely, a lot of them come from the flash community. I really like it when someone can take a game mechanic that is so utterly constrained and create something so enjoyable out of it. The epitome of these design challenges might be the &#8216;One-Button&#8217; games. I just recently came across <a href="http://www.canabalt.com/">Canabalt</a>, and it had me playing for a while despite the need for sleep.</p>
<p>The sense of urgency and the whole atmosphere implies a bigger and more ominous &#8216;universe&#8217; than what the gameplay focuses on, and is a treat. I&#8217;ve died several times trying to figure out the fleeting images in the background only to slam into a wall, haha!  I&#8217;ll be checking it out on my iPhone later this week. Hats off to them for getting it onto the App Store and good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2009/10/canabalt-powerful-simple-game-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yummy Digests</title>
		<link>http://www.paradeofrain.com/2008/07/yummy-digests/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yummy-digests</link>
		<comments>http://www.paradeofrain.com/2008/07/yummy-digests/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 18:39:02 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[anti-cheat]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[hash digest]]></category>
		<category><![CDATA[SHA-1]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=97</guid>
		<description><![CDATA[I've been working on a few projects that require blitzmax and a web-server (php/mysql) to communicate. Along came the need to hash files. This code archive entry was very useful . I decided to wrap it into  an object and add a new method to it. Even though it's a series of functions I still [...]]]></description>
			<content:encoded><![CDATA[<p>I've been working on a few projects that require blitzmax and a web-server (php/mysql) to communicate. Along came the need to hash files. <strong><a href="http://www.blitzmax.com/codearcs/codearcs.php?code=1449">This</a></strong> code archive entry was very useful <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I decided to wrap it into  an object and add a new method to it. Even though it's a series of functions I still tend to make types with functions in them to help me organize them (it's like a cheap way of  namespacing). I needed the ability to hash a file using Sha-1 hashing. Seeing that php has a function called sha1_file($pathToFile) I figured I'd implement the equivalent on blitzmax. With this <strong>THasher</strong> type, I've added a SHA1_File(path) function also.</p>
<h4><strong>Why hash files?</strong></h4>
<p>There are many reasons to use hashes, but recently I used it to check for file changes. If you've ever wanted to find out if some arbitrary file has 'changed' since the last time you've opened it this can prove to be useful. If you save the hash beforehand then recompute the hash now and if they are different, then something's changed! Some applications of this are:</p>
<ul>
<li><strong>Write a file-updater to quickly find out which new files need to be downloaded</strong>. Just comparing hashes would be sufficient in most cases, instead of having to go individually byte-by-byte or traversing the file structure to find a difference.</li>
<li><strong>help stop cheating</strong>. If you don't want users changing texture files to gain an advantage or don't want them 'mucking' with any other data file. If you check the current hash against a previously approved one and it doesn't check out then the file has more than likely been tampered with.</li>
</ul>
<h4><strong>How Do I Use THasher?</strong></h4>
<p>If you want to hash a string using SHA-1 then:</p>
<div class="syntax_hilite">
<div id="blitzmax2-4">
<div class="blitzmax2"><span style="color: #D9D100;">Local</span> hashedFoo:<span style="color: #D9D100;">String</span> = THasher.sha1<span style="color: #ffffff;">&#40;</span><span style="color: #00ff66;">"Foo"</span><span style="color: #ffffff;">&#41;</span></div>
</div>
</div>
<p></p>
<p>Want to hash a whole file? Then:</p>
<div class="syntax_hilite">
<div id="blitzmax2-5">
<div class="blitzmax2"><span style="color: #D9D100;">Local</span> filehash:<span style="color: #D9D100;">String</span> = THasher.SHA1_File<span style="color: #ffffff;">&#40;</span><span style="color: #00ff66;">"someFile.txt"</span><span style="color: #ffffff;">&#41;</span></div>
</div>
</div>
<p>
Keep in mind you can hash <em>any</em> file, not just text files like in the above example.</p>
<p>Anyway, read on for the whole file. With the exception of SHA1_File() I did not write these hashing functions for Blitzmax. They were simply taken from Yan's very helpful <strong><a href="http://www.blitzmax.com/codearcs/codearcs.php">code archives</a></strong> post <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
<span id="more-97"></span></p>
<div class="syntax_hilite">
<div id="blitzmax2-6">
<div class="blitzmax2"><span style="color: #D9D100;">Strict</span></p>
<p><span style="color: #D9D100;">Type</span> THasher</p>
<p>&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> MD5:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> h0:<span style="color: #D9D100;">Int</span> = $<span style="color: #15ffb9;">67452301</span>, h1 = $EFCDAB89, h2 = $98BADCFE, h3 = $<span style="color: #15ffb9;">10325476</span><br />
&nbsp; &nbsp;&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> r:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#91;</span><span style="color: #15ffb9;">7</span>, <span style="color: #15ffb9;">12</span>, <span style="color: #15ffb9;">17</span>, <span style="color: #15ffb9;">22</span>, <span style="color: #15ffb9;">7</span>, <span style="color: #15ffb9;">12</span>, <span style="color: #15ffb9;">17</span>, <span style="color: #15ffb9;">22</span>, <span style="color: #15ffb9;">7</span>, <span style="color: #15ffb9;">12</span>, <span style="color: #15ffb9;">17</span>, <span style="color: #15ffb9;">22</span>, <span style="color: #15ffb9;">7</span>, <span style="color: #15ffb9;">12</span>, <span style="color: #15ffb9;">17</span>, <span style="color: #15ffb9;">22</span>,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #15ffb9;">5</span>, <span style="color: #15ffb9;">9</span>, <span style="color: #15ffb9;">14</span>, <span style="color: #15ffb9;">20</span>, <span style="color: #15ffb9;">5</span>, <span style="color: #15ffb9;">9</span>, <span style="color: #15ffb9;">14</span>, <span style="color: #15ffb9;">20</span>, <span style="color: #15ffb9;">5</span>, <span style="color: #15ffb9;">9</span>, <span style="color: #15ffb9;">14</span>, <span style="color: #15ffb9;">20</span>, <span style="color: #15ffb9;">5</span>, <span style="color: #15ffb9;">9</span>, <span style="color: #15ffb9;">14</span>, <span style="color: #15ffb9;">20</span>,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #15ffb9;">4</span>, <span style="color: #15ffb9;">11</span>, <span style="color: #15ffb9;">16</span>, <span style="color: #15ffb9;">23</span>, <span style="color: #15ffb9;">4</span>, <span style="color: #15ffb9;">11</span>, <span style="color: #15ffb9;">16</span>, <span style="color: #15ffb9;">23</span>, <span style="color: #15ffb9;">4</span>, <span style="color: #15ffb9;">11</span>, <span style="color: #15ffb9;">16</span>, <span style="color: #15ffb9;">23</span>, <span style="color: #15ffb9;">4</span>, <span style="color: #15ffb9;">11</span>, <span style="color: #15ffb9;">16</span>, <span style="color: #15ffb9;">23</span>,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #15ffb9;">6</span>, <span style="color: #15ffb9;">10</span>, <span style="color: #15ffb9;">15</span>, <span style="color: #15ffb9;">21</span>, <span style="color: #15ffb9;">6</span>, <span style="color: #15ffb9;">10</span>, <span style="color: #15ffb9;">15</span>, <span style="color: #15ffb9;">21</span>, <span style="color: #15ffb9;">6</span>, <span style="color: #15ffb9;">10</span>, <span style="color: #15ffb9;">15</span>, <span style="color: #15ffb9;">21</span>, <span style="color: #15ffb9;">6</span>, <span style="color: #15ffb9;">10</span>, <span style="color: #15ffb9;">15</span>, <span style="color: #15ffb9;">21</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> k:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#91;</span>$D76AA478, $E8C7B756, $242070DB, $C1BDCEEE, $F57C0FAF, $4787C62A,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $A8304613, $FD469501, $698098D8, $8B44F7AF, $FFFF5BB1, $895CD7BE,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $6B901122, $FD987193, $A679438E, $49B40821, $F61E2562, $C040B340,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $265E5A51, $E9B6C7AA, $D62F105D, $<span style="color: #15ffb9;">02441453</span>, $D8A1E681, $E7D3FBC8,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $21E1CDE6, $C33707D6, $F4D50D87, $455A14ED, $A9E3E905, $FCEFA3F8,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $676F02D9, $8D2A4C8A, $FFFA3942, $8771F681, $6D9D6122, $FDE5380C,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $A4BEEA44, $4BDECFA9, $F6BB4B60, $BEBFBC70, $289B7EC6, $EAA127FA,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $D4EF3085, $04881D05, $D9D4D039, $E6DB99E5, $1FA27CF8, $C4AC5665,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $F4292244, $432AFF97, $AB9423A7, $FC93A039, $655B59C3, $8F0CCC92,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $FFEFF47D, $85845DD1, $6FA87E4F, $FE2CE6E0, $A3014314, $4E0811A1,&nbsp; ..<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $F7537E82, $BD3AF235, $2AD7D2BB, $EB86D391<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> intCount = <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length + <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">6</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>intCount<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp;&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> c = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> in:<span style="color: #D9D100;">String</span>.length<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> | <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span>c<span style="color: #ffffff;">&#93;</span> &amp; $FF<span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>c &amp; <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> | <span style="color: #ffffff;">&#40;</span>$<span style="color: #15ffb9;">80</span> <span style="color: #D9D100;">Shl</span> <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length &amp; <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> &amp; $FFFFFFFF<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">32</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> chunkStart = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> intCount <span style="color: #D9D100;">Step</span> <span style="color: #15ffb9;">16</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> a = h0, b = h1, c = h2, d = h3<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">15</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> f = d ~ <span style="color: #ffffff;">&#40;</span>b &amp; <span style="color: #ffffff;">&#40;</span>c ~ d<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = d<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;d = c ; c = b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = Rol<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>a + f + k<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> + <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart + i<span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span>, r<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span> + b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">16</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">31</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> f = c ~ <span style="color: #ffffff;">&#40;</span>d &amp; <span style="color: #ffffff;">&#40;</span>b ~ c<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = d<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;d = c ; c = b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = Rol<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>a + f + k<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> + <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">5</span> * i<span style="color: #ffffff;">&#41;</span> + <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#41;</span> &amp; <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span>, r<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span> + b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">32</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">47</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> f = b ~ c ~ d<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = d<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;d = c ; c = b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = Rol<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>a + f + k<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> + <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">3</span> * i<span style="color: #ffffff;">&#41;</span> + <span style="color: #15ffb9;">5</span><span style="color: #ffffff;">&#41;</span> &amp; <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span>, r<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span> + b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">48</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">63</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> f = c ~ <span style="color: #ffffff;">&#40;</span>b | ~d<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = d<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;d = c ; c = b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = Rol<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>a + f + k<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> + <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">7</span> * i<span style="color: #ffffff;">&#41;</span> &amp; <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span>, r<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><span style="color: #ffffff;">&#41;</span> + b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h0:+a ; h1:+b<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h2:+c ; h3:+d<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Return</span> <span style="color: #ffffff;">&#40;</span>LEHex<span style="color: #ffffff;">&#40;</span>h0<span style="color: #ffffff;">&#41;</span> + LEHex<span style="color: #ffffff;">&#40;</span>h1<span style="color: #ffffff;">&#41;</span> + LEHex<span style="color: #ffffff;">&#40;</span>h2<span style="color: #ffffff;">&#41;</span> + LEHex<span style="color: #ffffff;">&#40;</span>h3<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span>.ToLower<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span></p>
<p>&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> SHA1_File:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#40;</span>path:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">If</span> <span style="color: #D9D100;">FileType</span><span style="color: #ffffff;">&#40;</span>path<span style="color: #ffffff;">&#41;</span> = <span style="color: #15ffb9;">1</span> <span style="color: #D9D100;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> bytes:Byte<span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #D9D100;">New</span> Byte<span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">FileSize</span><span style="color: #ffffff;">&#40;</span>path<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> s:TStream = <span style="color: #D9D100;">ReadFile</span><span style="color: #ffffff;">&#40;</span>path<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">If</span> s <span style="color: #D9D100;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #D9D100;">ReadBytes</span><span style="color: #ffffff;">&#40;</span>bytes, bytes.Length<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.Close<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> <span style="color: #D9D100;">str</span>:<span style="color: #D9D100;">String</span> = <span style="color: #D9D100;">String</span>.FromBytes<span style="color: #ffffff;">&#40;</span>bytes, bytes.length<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Return</span> THasher.SHA1<span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">str</span><span style="color: #ffffff;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">End</span> <span style="color: #D9D100;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">End</span> <span style="color: #D9D100;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Return</span> <span style="color: #00ff66;">""</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> SHA1:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> h0 = $<span style="color: #15ffb9;">67452301</span>, h1 = $EFCDAB89, h2 = $98BADCFE, h3 = $<span style="color: #15ffb9;">10325476</span>, h4 = $C3D2E1F0<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> intCount = <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length + <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">6</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>intCount<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> c = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> in:<span style="color: #D9D100;">String</span>.length<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span>c<span style="color: #ffffff;">&#93;</span> &amp; $FF<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> | $<span style="color: #15ffb9;">80</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">3</span> - <span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length &amp; <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">32</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> &amp; $FFFFFFFF<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> chunkStart = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> intCount <span style="color: #D9D100;">Step</span> <span style="color: #15ffb9;">16</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> a = h0, b = h1, c = h2, d = h3, e = h4<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> w<span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart..chunkStart + <span style="color: #15ffb9;">16</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;w = w<span style="color: #ffffff;">&#91;</span>..<span style="color: #15ffb9;">80</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">16</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">79</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> = Rol<span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#93;</span> ~ w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#93;</span> ~ w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">14</span><span style="color: #ffffff;">&#93;</span> ~ w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">16</span><span style="color: #ffffff;">&#93;</span>, <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">19</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = Rol<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">5</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span>d ~ <span style="color: #ffffff;">&#40;</span>b &amp; <span style="color: #ffffff;">&#40;</span>c ~ d<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> + e + $5A827999 + w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;e = d ; d = c<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;c = Rol<span style="color: #ffffff;">&#40;</span>b, <span style="color: #15ffb9;">30</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = a ; a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">20</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">39</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = Rol<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">5</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span>b ~ c ~ d<span style="color: #ffffff;">&#41;</span> + e + $6ED9EBA1 + w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;e = d ; d = c<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;c = Rol<span style="color: #ffffff;">&#40;</span>b, <span style="color: #15ffb9;">30</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = a ; a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">40</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">59</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = Rol<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">5</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>b &amp; c<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>d &amp; <span style="color: #ffffff;">&#40;</span>b | c<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> + e + $8F1BBCDC + w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;e = d ; d = c<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;c = Rol<span style="color: #ffffff;">&#40;</span>b, <span style="color: #15ffb9;">30</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = a ; a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">60</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">79</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t = Rol<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">5</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span>b ~ c ~ d<span style="color: #ffffff;">&#41;</span> + e + $CA62C1D6 + w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;e = d ; d = c<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;c = Rol<span style="color: #ffffff;">&#40;</span>b, <span style="color: #15ffb9;">30</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;b = a ; a = t<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h0:+a ; h1:+b ; h2:+c<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h3:+d ; h4:+e<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Return</span> <span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h0<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h1<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h2<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h3<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h4<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span>.ToLower<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span></p>
<p>&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> SHA256:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> h0 = $6A09E667, h1 = $BB67AE85, h2 = $3C6EF372, h3 = $A54FF53A<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> h4 = $510E527F, h5 = $9B05688C, h6 = $1F83D9AB, h7 = $5BE0CD19<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> k<span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#91;</span>$428A2F98, $<span style="color: #15ffb9;">71374491</span>, $B5C0FBCF, $E9B5DBA5, $3956C25B, $59F111F1,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$923F82A4, $AB1C5ED5, $D807AA98, $12835B01, $243185BE, $550C7DC3,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$72BE5D74, $80DEB1FE, $9BDC06A7, $C19BF174, $E49B69C1, $EFBE4786,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$0FC19DC6, $240CA1CC, $2DE92C6F, $4A7484AA, $5CB0A9DC, $76F988DA,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$983E5152, $A831C66D, $B00327C8, $BF597FC7, $C6E00BF3, $D5A79147,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$06CA6351, $<span style="color: #15ffb9;">14292967</span>, $27B70A85, $2E1B2138, $4D2C6DFC, $53380D13,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$650A7354, $766A0ABB, $81C2C92E, $92722C85, $A2BFE8A1, $A81A664B,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$C24B8B70, $C76C51A3, $D192E819, $D6990624, $F40E3585, $106AA070,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$19A4C116, $1E376C08, $2748774C, $34B0BCB5, $391C0CB3, $4ED8AA4A,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$5B9CCA4F, $682E6FF3, $748F82EE, $78A5636F, $84C87814, $8CC70208,&nbsp; ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$90BEFFFA, $A4506CEB, $BEF9A3F7, $C67178F2<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> intCount = <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length + <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">6</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Local</span> <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>intCount<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> c = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> in:<span style="color: #D9D100;">String</span>.length<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>c <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span>c<span style="color: #ffffff;">&#93;</span> &amp; $FF<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>in:<span style="color: #D9D100;">String</span>.length <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> | $<span style="color: #15ffb9;">80</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">3</span> - <span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length &amp; <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shl</span> <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">32</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span><span style="color: #D9D100;">data</span>.length - <span style="color: #15ffb9;">1</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #ffffff;">&#40;</span>Long<span style="color: #ffffff;">&#40;</span>in:<span style="color: #D9D100;">String</span>.length<span style="color: #ffffff;">&#41;</span> * <span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#41;</span> &amp; $FFFFFFFF<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> chunkStart = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">Until</span> intCount <span style="color: #D9D100;">Step</span> <span style="color: #15ffb9;">16</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> w<span style="color: #ffffff;">&#91;</span><span style="color: #ffffff;">&#93;</span> = <span style="color: #D9D100;">data</span><span style="color: #ffffff;">&#91;</span>chunkStart..chunkStart + <span style="color: #15ffb9;">16</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;w = w<span style="color: #ffffff;">&#91;</span>..<span style="color: #15ffb9;">64</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">16</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">63</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> = w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">16</span><span style="color: #ffffff;">&#93;</span> + <span style="color: #ffffff;">&#40;</span>Ror<span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#93;</span>, <span style="color: #15ffb9;">7</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#93;</span>, <span style="color: #15ffb9;">18</span><span style="color: #ffffff;">&#41;</span> ~ <span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">15</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">3</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> ..<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">7</span><span style="color: #ffffff;">&#93;</span> + <span style="color: #ffffff;">&#40;</span>Ror<span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span>, <span style="color: #15ffb9;">17</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span>, <span style="color: #15ffb9;">19</span><span style="color: #ffffff;">&#41;</span> ~ <span style="color: #ffffff;">&#40;</span>w<span style="color: #ffffff;">&#91;</span>i - <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span> <span style="color: #D9D100;">Shr</span> <span style="color: #15ffb9;">10</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">For</span> <span style="color: #D9D100;">Local</span> i = <span style="color: #15ffb9;">0</span> <span style="color: #D9D100;">To</span> <span style="color: #15ffb9;">63</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t0 = <span style="color: #ffffff;">&#40;</span>Ror<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">13</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>a, <span style="color: #15ffb9;">22</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>a &amp; b<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>b &amp; c<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>c &amp; a<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #D9D100;">Local</span> t1 = h + <span style="color: #ffffff;">&#40;</span>Ror<span style="color: #ffffff;">&#40;</span>e, <span style="color: #15ffb9;">6</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>e, <span style="color: #15ffb9;">11</span><span style="color: #ffffff;">&#41;</span> ~ Ror<span style="color: #ffffff;">&#40;</span>e, <span style="color: #15ffb9;">25</span><span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> + <span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#40;</span>e &amp; f<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>~e &amp; g<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span> + k<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span> + w<span style="color: #ffffff;">&#91;</span>i<span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;h = g ; g = f ; f = e ; e = d + t1<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;d = c ; c = b ; b = a ; a = t0 + t1<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h0:+a ; h1:+b ; h2:+c ; h3:+d<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;h4:+e ; h5:+f ; h6:+g ; h7:+h<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #D9D100;">Return</span> <span style="color: #ffffff;">&#40;</span><span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h0<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h1<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h2<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h3<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h4<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h5<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h6<span style="color: #ffffff;">&#41;</span> + <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>h7<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span>.ToLower<span style="color: #ffffff;">&#40;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> Rol:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#40;</span>val:<span style="color: #D9D100;">Int</span>, shift:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Return</span> <span style="color: #ffffff;">&#40;</span>val <span style="color: #D9D100;">Shl</span> shift<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>val <span style="color: #D9D100;">Shr</span> <span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">32</span> - shift<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> Ror:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#40;</span>val:<span style="color: #D9D100;">Int</span>, shift:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Return</span> <span style="color: #ffffff;">&#40;</span>val <span style="color: #D9D100;">Shr</span> shift<span style="color: #ffffff;">&#41;</span> | <span style="color: #ffffff;">&#40;</span>val <span style="color: #D9D100;">Shl</span> <span style="color: #ffffff;">&#40;</span><span style="color: #15ffb9;">32</span> - shift<span style="color: #ffffff;">&#41;</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #D9D100;">Function</span> LEHex:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#40;</span>val:<span style="color: #D9D100;">Int</span><span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Local</span> out:<span style="color: #D9D100;">String</span> = <span style="color: #D9D100;">Hex</span><span style="color: #ffffff;">&#40;</span>val<span style="color: #ffffff;">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #D9D100;">Return</span> out:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span><span style="color: #15ffb9;">6</span>..<span style="color: #15ffb9;">8</span><span style="color: #ffffff;">&#93;</span> + out:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span><span style="color: #15ffb9;">4</span>..<span style="color: #15ffb9;">6</span><span style="color: #ffffff;">&#93;</span> + out:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span><span style="color: #15ffb9;">2</span>..<span style="color: #15ffb9;">4</span><span style="color: #ffffff;">&#93;</span> + out:<span style="color: #D9D100;">String</span><span style="color: #ffffff;">&#91;</span><span style="color: #15ffb9;">0</span>..<span style="color: #15ffb9;">2</span><span style="color: #ffffff;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #D9D100;">End Function</span><br />
<span style="color: #D9D100;">End Type</span></div>
</div>
</div>
<p></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/07/yummy-digests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create concave polygons</title>
		<link>http://www.paradeofrain.com/2008/06/how-to-create-concave-polygons-in-farseerbmx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-concave-polygons-in-farseerbmx</link>
		<comments>http://www.paradeofrain.com/2008/06/how-to-create-concave-polygons-in-farseerbmx/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 01:42:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Farseer]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[physics engine]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=96</guid>
		<description><![CDATA[Yes, yes I know the documentation is lacking at the moment for Farseer.BMX. I'm still working on it on a few fronts. First, I'm trying to do api documentation (bbdoc mostly). Secondly, I'm trying to write tutorials/guides that help show how to use some of farseer's features. I had hoped that releasing the demo application [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, yes I know the documentation is lacking at the moment for Farseer.BMX. I'm still working on it on a few fronts. First, I'm trying to do api documentation (bbdoc mostly). Secondly, I'm trying to write tutorials/guides that help show how to use some of farseer's features. I had hoped that releasing the demo application source code would've covered this aspect as the demos cover pretty much each feature, but I guess since the demo source is a bit more complex in design (handling a lot of graphics related mumbo jumbo), the actual 'needed content' wasn't particularly easy to find. So I'm going to try to write up very simplified versions of some of farseer's basic features (minimal graphics, minimal code).</p>
<p>I've uploaded the <a href="http://www.paradeofrain.com/?page_id=95"><strong>first of these tutorials</strong></a> to the articles section. It covers creating concave polygons in farseer <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . More to come soon...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/06/how-to-create-concave-polygons-in-farseerbmx/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Flavors of Farseer&#8230;and new Module!</title>
		<link>http://www.paradeofrain.com/2008/06/flavors-of-farseerand-blitzmax-module/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flavors-of-farseerand-blitzmax-module</link>
		<comments>http://www.paradeofrain.com/2008/06/flavors-of-farseerand-blitzmax-module/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 06:31:12 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Farseer]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Physics Engines]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=94</guid>
		<description><![CDATA[So far feedback has been great on Farseer.BMX working in Blitzmax. Some users have tested Farseer.BMX on Linux and Mac and it works without a hitch. Farseer.BMX is officially cross-platform between Windows, Linux, and Mac! That's great news seeing how widely available the Farseer engine is becoming. It's now available on: Windows C# - XNA [...]]]></description>
			<content:encoded><![CDATA[<p>So far feedback has been great on Farseer.BMX working in Blitzmax. Some users have tested Farseer.BMX on Linux and Mac and it works without a hitch. Farseer.BMX is officially cross-platform between Windows, Linux, and Mac! That's great news seeing how widely available the Farseer engine is becoming. It's now available on:</p>
<ul>
<li><strong>Windows </strong>
<ul>
<li>C# - XNA</li>
<li>C# - Silverlight</li>
<li>Blitzmax</li>
</ul>
</li>
<li><strong>XBox 360</strong>
<ul>
<li>C# - XNA</li>
</ul>
</li>
<li><strong>Linux </strong>
<ul>
<li>Blitzmax</li>
</ul>
</li>
<li><strong>Mac</strong>
<ul>
<li>Blitzmax</li>
</ul>
</li>
<li><strong>Your Toaster</strong>
<ul>
<li>???<strong><br />
</strong></li>
</ul>
</li>
</ul>
<p>I'm curious if Jeff has any plans on bringing it to Zune...hehe.</p>
<p>The main reason I'm posting an update is to let everyone know that the download for Farseer.BMX has been updated to include a 'module' version of Farseer for those that like to have all their code in 'module' format for easy use across projects. So if you were wishing for a module version of Farseer.BMX, you're wish is granted and you can go ahead and <strong><a href="http://www.paradeofrain.com/download.php?id=16">re-download the package</a></strong>. The package contains the original source layout for those, like me, who like to have all their library source code next to their game code, and additionally a farseerModule.zip that you can extract to your "<strong>Blitzmax/mod/</strong>" folder.</p>
<p>So with the module installed you can now just do this in your code...</p>
<div class="syntax_hilite">
<div id="blitzmax2-8">
<div class="blitzmax2"><span style="color: #D9D100;">SuperStrict</span><br />
<span style="color: #D9D100;">Import</span> aco.farseerphysics<br />
<span style="color: #b1e7eb; font-style: italic;">'Weeeee physics....! </span></div>
</div>
</div>
<p></p>
<p>... and off you go!</p>
<p>Please let me know if you run into any issues with the module.</p>
<p><em>*...wonders how he's going to get up tomorrow morning for class....*</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/06/flavors-of-farseerand-blitzmax-module/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Farseer.BMX 1.0 Released</title>
		<link>http://www.paradeofrain.com/2008/06/farseerbmx-10-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=farseerbmx-10-released</link>
		<comments>http://www.paradeofrain.com/2008/06/farseerbmx-10-released/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 05:13:24 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Farseer]]></category>
		<category><![CDATA[indie games]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=89</guid>
		<description><![CDATA[And there was much rejoicing! It does feel great to finally 'finish' something. I started out this project as something to give me a foundation to code my own game project on, and now after 110+ hours of coding there is a 2D physics library for Blitzmax ! I hope it proves useful to those [...]]]></description>
			<content:encoded><![CDATA[<p>And there was much rejoicing! It does feel great to finally 'finish' something. I started out this project as something to give me a foundation to code my own game project on, and now after 110+ hours of coding there is a 2D physics library for Blitzmax <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ! I hope it proves useful to those that end up using it. While the engine hasn't been tested for 'real-world' use it I think the demos do a good job of putting it through its paces. It'll very soon have a good test through a 'real world' application once I get it integrated with my own game project. Anyway, Farseer Physics for Blitzmax is ready for download. The zip file contains:</p>
<ul>
<li>A compiled version of the physics demo application with <strong>4 new</strong> demos!</li>
<li>Ready-to-compile source code for both the core physics engine <em>and</em> the demo application</li>
<li>A 'quickstart' application that shows someone how to setup a basic physics scene with minimal code.</li>
<li>a 'quick start guide' that pretty much is a walk through of the quick start application. Which can also be found <strong><a href="http://www.paradeofrain.com/?page_id=86">online</a></strong>.</li>
</ul>
<p>For those eager to get their hands on it:</p>
<p><a href="http://www.paradeofrain.com/download.php?id=16"><img class="aligncenter size-full wp-image-92" title="logofarseer1" src="http://www.paradeofrain.com/wp-content/uploads/2008/06/logofarseer1.jpg" alt="" width="430" height="233" /></a><a href="http://www.paradeofrain.com/wp-content/uploads/2008/06/logofarseer.jpg" rel="lightbox[89]"> </a></p>
<p><span style="color: #ff0000;"><strong>Download</strong></span>: <strong><a title="Farseer.BMX" href="http://www.paradeofrain.com/download.php?id=16">Farseer.BMX</a></strong></p>
<p>Since the last update, things came together rather quickly. I finished up the last of the classes that needed to be ported earlier in the week, which I then spent the rest of the week adding in demos to the demo application. This port is a <em>very</em> close implementation of the original Farseer in C#. The only times the source would deviate in any major fashion were in time-critical algorithms where optimization needed to be done differently considering how different C# and Blitzmax handle things (particularly garbage collection). With that said, you may find it helpful to visit the <strong><a href="http://www.codeplex.com/FarseerPhysics">codeplex site</a></strong> of the C# version of the engine if you find yourself wondering how to do something in Farseer. While the answer you get may be in C#, keep in mind the methods, functions, and variable names are similar, if not identical, in Blitzmax. I've also implemented additional demos on top of the standard ones that came with Farseer to show the use of most of the available types in the engine. So if you wish to know how to implement a certain feature, try looking at the source code of one of the demos that does the said feature.</p>
<p>Here's just a quick run down of what was added/updated since last post:</p>
<ul>
<li>Added Demo 11 - Slider and Pin Joints</li>
<li>Fixed a minor bug in the main menu causing the about screen to stick</li>
<li>Sweep and Prune Collider implemented (not completely optimized)</li>
<li>Bilinear Interpolator</li>
<li>Added the Convert Units class for easy transformation between screen and world coordinates</li>
<li>Added IFluidContainer</li>
<li>Added onEntry and onExit event handling for fluid containers</li>
<li>Added Collision event handling</li>
<li>Added Demo 12 - Fluid Drag Controller</li>
<li>Added Demo 13 - Collision Event Handling</li>
</ul>
<p>The fluid container objects turned out to be a bit cooler than I expected it to be. Not only did it simulate buoyancy but there was a controller that simulated wave formations on the surface of a container. Cool stuff indeed...</p>
<p><a href="http://www.paradeofrain.com/wp-content/uploads/2008/06/fluidwaves.jpg" rel="lightbox[89]"><img class="aligncenter size-full wp-image-93" title="Fluid Containers" src="http://www.paradeofrain.com/wp-content/uploads/2008/06/fluidwaves.jpg" alt="" width="500" height="388" /></a></p>
<p>Pictures don't do it justice so here's a video...</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/04LB7Hscw50&amp;hl=en" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/04LB7Hscw50&amp;hl=en" wmode="transparent"></embed></object></p>
<p>By default Farseer doesn't come with any code that allows geometry to create disturbances in a fluid container, but it comes with a nice, easy to use Disturb() function along with handy callback events for when a object enters and exits the container. With this I threw together a basic water container class that does some very 'rough' interaction between geometry and the waves. It's far from realistic, but still yields an interesting effect I think. Someone could easily take this code and improve upon it. I've kept it outside of the 'core' physics engine and put it in the demo source since it was something that was kind of thrown together last minute (you can tell that by the rather rushed rendering code).</p>
<p>So that's about it for now. I hope this engine finds some use in the Blitzmax community. Thanks to those on the blitz forums that provided feedback and data to help me optimize the engine. An especially <strong>big </strong>thanks to <strong><a href="http://www.farseergames.com">Jeff Weber</a></strong> for writing such a robust 2D physics engine to begin with!</p>
<p>*<em>Crosses fingers and hopes the code will compile without issue on OSX and Linux</em>*... <img src='http://www.paradeofrain.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/06/farseerbmx-10-released/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>More Farseer.BMX</title>
		<link>http://www.paradeofrain.com/2008/05/more-farseerbmx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-farseerbmx</link>
		<comments>http://www.paradeofrain.com/2008/05/more-farseerbmx/#comments</comments>
		<pubDate>Wed, 28 May 2008 06:26:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Farseer]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=84</guid>
		<description><![CDATA[I was hoping to have an update a little earlier than this, but decided to hold off and throw together at least a bit of content with the update. I've added a slew of joints and controllers into the Farseer engine for Blitzmax (which I think I'll just start referring to as just Farseer.BMX to [...]]]></description>
			<content:encoded><![CDATA[<p>I was hoping to have an update a little earlier than this, but decided to hold off and throw together at least a bit of content with the update. I've added a slew of joints and controllers into the Farseer engine for Blitzmax (which I think I'll just start referring to as just Farseer.BMX to save my poor little fingers). Below is a list of stuff I've added since the initial post:</p>
<ul>
<li><strong>Angle Limit Joints</strong> (featured in the youtube video below) - this allows you to do some interesting joint behaviors that could potentially allow you to create a 2D ragdoll of sorts with limb constraints.</li>
<li><strong>Fixed Angle Limit Joints</strong> - Same as above except instead of linking two objects together, only one is used and it's angle is limited.</li>
<li><strong>Fixed Angle Joints</strong> - Allows you to make an object always point in a certain direction. You can think of it as a way to disable 'rotation' for a particular object, and it will always be set at some angle from some anchor regardless of where it is in the world.</li>
<li><strong>Angle Springs</strong> - You can link two bodies and they will attempt to align themselves to a certain angle using spring physics to give a bouncy effect.</li>
<li><strong>Interactive Angle Joints</strong> (untested)</li>
<li><strong>Circular Interpolator</strong> (untested)</li>
<li><strong>Pin Joint - </strong>This one allows you to choose an anchor on two bodies and a distance, and the two physics bodies will always stay that distance apart, but still tumble and interact with other bodies realistically.</li>
<li><strong>Slider Joint - </strong>Same concept as a 'Pin Joint' except now instead of a concrete distance apart there is a minimum distance and a maximum distance these two objects will stay within.</li>
<li><strong>Brute Force Collider</strong> - Just another broad phase collider you can use instead of the default one. I may dig up a forum post by Jeff and others that describes the advantages/disadvantages among the different colliders you can choose from in Farseer.</li>
<li><strong>Some getters/setters for the physics debug viewer class - </strong>Makes the debugger class a little easier to use.</li>
<li><strong>Fixed a few minor bugs</strong></li>
</ul>
<p>Anyway, the video I posted isn't that impressive but shows you that Farseer makes it pretty easy to setup different types of constraints and scenarios with just a few classes. There's no new demo application to download for this update as I'm pretty close to finishing up the rest of the port, and would rather just wrap up a few more demos and get the code out there for others to use. Hopefully I'll have more in a week or so!</p>
<p><a href="http://www.paradeofrain.com/wp-content/uploads/2008/05/anglelimitbmx.jpg" rel="lightbox[84]"><img class="aligncenter size-full wp-image-85" title="Angle Limit Screenshot" src="http://www.paradeofrain.com/wp-content/uploads/2008/05/anglelimitbmx.jpg" alt="" width="500" height="388" /></a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/w0p2y4dRylQ&amp;hl=en" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/w0p2y4dRylQ&amp;hl=en" wmode="transparent"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/05/more-farseerbmx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Farseer Physics in Blitzmax Demo</title>
		<link>http://www.paradeofrain.com/2008/05/farseer-physics-in-blitzmax-demo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=farseer-physics-in-blitzmax-demo</link>
		<comments>http://www.paradeofrain.com/2008/05/farseer-physics-in-blitzmax-demo/#comments</comments>
		<pubDate>Sat, 17 May 2008 00:25:12 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[BlitzMax]]></category>
		<category><![CDATA[Blitzmax Physics]]></category>
		<category><![CDATA[Farseer Physics]]></category>
		<category><![CDATA[Video Games]]></category>

		<guid isPermaLink="false">http://www.paradeofrain.com/?p=78</guid>
		<description><![CDATA[Hurray! Finially got to a stable stopping point in porting over Farseer Physics from C# on XNA to Blitzmax! Farseer Physics Engine is a 2D physics engine originally written by Jeff Weber who develops XNA/Silverlight games over at Farseer Games. Much thanks to him for creating a great physics engine and for allowing me to [...]]]></description>
			<content:encoded><![CDATA[<p>Hurray! Finially got to a stable stopping point in porting over Farseer Physics from C# on XNA to Blitzmax! Farseer Physics Engine is a 2D physics engine originally written by Jeff Weber who develops XNA/Silverlight games over at <strong><a title="Farseer Games" href="http://www.farseergames.com">Farseer Games</a></strong>. Much thanks to him for creating a great physics engine and for allowing me to move it to another language, which once done, I hope will help others create fun physics games in Blitzmax.</p>
<p><a href="http://www.paradeofrain.com/wp-content/uploads/2008/05/farseerbmx.jpg" rel="lightbox[78]"><img class="aligncenter size-full wp-image-80" title="farseerbmx" src="http://www.paradeofrain.com/wp-content/uploads/2008/05/farseerbmx.jpg" alt="" width="500" height="375" /></a></p>
<p>I've ported the 'core' features of the engine which now would allow you to use the basic features of the engine. If you head over to the <strong><a href="http://www.codeplex.com/FarseerPhysics">Codeplex Farseer Physics Page</a></strong> you'll see a list of the features in the C# version of the engine. Right now the things that aren't implemented in the Blitzmax version:</p>
<ol>
<li><span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel">Fluid Drag and Buoyancy Controller.</span></li>
<li><span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel">Slider (Prismatic) Joint</span></li>
<li><span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel">Pin (Distance) Joint</span></li>
<li><span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel">Broadphase Colliders: SweepAndPrune, BruteForce</span></li>
<li><span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel">Collision Callback Mechanism</span></li>
</ol>
<p>Currently, the Blitzmax version is using the 'SelectiveSweep' Broadphase collider that is the default collider in Farseer, and is supposed to have the best performance in a wider range of scenarios. The others have their advantages and disadvantages based on specific situations in the physics environment. I'll be implementing those as well along with the rest of the list, but they weren't used in the current build of the C# Farseer demo application so I chose to focus on the needed classes first to get an identical demo app running in Blitzmax.</p>
<p>Just some metrics you may find interesting (as I've noticed typical Blitzmax users have a very different way of developing their games):</p>
<p style="padding-left: 30px;">- <strong>84 </strong>.bmx files used for the physics engine and the demo application<br />
- <strong>7957</strong> lines of code (blank lines not included)</p>
<p>Sounds like it may be a lot, but in reality it really isn't much compared to a full relatively complex commercial Casual, Indie, or AAA game. But the reason I put that up there is to illustrate a point. I feel like if I was using the default Blitzmax IDE I would've have one hell of a nightmare just handling these little files. Having a project of a much bigger scale in BlitzPlus in the past, I know from experience the headaches of a large monolithic code base. You spend a lot of time scrolling and searching through files because the IDE promotes that type of behavior from the get go. Using <strong><a title="BLIde" href="http://www.blide.org">BLIde</a></strong>, a <em>very </em>flexible editor created by <span class="group1">Manel Ibáñez, productivity went way up and I was able to get more done on the physics engine. Not to mention built in Intellisense support is a god-send, which lets you spend more time coding instead of reading API docs. Just that feature alone I think is enough to abandon the default IDE and stick to BLIde. Anyway, if you're a Blitzmax user I highly recommend that you take the time to learn to use BLIde and support Manel's efforts for an outstanding product!</span></p>
<p>I've uploaded a demo video showcasing the same demos available in C# running in Blitzmax. I also added a new and original demo by me showing the use of concave polygons, which is one feature many 2D physics libraries lack. With other physics engines you can emulate concave shapes by putting together a bunch of convex ones, but it's still a cumbersome and tedious task. The ability to create concave shapes with minimal hassle is a great productivity boost for content creation in your game. Below is a video of the physics demo app, along with a download link to the demo app itself so you can run it on your own PC. Hope to have more info posted with updates in the coming weeks!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/97S-PmEXLGw&amp;hl=en" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/97S-PmEXLGw&amp;hl=en" wmode="transparent"></embed></object></p>
<p>To download the demo application shown in the above video click below:</p>
<p><strong><a href="http://www.paradeofrain.com/download.php?id=14">Download Farseer Physics Demo</a></strong></p>
<blockquote><p><strong>Requirements</strong>:</p>
<p>- Windows XP/Vista<br />
- Direct X 7 or higher capable video card<br />
- Minimum supported screen resolution: 1024 X 768</p>
<p><strong>Known Issues</strong>:</p>
<p>- In Vista the fps are lower (and in some demos locked to 60 instead of 100 fps).</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.paradeofrain.com/2008/05/farseer-physics-in-blitzmax-demo/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

