<?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>BrainBlitz.org</title>
	<atom:link href="http://www.brainblitz.org/anthony/feed" rel="self" type="application/rss+xml" />
	<link>http://www.brainblitz.org/anthony</link>
	<description>The Blog About Nothinginparticular</description>
	<lastBuildDate>Mon, 26 Apr 2010 21:38:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting started with FlashDevelop and haXe</title>
		<link>http://www.brainblitz.org/anthony/getting-started-with-flashdevelop-and-haxe</link>
		<comments>http://www.brainblitz.org/anthony/getting-started-with-flashdevelop-and-haxe#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:37:50 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=220</guid>
		<description><![CDATA[Now that I&#8217;ve reached a bit of a milestone with the pathfinding stuff, I&#8217;m taking a break to play with some other items on my to-do list. One of those items is &#8220;Give haXe (hex) a spin. haXe is a programming language (very similar to AS3 in syntax) that compiles to multiple targets, including PHP, C++ [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve reached a bit of a milestone with the <a href="http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source">pathfinding stuff</a>, I&#8217;m taking a break to play with some other items on my to-do list. One of those items is &#8220;Give haXe (<em>hex</em>) a spin<em>. </em>haXe is a programming language (very similar to AS3 in syntax) that compiles to multiple targets, including PHP, C++ (code), AS3 (code and swf). It extends AS3 in a couple of ways, and those extensions are the reason I became interested in it in the first place. These include conditional compilation, assertions, apparent execution speed improvements,  and alternative syntax for some unwieldy&#8211;yet very frequently occurring&#8211;situations involving traversing object members and list elements.</p>
<p>haXe is just a compiler, so of course I had to find a decent IDE, as I&#8217;m too un733t to mess with the command line. I&#8217;m going with FlashDevelop at the moment, which seems entirely sufficient, <em>and</em>it has an extremely clever name to boot. (That last part was sarcasm, for the less sarcastically perceptive reader). Also, support for haXe is built in. Also, Michael at <a href="http://lab.polygonal.de">polygonal labs</a> likes it, and I like every thing Michael likes by default, because he&#8217;s smart and wrote such a nice <a href="http://lab.polygonal.de/category/data-structures/">data structure library</a> for AS3 (and haXe).</p>
<p><em>ANYway</em>, the actual <em>reason</em>for this post is that I ran into a couple of complications while getting things up and running. They weren&#8217;t covered anywhere in the docs for haXe OR FlashDevelop, so I thought I&#8217;d just mention them here.</p>
<p>First, when installing haXe, I received &#8220;ERROR = [file_open,C:\Program Files/Motion-Twin/neko/gc.dll]&#8220;, followed by &#8220;installation aborted.&#8221; In my case, simply running the installer with admin privileges fixed it.</p>
<p>Second, although I had the debug version of flash installed, for some reason FlashDevelop was showing an error instead of traces in it&#8217;s output. It was compiling and running fine (the swf), but I just wasn&#8217;t getting any output. So I downloaded the latest &#8220;<a href="http://www.adobe.com/support/flashplayer/downloads.html">Projector content debugger</a>&#8221; from adobe, then set the path in FlashDevelop ( Tools | Program Settings&#8230; | FlashViewer | External Player Path ). Now it&#8217;s showing output correctly.</p>
<p>Back to playing&#8230;</p>




	<a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Btitle%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe%26amp%3Bbodytext%3DNow%2520that%2520I%2527ve%2520reached%2520a%2520bit%2520of%2520a%2520milestone%2520with%2520the%2520pathfinding%2520stuff%252C%2520I%2527m%2520taking%2520a%2520break%2520to%2520play%2520with%2520some%2520other%2520items%2520on%2520my%2520to-do%2520list.%2520One%2520of%2520those%2520items%2520is%2520%2522Give%2520haXe%2520%2528hex%2529%2520a%2520spin.%2520haXe%2520is%2520a%2520programming%2520language%2520%2528very%2520similar%2520to%2520AS3%2520in%2520syntax%2529%25C2%25A0t';" title="Digg"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Btitle%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe%26amp%3Bnotes%3DNow%2520that%2520I%2527ve%2520reached%2520a%2520bit%2520of%2520a%2520milestone%2520with%2520the%2520pathfinding%2520stuff%252C%2520I%2527m%2520taking%2520a%2520break%2520to%2520play%2520with%2520some%2520other%2520items%2520on%2520my%2520to-do%2520list.%2520One%2520of%2520those%2520items%2520is%2520%2522Give%2520haXe%2520%2528hex%2529%2520a%2520spin.%2520haXe%2520is%2520a%2520programming%2520language%2520%2528very%2520similar%2520to%2520AS3%2520in%2520syntax%2529%25C2%25A0t';" title="del.icio.us"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Bt%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe';" title="Facebook"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Btitle%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe%26amp%3Bannotation%3DNow%2520that%2520I%2527ve%2520reached%2520a%2520bit%2520of%2520a%2520milestone%2520with%2520the%2520pathfinding%2520stuff%252C%2520I%2527m%2520taking%2520a%2520break%2520to%2520play%2520with%2520some%2520other%2520items%2520on%2520my%2520to-do%2520list.%2520One%2520of%2520those%2520items%2520is%2520%2522Give%2520haXe%2520%2528hex%2529%2520a%2520spin.%2520haXe%2520is%2520a%2520programming%2520language%2520%2528very%2520similar%2520to%2520AS3%2520in%2520syntax%2529%25C2%25A0t';" title="Google Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Btitle%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe';" title="StumbleUpon"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fgetting-started-with-flashdevelop-and-haxe%26amp%3Bt%3DGetting%2520started%2520with%2520FlashDevelop%2520and%2520haXe%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DNow%2520that%2520I%2527ve%2520reached%2520a%2520bit%2520of%2520a%2520milestone%2520with%2520the%2520pathfinding%2520stuff%252C%2520I%2527m%2520taking%2520a%2520break%2520to%2520play%2520with%2520some%2520other%2520items%2520on%2520my%2520to-do%2520list.%2520One%2520of%2520those%2520items%2520is%2520%2522Give%2520haXe%2520%2528hex%2529%2520a%2520spin.%2520haXe%2520is%2520a%2520programming%2520language%2520%2528very%2520similar%2520to%2520AS3%2520in%2520syntax%2529%25C2%25A0t';" title="Yahoo! Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/getting-started-with-flashdevelop-and-haxe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Pathfinding and Game Source</title>
		<link>http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source</link>
		<comments>http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source#comments</comments>
		<pubDate>Sun, 25 Apr 2010 09:11:27 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[astar]]></category>
		<category><![CDATA[flash programming]]></category>
		<category><![CDATA[game programming]]></category>
		<category><![CDATA[pathfinding]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=203</guid>
		<description><![CDATA[Here is the somewhat-polished version of my pathfinding/game application, all heavily commented in tutorial format for your analyzing pleasure. New to the demo is graphics displaying the internal workings of the pathfinding and collision detection, less brain-dead AI and the ability to add stuff to the map. 
Here is the application: 
Create a few &#8220;guys,&#8221; click to select, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the somewhat-polished version of my pathfinding/game application, all heavily commented in tutorial format for your analyzing pleasure. New to the demo is graphics displaying the internal workings of the pathfinding and collision detection, less brain-dead AI and the ability to add stuff to the map. </p>
<p>Here is the application: <br />
<span style="color: #000080;">Create a few &#8220;guys,&#8221; click to select, click elsewhere to move. Or add a tower near the guys.<br />
</span><span style="color: #000080;">Ctrl+Click to add multiple units; Escape to cancel character selection or drop the current &#8220;tool.&#8221;</span><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="650" height="512" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.brainblitz.org/Misc/AGame.swf" /><embed type="application/x-shockwave-flash" width="650" height="512" src="http://www.brainblitz.org/Misc/AGame.swf"></embed></object> </p>
<p><a href="http://www.brainblitz.org/Misc/AGamePack.zip">Here is the code.</a> </p>
<p>A few observations: </p>
<ul>
<li>I  have dubbed my primitive A* pathfinder &#8220;AStarOrthogonal&#8221; to make it clear: this pathfinder does not work diagonally.</li>
<li>I&#8217;m still working out some glitches in the &#8220;dynamic&#8221; collision handling (between mobile units, mainly on head-on collisions). Sometimes the movement isn&#8217;t quite right, and sometimes characters end up coinciding. This isn&#8217;t a problem with the pathfinder, it&#8217;s with the &#8220;game&#8221; code&#8211;specifically the Character &#8220;state machine.&#8221;</li>
<li>The first red cell leading character movement is the square currently tracked by the pathfinder. The <em>leading-</em>leading square is not used at the moment, but I&#8217;m experimenting with better collision avoidance by utilizing that future location.</li>
<li>If you&#8217;re going for something along the lines of the typical, ubiquitous &#8220;Tower Defense&#8221; game, I&#8217;ve already written half the code for you. : )</li>
</ul>
<p>A couple of technical notes: </p>
<ul>
<li>This is a learning process for me; keep that in mind. I am but a lowly game programming &#8220;hobbyist.&#8221; So, if you&#8217;re learning from this, don&#8217;t assume that everything I&#8217;ve done was done the &#8220;best&#8221; way.</li>
<li>If you&#8217;re using Flash, CS4 is required by the POLYGONAL data structures library. If you don&#8217;t use another IDE (i.e. Flex) and you don&#8217;t have CS4, I have at this point <em>only</em> used Singly Linked Lists and Doubly Linked Lists from the library, so it should be easy to find another library that does the trick.</li>
</ul>
<p>Resources: </p>
<ul>
<li>The code download includes the POLYGONAL data structure library from <a href="http://code.google.com/p/polygonal/wiki/DataStructures">http://code.google.com/p/polygonal/wiki/DataStructures</a>. I&#8217;ve included the library for convenience, but you might want to check the project home to be sure and have the latest version.</li>
<li>As in all my demos, the non-original graphics are from, or are derived from, the work of <a href="http://azureflame.dasaku.net">Azure Flame</a>.</li>
</ul>




	<a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Btitle%3DAS3%2520Pathfinding%2520and%2520Game%2520Source%26amp%3Bbodytext%3DHere%2520is%2520the%2520somewhat-polished%2520version%2520of%2520my%2520pathfinding%252Fgame%2520application%252C%2520all%2520heavily%2520commented%2520in%2520tutorial%2520format%2520for%2520your%2520analyzing%2520pleasure.%2520New%2520to%2520the%2520demo%2520is%2520graphics%2520displaying%2520the%2520internal%2520workings%2520of%2520the%2520pathfinding%2520and%2520collision%2520detection%252C%2520l';" title="Digg"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Btitle%3DAS3%2520Pathfinding%2520and%2520Game%2520Source%26amp%3Bnotes%3DHere%2520is%2520the%2520somewhat-polished%2520version%2520of%2520my%2520pathfinding%252Fgame%2520application%252C%2520all%2520heavily%2520commented%2520in%2520tutorial%2520format%2520for%2520your%2520analyzing%2520pleasure.%2520New%2520to%2520the%2520demo%2520is%2520graphics%2520displaying%2520the%2520internal%2520workings%2520of%2520the%2520pathfinding%2520and%2520collision%2520detection%252C%2520l';" title="del.icio.us"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Bt%3DAS3%2520Pathfinding%2520and%2520Game%2520Source';" title="Facebook"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Btitle%3DAS3%2520Pathfinding%2520and%2520Game%2520Source%26amp%3Bannotation%3DHere%2520is%2520the%2520somewhat-polished%2520version%2520of%2520my%2520pathfinding%252Fgame%2520application%252C%2520all%2520heavily%2520commented%2520in%2520tutorial%2520format%2520for%2520your%2520analyzing%2520pleasure.%2520New%2520to%2520the%2520demo%2520is%2520graphics%2520displaying%2520the%2520internal%2520workings%2520of%2520the%2520pathfinding%2520and%2520collision%2520detection%252C%2520l';" title="Google Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Btitle%3DAS3%2520Pathfinding%2520and%2520Game%2520Source';" title="StumbleUpon"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-pathfinding-and-game-source%26amp%3Bt%3DAS3%2520Pathfinding%2520and%2520Game%2520Source%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DHere%2520is%2520the%2520somewhat-polished%2520version%2520of%2520my%2520pathfinding%252Fgame%2520application%252C%2520all%2520heavily%2520commented%2520in%2520tutorial%2520format%2520for%2520your%2520analyzing%2520pleasure.%2520New%2520to%2520the%2520demo%2520is%2520graphics%2520displaying%2520the%2520internal%2520workings%2520of%2520the%2520pathfinding%2520and%2520collision%2520detection%252C%2520l';" title="Yahoo! Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Whinefest</title>
		<link>http://www.brainblitz.org/anthony/whinefest</link>
		<comments>http://www.brainblitz.org/anthony/whinefest#comments</comments>
		<pubDate>Fri, 16 Apr 2010 16:10:36 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Blogorrhoea]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=195</guid>
		<description><![CDATA[
iTunes is a virus.
Norton Antivirus is a virus.
WordPress is incessantly yelling at me to &#8220;Please update now.&#8221; I don&#8217;t want to have to update software every other day.
I bought this little AA battery charger from Radio Shack. The &#8220;plug&#8221; prongs fold out from the back, such that the charger is flush against the wall. The [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>iTunes is a virus.</li>
<li>Norton Antivirus is a virus.</li>
<li>WordPress is incessantly yelling at me to &#8220;Please update now.&#8221; I don&#8217;t want to have to update software every other day.</li>
<li>I bought this little AA battery charger from Radio Shack. The &#8220;plug&#8221; prongs fold out from the back, such that the charger is flush against the wall. The prongs are positioned such that regardless of whether it&#8217;s plugged into the upper or lower outlet receptacle, the other receptacle is covered. ?!?!</li>
<li>My mother-in-law recently purchased a large flatscreen TV. The &#8220;buttons&#8221; on the TV are touch-sensitive spots on the border of the screen. I know minimal interfaces are awesome these days, but with no tactile feedback, in the low-light conditions, when I try to turn off the TV, I usually succeed, but not until I&#8217;ve changed the channel, volume and  input as well. Sometimes I sit there running my finger up and down the &#8220;button&#8221; area, changing all kinds of stuff before it turns off. Come on, GIVE ME SOME MANLY BUTTONS!</li>
<li>Blogs are such a horrible format, to have become so popular. They usually are set by default to load a bazillion posts onto the index page, for a massively slow load time. And the navigations is more similar to sequential memory rather than random access, making posts hard to find.</li>
<li>I used to think tag clouds were neat, until I realized they are very rarely useful to an actual end user. Who cares which words the author uses most frequently? Or what other people are searching for? Maybe 1%? Tag clouds are not made for someone looking for specific information, and pretty much <em>everyone</em> is looking for specific information.</li>
<li>&#8230; hm, thought I had another one, but I&#8217;m out of whines.</li>
</ul>
<p>Have a nice, positive day!</p>




	<a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Btitle%3DWhinefest%26amp%3Bbodytext%3D%250D%250A%2509iTunes%2520is%2520a%2520virus.%250D%250A%2509Norton%2520Antivirus%2520is%2520a%2520virus.%250D%250A%2509WordPress%2520is%2520incessantly%2520yelling%2520at%2520me%2520to%2520%2522Please%2520update%2520now.%2522%2520I%2520don%2527t%2520want%2520to%2520have%2520to%2520update%2520software%2520every%2520other%2520day.%250D%250A%2509I%2520bought%2520this%2520little%2520AA%2520battery%2520charger%2520from%2520Radio%2520Shack.%2520The%2520%2522plug%2522%2520pron';" title="Digg"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Btitle%3DWhinefest%26amp%3Bnotes%3D%250D%250A%2509iTunes%2520is%2520a%2520virus.%250D%250A%2509Norton%2520Antivirus%2520is%2520a%2520virus.%250D%250A%2509WordPress%2520is%2520incessantly%2520yelling%2520at%2520me%2520to%2520%2522Please%2520update%2520now.%2522%2520I%2520don%2527t%2520want%2520to%2520have%2520to%2520update%2520software%2520every%2520other%2520day.%250D%250A%2509I%2520bought%2520this%2520little%2520AA%2520battery%2520charger%2520from%2520Radio%2520Shack.%2520The%2520%2522plug%2522%2520pron';" title="del.icio.us"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Bt%3DWhinefest';" title="Facebook"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Btitle%3DWhinefest%26amp%3Bannotation%3D%250D%250A%2509iTunes%2520is%2520a%2520virus.%250D%250A%2509Norton%2520Antivirus%2520is%2520a%2520virus.%250D%250A%2509WordPress%2520is%2520incessantly%2520yelling%2520at%2520me%2520to%2520%2522Please%2520update%2520now.%2522%2520I%2520don%2527t%2520want%2520to%2520have%2520to%2520update%2520software%2520every%2520other%2520day.%250D%250A%2509I%2520bought%2520this%2520little%2520AA%2520battery%2520charger%2520from%2520Radio%2520Shack.%2520The%2520%2522plug%2522%2520pron';" title="Google Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Btitle%3DWhinefest';" title="StumbleUpon"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fwhinefest%26amp%3Bt%3DWhinefest%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3D%250D%250A%2509iTunes%2520is%2520a%2520virus.%250D%250A%2509Norton%2520Antivirus%2520is%2520a%2520virus.%250D%250A%2509WordPress%2520is%2520incessantly%2520yelling%2520at%2520me%2520to%2520%2522Please%2520update%2520now.%2522%2520I%2520don%2527t%2520want%2520to%2520have%2520to%2520update%2520software%2520every%2520other%2520day.%250D%250A%2509I%2520bought%2520this%2520little%2520AA%2520battery%2520charger%2520from%2520Radio%2520Shack.%2520The%2520%2522plug%2522%2520pron';" title="Yahoo! Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/whinefest/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New free game music (and other FLStudio stuff)</title>
		<link>http://www.brainblitz.org/anthony/new-free-game-music-and-other-flstudio-stuff</link>
		<comments>http://www.brainblitz.org/anthony/new-free-game-music-and-other-flstudio-stuff#comments</comments>
		<pubDate>Thu, 25 Mar 2010 20:58:52 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=191</guid>
		<description><![CDATA[I added a few things to the much neglected music portion of this site: A couple of new FLStudio tutorials and  Three royalty free background tracks (aimed at game use).




	
	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.brainblitz.org/FLStudio/"><img class="alignleft" title="FLStudio" src="http://www.brainblitz.org/FLStudio/images/flstudio/thefruit.jpg" alt="" width="120" height="182" /></a>I added a few things to the much neglected music portion of this site: <a href="http://www.brainblitz.org/FLStudio/">A couple of new FLStudio tutorials</a> and  <a href="http://www.brainblitz.org/FLStudio/gamemusic.php">Three royalty free background tracks</a> (aimed at game use).</p>




	<a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Btitle%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529%26amp%3Bbodytext%3DI%2520added%2520a%2520few%2520things%2520to%2520the%2520much%2520neglected%2520music%2520portion%2520of%2520this%2520site%253A%2520A%2520couple%2520of%2520new%2520FLStudio%2520tutorials%25C2%25A0and%2520%25C2%25A0Three%2520royalty%2520free%2520background%2520tracks%2520%2528aimed%2520at%2520game%2520use%2529.';" title="Digg"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Btitle%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529%26amp%3Bnotes%3DI%2520added%2520a%2520few%2520things%2520to%2520the%2520much%2520neglected%2520music%2520portion%2520of%2520this%2520site%253A%2520A%2520couple%2520of%2520new%2520FLStudio%2520tutorials%25C2%25A0and%2520%25C2%25A0Three%2520royalty%2520free%2520background%2520tracks%2520%2528aimed%2520at%2520game%2520use%2529.';" title="del.icio.us"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Bt%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529';" title="Facebook"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Btitle%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529%26amp%3Bannotation%3DI%2520added%2520a%2520few%2520things%2520to%2520the%2520much%2520neglected%2520music%2520portion%2520of%2520this%2520site%253A%2520A%2520couple%2520of%2520new%2520FLStudio%2520tutorials%25C2%25A0and%2520%25C2%25A0Three%2520royalty%2520free%2520background%2520tracks%2520%2528aimed%2520at%2520game%2520use%2529.';" title="Google Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Btitle%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529';" title="StumbleUpon"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fnew-free-game-music-and-other-flstudio-stuff%26amp%3Bt%3DNew%2520free%2520game%2520music%2520%2528and%2520other%2520FLStudio%2520stuff%2529%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DI%2520added%2520a%2520few%2520things%2520to%2520the%2520much%2520neglected%2520music%2520portion%2520of%2520this%2520site%253A%2520A%2520couple%2520of%2520new%2520FLStudio%2520tutorials%25C2%25A0and%2520%25C2%25A0Three%2520royalty%2520free%2520background%2520tracks%2520%2528aimed%2520at%2520game%2520use%2529.';" title="Yahoo! Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/new-free-game-music-and-other-flstudio-stuff/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 A* pathfinding demo, with primitive multi-unit avoidance</title>
		<link>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo-with-primitive-multi-unit-avoidance</link>
		<comments>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo-with-primitive-multi-unit-avoidance#comments</comments>
		<pubDate>Tue, 23 Mar 2010 01:29:58 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=183</guid>
		<description><![CDATA[And here I thought I was doing good because I had basic pathfinding implemented. Pffft. Turns out, that is only half of the story. The other half is unit coordination.
A* works very nicely, as long as the walkable/unwalkable cell states are at least somewhat permanently so. But what happens when you have, say, two units, getting [...]]]></description>
			<content:encoded><![CDATA[<p>And here I thought I was doing good because I had basic pathfinding implemented. Pffft. Turns out, that is only half of the story. The other half is unit coordination.</p>
<p>A* works very nicely, as long as the walkable/unwalkable cell states are at least somewhat permanently so. But what happens when you have, say, two units, getting all up in each-other&#8217;s grill? With A*, you find the path, then set the units on their way. Along the way, one may invalidate the path of the other. You can, of course, be performing collision detection en-route, and repath a unit if it encounters another. This is what I did in the demo on this page. The problem is, this direct approach opens a huge can of complicated worms. The system as a whole is <em>so dynamic</em>, that trying to handle all of the possible &#8220;race conditions&#8221; and circular results inevitably produces quite the code quagmire.</p>
<p>Here&#8217;s the actual demo. Click to create a tower &#8220;character.&#8221; Control-click to reinitialize the whole thing.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="512" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.brainblitz.org/Misc/bot_pathingDemo.swf" /><embed type="application/x-shockwave-flash" width="512" height="512" src="http://www.brainblitz.org/Misc/bot_pathingDemo.swf"></embed></object></p>
<p>It won&#8217;t take much playing with it to realize that it is very, very broken. Characters will freeze as their states become invalid. Characters will be retarded. Sometimes the whole darn thing will freeze. (No code this time&#8230; it&#8217;s simply a nightmare, what-with all of my experimenting.)</p>
<p> Not that you can&#8217;t make an acceptable algorithm using the straight-forward approach that I have here <em>for simple applications</em>, but I&#8217;m aiming a little higher for my final &#8220;product,&#8221; and most likely will take a step backwards in progress and work on more elegant solutions.</p>
<p>Here&#8217;s a rough outline of what&#8217;s happening in my code:</p>
<ul>
<li>Unit starts in sleep mode, searching within its site range for entities from a different (&#8220;enemy&#8221;) group.</li>
<li>If enemy unit is found, build a list of all open cells adjacent to enemy. </li>
<li>Pick closest enemy-adjacent cell that is open, and run A*.</li>
<li>Check for collision with other units on frame.</li>
<li>If collision, <em>modify A* map with other character&#8217;s cell as unwalkable, recalc path, and revert A* map to prior state.</em></li>
</ul>
<p>So, where do the issues come in?</p>
<p>One example is when the characters go into a collision state, and may respond in a way that keeps them in a collision state (i.e. they both move to the same cell to avoid the collision). This often results in &#8220;stuttering,&#8221; where the solution to the collision puts them into a collision for which the solution puts them back into the original collision. This could be handled in a couple of ways.</p>
<p>1. Have the first unit (#1) to detect the collision send a message to the other unit (#2) to ignore it (#1).<br />
2. &#8230;sorry, I forgot what the other idea was while writing the first. I&#8217;m tired.</p>
<p>I&#8217;ll spend a little more time seeing if I can get an acceptable algorithm with the straight forward method. Otherwise&#8230;</p>
<p>I&#8217;ve got my reading cut out for me.<br />
<a href="http://theory.stanford.edu/~amitp/GameProgramming/">Amit&#8217;s Notes about Path-Finding</a> &#8211; the pathfinding Bible? (Look at the rest of the site too)<br />
<a href="http://www.gamasutra.com/view/feature/3313/coordinated_unit_movement.php">Gamasutra: Coordinated Unit Movement</a> - by Dave Pottinger (developed AI for Age Of Empires)<br />
<a href="http://www.gamasutra.com/view/feature/3314/implementing_coordinated_movement.php">Gamasutra: Implementing Coordinated Movement </a>- also by Dave</p>
<p>Also relevant:<br />
<a href="http://code.google.com/p/polygonal/wiki/DataStructures">AS3 data structures library</a> (requires CS4, I believe) &#8211; at the moment I&#8217;m only using singly and doubly linked lists, but as I take a step back, I&#8217;ll probably end up using a lot more from it.<br />
<a href="http://azureflame.dasaku.net/rpg-maker-xp/">Cute lil&#8217; character sprites</a> by Karura</p>




	<a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Btitle%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance%26amp%3Bbodytext%3DAnd%2520here%2520I%2520thought%2520I%2520was%2520doing%2520good%2520because%2520I%2520had%2520basic%2520pathfinding%2520implemented.%2520Pffft.%2520Turns%2520out%252C%2520that%2520is%2520only%2520half%2520of%2520the%2520story.%2520The%2520other%2520half%2520is%2520unit%2520coordination.%250D%250A%250D%250AA%252A%2520works%2520very%2520nicely%252C%2520as%2520long%2520as%2520the%2520walkable%252Funwalkable%2520cell%2520states%25C2%25A0are%2520at%2520le';" title="Digg"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Btitle%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance%26amp%3Bnotes%3DAnd%2520here%2520I%2520thought%2520I%2520was%2520doing%2520good%2520because%2520I%2520had%2520basic%2520pathfinding%2520implemented.%2520Pffft.%2520Turns%2520out%252C%2520that%2520is%2520only%2520half%2520of%2520the%2520story.%2520The%2520other%2520half%2520is%2520unit%2520coordination.%250D%250A%250D%250AA%252A%2520works%2520very%2520nicely%252C%2520as%2520long%2520as%2520the%2520walkable%252Funwalkable%2520cell%2520states%25C2%25A0are%2520at%2520le';" title="del.icio.us"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Bt%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance';" title="Facebook"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Btitle%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance%26amp%3Bannotation%3DAnd%2520here%2520I%2520thought%2520I%2520was%2520doing%2520good%2520because%2520I%2520had%2520basic%2520pathfinding%2520implemented.%2520Pffft.%2520Turns%2520out%252C%2520that%2520is%2520only%2520half%2520of%2520the%2520story.%2520The%2520other%2520half%2520is%2520unit%2520coordination.%250D%250A%250D%250AA%252A%2520works%2520very%2520nicely%252C%2520as%2520long%2520as%2520the%2520walkable%252Funwalkable%2520cell%2520states%25C2%25A0are%2520at%2520le';" title="Google Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Btitle%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance';" title="StumbleUpon"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.brainblitz.org%252Fanthony%252Fas3-a-pathfinding-demo-with-primitive-multi-unit-avoidance%26amp%3Bt%3DAS3%2520A%252A%2520pathfinding%2520demo%252C%2520with%2520primitive%2520multi-unit%2520avoidance%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DAnd%2520here%2520I%2520thought%2520I%2520was%2520doing%2520good%2520because%2520I%2520had%2520basic%2520pathfinding%2520implemented.%2520Pffft.%2520Turns%2520out%252C%2520that%2520is%2520only%2520half%2520of%2520the%2520story.%2520The%2520other%2520half%2520is%2520unit%2520coordination.%250D%250A%250D%250AA%252A%2520works%2520very%2520nicely%252C%2520as%2520long%2520as%2520the%2520walkable%252Funwalkable%2520cell%2520states%25C2%25A0are%2520at%2520le';" title="Yahoo! Bookmarks"><img src="http://www.brainblitz.org/anthony/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo-with-primitive-multi-unit-avoidance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post Adderall &#8211; Year of the Motivational Famine</title>
		<link>http://www.brainblitz.org/anthony/post-adderall-year-of-the-motivational-famine</link>
		<comments>http://www.brainblitz.org/anthony/post-adderall-year-of-the-motivational-famine#comments</comments>
		<pubDate>Mon, 11 Jan 2010 06:06:29 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Adderall]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=174</guid>
		<description><![CDATA[So it&#8217;s been about a year since I said goodbye to Adderall. And it has been one @%^@%! boring year. Every now and then I manage to get caught up in something for a few days &#8211; but never have the oomph to follow through and really create. Oh how I miss my old productive [...]]]></description>
			<content:encoded><![CDATA[<p>So it&#8217;s been about a year since I said goodbye to Adderall. And it has been one @%^@%! boring year. Every now and then I manage to get caught up in something for a few days &#8211; but never have the oomph to follow through and really <em>create</em>. Oh how I miss my old productive self.</p>
<p>I&#8217;ve come to the painful conclusion that I might actually have to go through an unpleasant re-training process. My brain became so accustomed to effortlessly cruising along, fueled by the little magical orange candy for $30/month, that it seems to have forgotten what real effort is. Now I mentally recoil at the thought of making myself DO something.</p>
<p>So I haven&#8217;t  spontaneously re-awakened after a year (@#%$!); I guess it&#8217;s time to be systematic about it. Set some goals or something (<em>recoil! recoil! recoil!</em>).</p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/post-adderall-year-of-the-motivational-famine/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Magical Pathfinding Brain</title>
		<link>http://www.brainblitz.org/anthony/the-magical-pathfinding-brain</link>
		<comments>http://www.brainblitz.org/anthony/the-magical-pathfinding-brain#comments</comments>
		<pubDate>Sun, 11 Oct 2009 00:54:30 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Blogorrhoea]]></category>
		<category><![CDATA[Bloody Cool]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=164</guid>
		<description><![CDATA[I was watching an 18 month old walk around yesterday. Since I&#8217;ve been obsessed with pathfinding lately, I couldn&#8217;t help but be amazed at how, with no apparent effort, a toddler could navigate through a room full of furniture, getting where he wanted to go, generally along the shortest path.
And so I started thinking &#8211; how [...]]]></description>
			<content:encoded><![CDATA[<p>I was watching an 18 month old walk around yesterday. Since I&#8217;ve been obsessed with pathfinding lately, I couldn&#8217;t help but be amazed at how, with no apparent effort, a toddler could navigate through a room full of furniture, getting where he wanted to go, generally along the shortest path.</p>
<p>And so I started thinking &#8211; how DO we actually perform a complex task such as finding the shortest path? At first glance, there is no answer really, &#8220;we just see it, it&#8217;s obvious.&#8221; But of course, something very complex IS happening, in the unconscious nether regions of the brain.</p>
<p>I think the first step in approaching the problem is to remove the visual sense, as it&#8217;s a distraction. The eyes bring information from any given scene in, but the visual sense doesn&#8217;t actually have anything to do with the actual pathfinding computation. Once the &#8220;scene&#8221; is in the brain, it exists as some sort of model, described by the brain&#8217;s fundamental language, and completely hidden from our conscious mind.</p>
<p>Another way to think about it is that the visual representation is simply a manifestation of the model that is in the brain. You can close your eyes and visualize the scene, and find the shortest path in your &#8220;mind&#8217;s eye,&#8221; but the work isn&#8217;t being done in the &#8220;mind&#8217;s eye,&#8221; it&#8217;s simply one view of the data residing elsewhere in the brain.</p>
<p>For me, getting rid of the visual sense makes things much easier to work with, because understanding what the sensation of vision actually is, and how it relates to our self-awareness, is kind of an intractable task. But now it&#8217;s out of the way!</p>
<p>So we&#8217;re left with trying to understand the technical details of how our biological computers solve the shortest path problem, which is far more approachable.</p>
<p>The next problem is &#8211; how is the model represented, fundamentally, in the brain? The brain obviously has it&#8217;s own, innate language. It has nothing to do with spoken language &#8211; a person who was raised in complete isolation (therefore had no concept of language) will still find the shortest path!</p>
<p>Of course, once you figure out the language of the brain, you now have to find out the rules by which it manipulates the data. If the language was binary, then the manipulation would be the logic gates, based on transistors (neurons).</p>
<p>But, as far as I know, we have no idea what the innate language of the brain is, or the rule-set by which it processes data. I imagine it is similar to trying to visualize the 4th dimension. I don&#8217;t remember which greek philospher/scientist it was, but he thought he&#8217;d proved the fourth dimension can&#8217;t exist, because all dimensions much be mutually perpendicular to each other. So he thought, if you take a stick, and lay it across another stick so that they form a cross, you have two dimensions. If you take a third stick and hold it perpendicular to the first two sticks, you have a representation of three dimensions. His proof that no more dimensions could exist was simply that <em>you can&#8217;t add another stick that is mutually perpendicular to the first three.</em></p>
<p>What the fellow didn&#8217;t understand, however, was that our brains, never having encountered a fourth dimension, simply can&#8217;t comprehend it. It is like someone blind from birth trying to imagine what &#8220;red&#8221; looks like. That person can&#8217;t even begin to imagine it, because his brain has no concept of color, having never experienced it. Our physical world that we live in is 3-dimensioned, and so that is all our brain can comprehend. The fact is, in reality, there can be an arbitrary number of sticks, all perpendicular to each other. Don&#8217;t go trying that, of course. : )  For whatever reason, the physical state of the universe restricts our experience to 3 dimensions.</p>
<p>My point in going into that tangent was &#8211; I suspect that the language and processing of the brain might be genuinely beyond comprehension.</p>
<p>But that doesn&#8217;t mean it&#8217;s not solvable! Mathematically, working with 4 dimensions is only slightly harder than working with 3 (mainly because the equations get much longer). Just because we can&#8217;t comprehend the fourth dimension doesn&#8217;t mean we can&#8217;t work with it. Similarily, just because we might not ever comprehend how the brain works, we can still <em>understand it</em>, and work with it.</p>
<p>And figure out how it solves problems like finding the shortest path.</p>
<p>But who knows, maybe I&#8217;m wrong. Heck, maybe the brain works in binary. I kind of doubt it though - I imagine the brain does not even have a discrete alphabet forming it&#8217;s language, but rather a fuzzy, statistical alphabet. Maybe the answer will be found in quantum mechanics.</p>
<p>The last  observation has to do with artificial intelligence. So far, we haven&#8217;t been able to work with the 4th dimension (although it has been indirectly observed, as massive objects like the sun affect it by gravity). Indeed, it seems to be beyond the realm of our physical capacity (not capability, capacity) to work with it. In the same way, maybe it&#8217;s beyond our physical capacity to reproduce what the brain is doing.</p>
<p>That&#8217;s a hard chunk to swallow, but &#8211; we&#8217;ve observed the effects of gravity upon light via the 4th dimension, just as we&#8217;ve observed the effects of the brain&#8217;s operations.</p>
<p>So it maybe creating AI IS an intractable problem. That is &#8211; it&#8217;s not that the solution is <em>difficult;</em> it&#8217;s simply not possible.</p>
<p>Of course, again, maybe it all is just the biological equivalent to binary and transistors, in which case AI is inevitable (if humans are around long enough to figure it out).</p>
<p>In that case, maybe, when I find my way through an obstacle course along the shortest path, my brain actually applies a grid to the scene, and runs A* on it. : D</p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/the-magical-pathfinding-brain/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 A* pathfinding class</title>
		<link>http://www.brainblitz.org/anthony/as3-a-pathfinding-class</link>
		<comments>http://www.brainblitz.org/anthony/as3-a-pathfinding-class#comments</comments>
		<pubDate>Fri, 09 Oct 2009 18:26:44 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=155</guid>
		<description><![CDATA[UPDATE: newer demo and source at http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source.
Here is a* (a star) again, a little further along. Download: http://www.brainblitz.org/Misc/astar/v1.0/AStarMap1.0.zip
 Instructions: drag to fill squares, shift-drag to erase, space to run, r to clear all cells.

If you play with it, you&#8217;ll notice that the path always veers slightly into concave &#8220;barricades.&#8221; Some times it even just seems to arbitrarily [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: newer demo and source at <a href="http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source">http://www.brainblitz.org/anthony/as3-pathfinding-and-game-source</a>.</p>
<p>Here is a* (a star) again, a little further along. Download: <a href="http://www.brainblitz.org/Misc/astar/v1.0/AStarMap1.0.zip">http://www.brainblitz.org/Misc/astar/v1.0/AStarMap1.0.zip</a></p>
<p> <strong>Instructions:</strong> drag to fill squares, shift-drag to erase, space to run, r to clear all cells.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.brainblitz.org/Misc/astar/v1.0/astar.swf" /><param name="src" value="http://www.brainblitz.org/Misc/astar/v1.0/astar.swf" /><embed type="application/x-shockwave-flash" width="400" height="400" src="http://www.brainblitz.org/Misc/astar/v1.0/astar.swf" data="http://www.brainblitz.org/Misc/astar/v1.0/astar.swf"></embed></object></p>
<p>If you play with it, you&#8217;ll notice that the path always veers slightly into concave &#8220;barricades.&#8221; Some times it even just seems to arbitrarily wander off course by one cell, when it should be going in a straight line.</p>
<p>Why? The g cost of a diagnol movement is supposed to be 1.4 times the cost of a &#8220;straight&#8221; movement. I left that out of the algorithm for 2 reasons:</p>
<ol>
<li>For reasons I haven&#8217;t quite figured out, it runs 3 to 4 times faster without it.</li>
<li>The imperfect solution almost looks more natural, with a little bit of random-ish looking meandering.</li>
</ol>
<p>Here are a couple of examples of some of the quirks:</p>

<a href='http://www.brainblitz.org/anthony/as3-a-pathfinding-class/astar_1' title='astar_1'><img width="150" height="150" src="http://www.brainblitz.org/anthony/wp-content/uploads/2009/10/astar_1-150x150.gif" class="attachment-thumbnail" alt="" title="astar_1" /></a>
<a href='http://www.brainblitz.org/anthony/as3-a-pathfinding-class/astar_2' title='astar_2'><img width="150" height="150" src="http://www.brainblitz.org/anthony/wp-content/uploads/2009/10/astar_2-150x150.gif" class="attachment-thumbnail" alt="" title="astar_2" /></a>
<a href='http://www.brainblitz.org/anthony/as3-a-pathfinding-class/astar_3' title='astar_3'><img width="150" height="150" src="http://www.brainblitz.org/anthony/wp-content/uploads/2009/10/astar_3-150x150.gif" class="attachment-thumbnail" alt="" title="astar_3" /></a>

<p>Speedwise, I don&#8217;t know what is typical for A*, but in Flash player, the time varied from 12ms to 23ms, the latter for very concave maps. In comparison, the graphics usually registered 0. So I&#8217;m sure there&#8217;s tons of room for improvement.</p>
<p><span style="color: #003366;">Class AStarMap</span></p>
<ul>
<li><span style="color: #003366;">gridWidth</span></li>
<li><span style="color: #003366;">gridHeight</span></li>
<li><span style="color: #003366;">AStarMap(_gridWidth:int, _gridHeight:int)</span></li>
<li><span style="color: #003366;">setEndPoints(originX:int, originY:int, destX:int, destY:int)</span></li>
<li><span style="color: #003366;">solve():Array</span></li>
<li><span style="color: #003366;">getPath():Array</span></li>
<li><span style="color: #003366;">getCell(xx:int, yy:int):Object</span></li>
<li><span style="color: #003366;">setCell(xx:int, yy:int, cellType:int)</span></li>
<li><span style="color: #003366;">toggleCell(cellX:int, cellY:int)</span></li>
<li><span style="color: #003366;">reset()</span></li>
</ul>
<p><span style="color: #000000;">Typical usage:</span></p>
<p><span style="color: #000000;">   var map:AStarMap = new AStarMap(20, 20);<br />
   map.setCell(2, 4, map.CELL_FILLED);<br />
   map.setCell(3, 4, map.CELL_FILLED);<br />
   map.setCell(4, 4, map.CELL_FILLED);<br />
   map.setCell(5, 4, map.CELL_FILLED);<br />
   map.setEndPoints(2, 2, 18, 18);</span></p>
<p><span style="color: #000000;">   var solution:Array = map.solve();</span></p>
<p><span style="color: #000000;">The returned Array is an array of cell objects. Each object has the following properties:</span></p>
<p><span style="color: #000000;">   cell.x<br />
   cell.y<br />
   cell.parentCell</span><span style="color: #000000;">   </span></p>
<p><span style="color: #000000;">Note that this class does NOT address graphics: it is purely &#8220;math space.&#8221;</span></p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/as3-a-pathfinding-class/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>AS3 A* pathfinding demo</title>
		<link>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo</link>
		<comments>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo#comments</comments>
		<pubDate>Thu, 24 Sep 2009 04:11:15 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/?p=149</guid>
		<description><![CDATA[Space to step the algorithm, r to reset, and click a square to toggle it&#8217;s &#8220;walkable&#8221; status.

I created this as I worked through the excellent A* Pathfinding for Beginners tutorial by Patrick Lester, bless his heart. My app is actually not 100% done, in a way that will make it sometimes not take quite the shortest path.
Note [...]]]></description>
			<content:encoded><![CDATA[<p>Space to step the algorithm, r to reset, and click a square to toggle it&#8217;s &#8220;walkable&#8221; status.</p>
<p><object width="400" height="400" data="http://www.brainblitz.org/Misc/astar.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.brainblitz.org/Misc/astar.swf" /></object></p>
<p>I created this as I worked through the excellent <a href="http://www.policyalmanac.org/games/aStarTutorial.htm">A* Pathfinding for Beginners </a>tutorial by Patrick Lester, bless his heart. My app is actually not 100% done, in a way that will make it sometimes not take quite the shortest path.</p>
<p>Note that this demo, as opposed to Patrick&#8217;s tutorial, does not allow for diagnol movement (as my final application will use a more zelda-esque movement).</p>
<p><a href="http://www.brainblitz.org/Misc/AStar.zip">Here&#8217;s the code.</a></p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/as3-a-pathfinding-demo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meta-Lifehack</title>
		<link>http://www.brainblitz.org/anthony/meta-lifehack</link>
		<comments>http://www.brainblitz.org/anthony/meta-lifehack#comments</comments>
		<pubDate>Wed, 02 Sep 2009 14:59:02 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Blogorrhoea]]></category>

		<guid isPermaLink="false">http://www.brainblitz.org/anthony/posts/147</guid>
		<description><![CDATA[Stop reading inspirational blogs; stop reading about how to be more efficient; stop reading &#8220;20 lifehacks you can&#8217;t live without.&#8221;
Nike says it best: Just Do It.
I wonder how many would-be successful people will never BE successful, because they spend so much time READING about how to be successful.
]]></description>
			<content:encoded><![CDATA[<p>Stop reading inspirational blogs; stop reading about how to be more efficient; stop reading &#8220;20 lifehacks you can&#8217;t live without.&#8221;</p>
<p>Nike says it best: Just Do It.</p>
<p>I wonder how many would-be successful people will never BE successful, because they spend so much time READING about how to be successful.</p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.brainblitz.org/anthony/meta-lifehack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
