<?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>AngryAnt.com &#187; General</title>
	<atom:link href="http://eej.dk/angryant/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://eej.dk/angryant</link>
	<description>Game and -AI development</description>
	<lastBuildDate>Wed, 30 Nov 2011 22:41:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Behave 1.4 released</title>
		<link>http://eej.dk/angryant/general/behave/behave-1-4-released/</link>
		<comments>http://eej.dk/angryant/general/behave/behave-1-4-released/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 22:36:58 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[Behave]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=772</guid>
		<description><![CDATA[So obviously I ended up not spending more time on that RPG thing&#8230; I did however work on some 3.5 stuff back at Unity, some upcoming demo stuff and baby Lili was born. Meanwhile I spent spare time on Behave rather than the RPG thing, so now 1.4 is ready for release. TADAA! This release [...]]]></description>
			<content:encoded><![CDATA[<p>So obviously I ended up not spending more time on that RPG thing&#8230; I did however work on some 3.5 stuff back at Unity, some upcoming demo stuff and baby Lili was born.</p>
<p>Meanwhile I spent spare time on Behave rather than the RPG thing, so now 1.4 is ready for release. TADAA!</p>
<p>This release primarily holds runtime optimizations, fixes and tweaks. Specifically I would like to highlight the ability to mark components as &#8220;instant&#8221;. The instant flag affects sequences and selectors when moving between child nodes. When an instant child component completes, rather than waiting for the next tick to tick the following child node, the sequence or selector does it immediately.</p>
<p>Anywho, get it on the asset store and remember to rebuild your libraries after installing.</p>
<p>The rest of the changes follow:</p>
<pre>1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on "library not loaded".
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added "instant" flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked "instant" completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.</pre>
<p>You&#8217;ll find a link to the package in the <a href="http://angryant.com/behave/downloads" target="_parent">download</a> section. Have fun!</p>
<p><a href="http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released" target="_blank">Unity forum thread</a>.</p>
<div id="tweetbutton772" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fbehave%2Fbehave-1-4-released%2F&amp;text=Behave%201.4%20released&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fbehave%2Fbehave-1-4-released%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/behave/behave-1-4-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>So I&#8217;ve been a bit busy lately</title>
		<link>http://eej.dk/angryant/general/so-ive-been-a-bit-busy-lately/</link>
		<comments>http://eej.dk/angryant/general/so-ive-been-a-bit-busy-lately/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 18:27:03 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=757</guid>
		<description><![CDATA[Little under half a year later and I&#8217;m still here. Things have been rather hectic since my last update. In Copenhagen we conquered more office space and my team moved in there. I made some demos (Third Person MMO Controller and Astro Dude), went to a conference, worked on a Unity release and pitched in [...]]]></description>
			<content:encoded><![CDATA[<p>Little under half a year later and I&#8217;m still here. Things have been rather hectic since my last update. In Copenhagen we conquered more office space and my team moved in there. I made some demos (<a href="http://u3d.as/content/unity-technologies/third-person-mmo-controller/1Wt" target="_top">Third Person MMO Controller</a> and <a href="http://u3d.as/content/unity-technologies/astro-dude/24Y">Astro Dude</a>), went to <a href="http://gameaiconf.com/">a conference</a>, worked on <a href="http://blogs.unity3d.com/2011/06/16/unity-roadmap-2011/">a Unity release</a> and pitched in to realize <a href="http://unity3d.com/unite/">another killer conference</a>.</p>
<p>By the way at that last conference I did a talk titled &#8220;AI in Unity&#8221; &#8211; the goal of which was to try and demystify the concept of AI a bit. I&#8217;ll make some noise when we have the recording of it available.</p>
<p>Oh and I fixed the comments on the blog, so I&#8217;ve just cleared out 300-something spam posts. Anyone got advice on how to avoid this on a WordPress blog? (Read: I&#8217;m too lazy to change blogging system if anyone suggests that). Oh and therefore I enabled the &#8220;must approve comments&#8221; thingy. Not sure if that is going to help anything, but at least it will reduce the noise on your end.</p>
<p>So what is next then? Well I&#8217;ve got a few things I&#8217;d like to release in a Behave point upgrade and then the plan is to move on to 2.0 which will hold some backwards-compatibility breaking changes.</p>
<p>At Unity there&#8217;s a bit more 3.5 stuff to do and some even awesomererer demos on the way. The extra awesomeness has been underway for quite a while, so I&#8217;m very excited to get this out soon.</p>
<p>I very recently started playing around with some RPG mechanics in my spare time (had a day off after Unite and couldn&#8217;t sit still). It&#8217;s so spare time that the plan is to have no additional plans. Let&#8217;s see where that goes.</p>
<p>Ah and I&#8217;ll work with <a href="http://www.blender.org/blenderorg/blender-foundation/">some groovy dudes</a> on getting a <a href="http://copenhagen.startupweekend.org/">3D themed workshop event</a> up and going early next year. I don&#8217;t think it has been announced yet, but it will be awesome &#8211; and full of Unity of-course. That should hit right before <a href="http://nordicgamejam.org/">the other groovy thing</a> I&#8217;m working on again this year with more <a href="http://igda.dk/">awesome dudes and dudettes</a>. Fun times!</p>
<p>What else? Oh yea. With my low bandwidth for updates, I&#8217;ve turned increasingly more to <a href="http://twitter.com/#!/angryant">twitter</a> and the <a href="https://gist.github.com/AngryAnt">gist</a> feature of <a href="https://github.com/AngryAnt">github</a>. Hopefully I will have the time to do some good reads in the Tips and Tricks section soon, but the gist setup is just so very quick.</p>
<p>I probably forgot a ton of stuff, but hopefully this was a good reboot of this blog thing. Let&#8217;s see what happens. Maybe I could start blogging about that RPG thing if it accidentally turns interesting. We&#8217;ll see.</p>
<p>Have fun!</p>
<div id="tweetbutton757" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fso-ive-been-a-bit-busy-lately%2F&amp;text=So%20I%26%238217%3Bve%20been%20a%20bit%20busy%20lately&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fso-ive-been-a-bit-busy-lately%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/so-ive-been-a-bit-busy-lately/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Behave 1.3 released</title>
		<link>http://eej.dk/angryant/general/behave/behave-1-3-released/</link>
		<comments>http://eej.dk/angryant/general/behave/behave-1-3-released/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 11:50:06 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[Behave]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=750</guid>
		<description><![CDATA[After quite a long break (including shifting around at utech, doing a Path release etc.), Behave is finally getting another update! This release is primarily a bugfix and editor polish release. One thing I&#8217;d like to highlight though is the addition of agent blueprints. From the changelog: &#8211; Added agent blueprints &#8211; connecting to agent [...]]]></description>
			<content:encoded><![CDATA[<p>After quite a long break (including shifting around at utech, doing a Path release etc.), Behave is finally getting another update!</p>
<p>This release is primarily a bugfix and editor polish release. One thing I&#8217;d like to highlight though is the addition of agent blueprints. From the changelog:</p>
<blockquote><p> &#8211; Added agent blueprints &#8211; connecting to agent handlers through virtual methods rather than reflected handlers.</p></blockquote>
<p>Generally this enables you to more explicitly tie up handlers and cuts down on tree initialization time. Oh and of-course you gain auto-completion when setting up your handlers.</p>
<p>Anyway, here&#8217;s the whole changelog:</p>
<pre>1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed "Cannot update unregistered tree" handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.</pre>
<p>You&#8217;ll find a link to the package in the <a href="http://angryant.com/behave/downloads" target="_parent">download</a> section. Have fun!</p>
<p><a href="http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released" target="_blank">Unity forum thread</a>.</p>
<div id="tweetbutton750" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fbehave%2Fbehave-1-3-released%2F&amp;text=Behave%201.3%20released&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fbehave%2Fbehave-1-3-released%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/behave/behave-1-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IGDA Unity SIG slides</title>
		<link>http://eej.dk/angryant/general/igda-unity-sig-slides/</link>
		<comments>http://eej.dk/angryant/general/igda-unity-sig-slides/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 08:31:00 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=743</guid>
		<description><![CDATA[OHAI! Sorry about the delay &#8211; things have been a bit hectic around here. Per request, I&#8217;m making available exports of three of my slideshows from the recent IGDA Unity SIGs. I hope you&#8217;ll find them useful: AI in Unity Network Unity GUI Tweet]]></description>
			<content:encoded><![CDATA[<p>OHAI! Sorry about the delay &#8211; things have been a bit hectic around here. Per request, I&#8217;m making available exports of three of my slideshows from the recent IGDA Unity SIGs. I hope you&#8217;ll find them useful:</p>
<ul>
<li><a href="http://eej.dk/angryant/wp-content/uploads/2011/04/AI%20in%20Unity.pdf" target="_parent">AI in Unity</a></li>
<li><a href="http://eej.dk/angryant/wp-content/uploads/2011/04/Network.pdf" target="_parent">Network</a></li>
<li><a href="http://eej.dk/angryant/wp-content/uploads/2011/04/Unity%20GUI.pdf" target="_parent">Unity GUI</a></li>
</ul>
<div id="tweetbutton743" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Figda-unity-sig-slides%2F&amp;text=IGDA%20Unity%20SIG%20slides&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Figda-unity-sig-slides%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/igda-unity-sig-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Second Unity IGDA SIG this evening: Scene construction and AI</title>
		<link>http://eej.dk/angryant/general/second-unity-igda-sig-this-evening-scene-construction-and-ai/</link>
		<comments>http://eej.dk/angryant/general/second-unity-igda-sig-this-evening-scene-construction-and-ai/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 10:05:39 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=740</guid>
		<description><![CDATA[OHAI A week has passed and the second of six Unity specific IGDA SIGs is upon us. Like last time, the event will take place at the IT University, Copenhagen, Denmark at 1800. We will meet in the reception and from there move to the auditorium. The originally planned physics bit of todays SIG has [...]]]></description>
			<content:encoded><![CDATA[<p>OHAI</p>
<p>A week has passed and the second of six Unity specific IGDA SIGs is upon us. Like last time, the event will take place at the IT University, Copenhagen, Denmark at 1800.</p>
<p>We will meet in the reception and from there move to the auditorium. The originally planned physics bit of todays SIG has been rescheduled to next thursday, where Jonas Echterhoff will be in town and give the talk. Jonas is the man with the plan of the PhysX integration in Unity, so added awesomenessness!</p>
<p>This means that today Joe Robins will be talking about scene construction and I will be covering AI in Unity.</p>
<p>For this thursday we should be lucky and get even more Unity Tech people to participate in the discussion bit of the SIG. And remember afterwards we&#8217;re doing the bar meet and given it&#8217;s Saint Patricks, we&#8217;re likely to be a good group of people moving from bar to bar.</p>
<p>The original IGDA post w. schedule:<br />
<a href="http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/">http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/</a></p>
<p>IGDA post on the rescheduling of the physics talk:<br />
<a href="http://igda.dk/2011/03/16/unity-sig-update-on-the-meeting-thursday-173/">http://igda.dk/2011/03/16/unity-sig-update-on-the-meeting-thursday-173/</a></p>
<div id="tweetbutton740" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fsecond-unity-igda-sig-this-evening-scene-construction-and-ai%2F&amp;text=Second%20Unity%20IGDA%20SIG%20this%20evening%3A%20Scene%20construction%20and%20AI&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fsecond-unity-igda-sig-this-evening-scene-construction-and-ai%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/second-unity-igda-sig-this-evening-scene-construction-and-ai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First IGDA Unity SIG this evening</title>
		<link>http://eej.dk/angryant/general/first-igda-unity-sig-this-evening/</link>
		<comments>http://eej.dk/angryant/general/first-igda-unity-sig-this-evening/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 12:04:02 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=736</guid>
		<description><![CDATA[Quick announcement for anyone in or around the CPH area: I&#8217;m doing the first of six IGDA Unity SIGs (Special Interest Groups) this evening, with Joe Robins. The event is held at the IT University of Copenhagen and starts at 1800. Anyone can attend (for free) and this first SIG will be a general introduction [...]]]></description>
			<content:encoded><![CDATA[<p>Quick announcement for anyone in or around the CPH area: I&#8217;m doing the first of six IGDA Unity SIGs (Special Interest Groups) this evening, with Joe Robins.</p>
<p>The event is held at the IT University of Copenhagen and starts at 1800. Anyone can attend (for free) and this first SIG will be a general introduction to Unity &#8211; basic principles of the engine, workflow and such. The following five SIGs will dive into various specific areas of Unity.</p>
<p>For more information and the full program, see the IGDA DK blog:<br />
<a href="http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/" target="_parent">http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/</a></p>
<div id="tweetbutton736" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Ffirst-igda-unity-sig-this-evening%2F&amp;text=First%20IGDA%20Unity%20SIG%20this%20evening&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Ffirst-igda-unity-sig-this-evening%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/first-igda-unity-sig-this-evening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative licensing available</title>
		<link>http://eej.dk/angryant/general/alternative-licensing-available/</link>
		<comments>http://eej.dk/angryant/general/alternative-licensing-available/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 12:05:53 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=732</guid>
		<description><![CDATA[After having been poked on the issue for a while now, I&#8217;m finally offering the option of requesting alternative licensing on Path and Behave. Something in the default license which doesn&#8217;t fit your project too well? Let&#8217;s talk about it. Please use the form available on the Licensing page, available from the navigation bar. Tweet]]></description>
			<content:encoded><![CDATA[<p>After having been poked on the issue for a while now, I&#8217;m finally offering the option of requesting alternative licensing on Path and Behave.</p>
<p>Something in the default license which doesn&#8217;t fit your project too well? Let&#8217;s talk about it. Please use the form available on the <a href="http://angryant.com/licensing" target="_parent">Licensing</a> page, available from the navigation bar.</p>
<div id="tweetbutton732" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Falternative-licensing-available%2F&amp;text=Alternative%20licensing%20available&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Falternative-licensing-available%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/alternative-licensing-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pathfinding in two lines</title>
		<link>http://eej.dk/angryant/general/path/pathfinding-in-two-line/</link>
		<comments>http://eej.dk/angryant/general/path/pathfinding-in-two-line/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 09:22:56 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[Path]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=702</guid>
		<description><![CDATA[I just updated the Path documentation with a short tutorial describing the simplest possible interface between your code and the Path runtime: &#8220;Pathfinding in two lines&#8221;. Furthermore, I added a link to the previously released introduction video to Path 2.0b1. While I will make sure to re-record it with the released build, 99% of the [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated the <a href="http://angryant.com/path/documentation" target="_parent">Path documentation</a> with a short tutorial describing the simplest possible interface between your code and the Path runtime: &#8220;Pathfinding in two lines&#8221;.</p>
<p>Furthermore, I added a link to the previously released introduction video to Path 2.0b1. While I will make sure to re-record it with the released build, 99% of the stuff in that video still applies.</p>
<div id="tweetbutton702" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fpath%2Fpathfinding-in-two-line%2F&amp;text=Pathfinding%20in%20two%20lines&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fpath%2Fpathfinding-in-two-line%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/path/pathfinding-in-two-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Path 2 released</title>
		<link>http://eej.dk/angryant/general/path/path-2-released/</link>
		<comments>http://eej.dk/angryant/general/path/path-2-released/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 23:19:52 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[Path]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=681</guid>
		<description><![CDATA[That&#8217;s right, Path is back in business &#8211; easier to use and more powerful than ever before! Version 2 is now available for download on the Unity asset store. Find a link to it in the downloads section &#8211; along with an example seeker script. Full API documentation is available in the documentation section &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, Path is back in business &#8211; easier to use and more powerful than ever before! Version 2 is now available for download on the Unity asset store. Find a link to it in the <a href="http://angryant.com/path/downloads" target="_parent">downloads</a> section &#8211; along with an example seeker script.</p>
<p>Full API documentation is available in the <a href="http://angryant.com/path/documentation" target="_parent">documentation</a> section &#8211; more documentation is on the way, as is integration between UnitySteer and Path 2.</p>
<p>That&#8217;s it for now. Have fun!</p>
<p><a href="http://forum.unity3d.com/threads/78037-AI-Pathfinding-in-Unity-Path" target="_parent">Unity forum thread</a>.</p>
<div id="tweetbutton681" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fpath%2Fpath-2-released%2F&amp;text=Path%202%20released&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Fpath%2Fpath-2-released%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/path/path-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assembling and assimilating</title>
		<link>http://eej.dk/angryant/general/tipsandtricks/assembling-and-assimilating/</link>
		<comments>http://eej.dk/angryant/general/tipsandtricks/assembling-and-assimilating/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 08:10:43 +0000</pubDate>
		<dc:creator>AngryAnt</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://eej.dk/angryant/?p=571</guid>
		<description><![CDATA[So this post has been delayed for quite a while&#8230; One question I got from many sources after my Advanced Editor Scripting talk with Adam Mechtley at Unite &#8217;10 was &#8220;so how did you do that assembly building thing?&#8221;. Well I did it before we had a port of MonoDevelop available, so my options were [...]]]></description>
			<content:encoded><![CDATA[<p>So this post has been delayed for quite a while&#8230; One question I got from many sources after my Advanced Editor Scripting talk with Adam Mechtley at Unite &#8217;10 was &#8220;so how did you do that assembly building thing?&#8221;.</p>
<p>Well I did it before we had a port of MonoDevelop available, so my options were limited. Now that we do have that port, you&#8217;ll be able to redo this exercise in there with some GUI drag-drop nicenessness. However, just because I can (and because it is healthy learning and lovely hacky) I will provide the command-line/perl script solution, which is still my approach.</p>
<p>First a quick &#8220;why&#8221;: As mentioned in my Unite talk, there are three reasons I wrap my projects in .net assemblies before distributing &#8211; and no it&#8217;s got nothing to do with keeping the source secure &#8211; assemblies are <b>easily</b> decompiled:</p>
<ul>
<li>Reduce deployment clutter. If I were to release Behave without being wrapped in assembly, it would span around 150 &#8211; 170 source files and textures in various folder configurations. Now I have two folders, three assemblies and about five script files.</li>
<li>Reduce funky bug reports. While .net assemblies are very easily disassembled, it does at least take some dedication to do so. More than it takes to randomly change something in a full source distribution when things don&#8217;t go your way. So assemblies help you get rid of a portion of those really long bug reports which end up with &#8220;oh, by the way, I changed this one thing in your distribution &#8211; you think that might have something to do with it?.</li>
<li>They can load in at runtime. This is really cool and quite useful if applicable to your scenario &#8211; for more information, check out this other tips and tricks post: <a href="http://angryant.com/general/tipsandtricks/downloading-the-hydra/" target="_parent">downloading the hydra</a>.</li>
</ul>
<p>In this post I am going to show you how to build your scripts into a .net assembly (.dll) and add it to your Unity project. And just to spice things up, lets take that in reverse: Once your assembly is built, copy that bastard into your Assets folder. Done.</p>
<p>Easy, right? Now, let&#8217;s take a look at the assembly building. And, before you start, yes this will run on all Unity supported platforms and no it does not require pro &#8211; run this on the base Unity license without issues.</p>
<h2>Setup</h2>
<p>So first off, if you are on windows, you&#8217;ll be needing a perl install. I usually got for ActivePerl. Not saying it is more awesomerer than anything else out there &#8211; just that I know it and it usually works just fine. If you are on OS X, you&#8217;re in luck, as perl comes preinstalled.</p>
<p>Now, let&#8217;s get perl hacking. This is in no way meant as a &#8220;my first perl script&#8221; guide. We&#8217;re just getting introduced to a means to an end &#8211; and it is not going to be pretty. So first off, create a new text file in your favorite text editor and save it as build.pl. Start the file off like so:</p>
<pre>#/usr/local/bin/perl

use strict;
use Getopt::Long;
use Term::ANSIColor;
use File::Basename;
use File::Spec;
chdir (File::Spec->rel2abs (dirname($0)));

our $compiler = "/Applications/Unity/Unity.app/Contents/Frameworks/Mono/bin/gmcs";
our $assemblyUnityEngine = "/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll";
our $assemblyUnityEditor = "/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll";</pre>
<p>Now, that was a bit of a mouthful, but it should be pretty straight-forward. Lines three through eight include a lot of perl functionality we will be using later. And actually the last two ones are already used in line nine. Here we&#8217;re ensuring that the rest of the script is being executed in the context of the folder containing the file.</p>
<p>In the next few lines of interest, three variables are declared &#8211; pathes to the mono compiler shipped with Unity and the UnityEngine and UnityEditor assemblies. Notice that these are OS X pathes, for a windows setup (or if you installed Unity into a different folder than the default), you&#8217;ll need to correct these.</p>
<h2>Debug command-line parameter</h2>
<p>Next up, let&#8217;s add support for command-line parameters. &#8220;Why?&#8221; you ask &#8211; because they are going to be awesome for debugging our assembly later. The only command-line parameter we will be supporting for now is &#8220;&#8211;release&#8221;. This will basically let us toggle, when building the assembly, a bunch of logging and other stuff on or off. This is what it looks like:</p>
<pre>my $optionRelease = 0;

GetOptions (
	"release" => \$optionRelease
);</pre>
<p>We declare a variable named optionRelease, initialize it to zero and then call GetOptions, telling it to pass data on the use of the &#8220;release&#8221; parameter into our variable. Now, GetOptions has a bunch of functionality, but the way we use it here, it simply assigns one or zero to our variable &#8211; depending on whether the parameter is used or not.</p>
<p>Next up, we need to use this variable to affect the parameters we pass to the gmcs compiler. Like so:</p>
<pre>my $debugOptions = $optionRelease == 0 ? "-d:DEBUG" : "";</pre>
<p>The idea here is that gmcs takes a parameter -d:[name] which instructs it to, during pre-processing, run with the symbol [name] defined. Something we can work with in our code like this:</p>
<pre>#if DEBUG
	Debug.Log ("I'm only visible in debug builds!");
#endif</pre>
<h2>Building two assemblies</h2>
<p>Next up, a bit of info. Since Unity 3, we&#8217;ve enforced that scripts and assembly depending on UnityEditor, even if not using that, cannot be included in builds. This means that if you have some editor scripts, you would also like built to assembly, you will need to split these out into a different assembly than the one containing your runtime scripts.</p>
<p>Lets&#8217;s assume that is the case for this exercise, that the runtime scripts are located in Source/ and that the editor scripts are located in Source/Editor. So we will have to build two assemblies. That could mean code duplication, which should cause anyone pain, so let&#8217;s be nice and wrap some of the building up in a perl subroutine:</p>
<pre>sub BuildAssembly
{
	our $compiler;

	my $target = shift;
	my $out = shift;
	my $arguments = shift;
	my $source = shift;

	print ("Compiling $out\n");
	print color ("blue"), "$compiler -target:$target -out:$out $arguments $source\n";
	print color ("red");
	system ("$compiler -target:$target -out:$out $arguments $source") and die ("Compilation of $out failed.");
	print color ("reset");
}</pre>
<p>Let&#8217;s take this subroutine line by line. First off we pull in the global variable &#8220;compiler&#8221;. After this, we populate the variables target, out, arguments and source from subroutine parameters. With these at hand, the fun begins. First off, we print out the name of our build target (MyAwesome.dll) and the command we&#8217;re planning to execute &#8211; marked in fashionable blue.</p>
<p>Second we actually do the building &#8211; colouring any compiler output red (no news is good news &#8211; output is bad). If compilation fails, we kill the script &#8211; allowing the user to take action. If all went well, we remember to reset the colouring before returning from the subroutine.</p>
<p>So how about some use of this subroutine, eh?</p>
<pre>BuildAssembly ("library", "Awesomenessness.Runtime.dll", "Source/*.cs", "-d:RUNTIME $debugOptions -r:$assemblyUnityEngine");
BuildAssembly ("library", "Awesomenessness.Editor.dll", "Source/Editor/*.cs", "-d:EDITOR $debugOptions -r:Awesomenessness.Runtime.dll,$assemblyUnityEngine,$assemblyUnityEditor");</pre>
<p>As you see, we first build the runtime assembly from Source/*.cs, with the RUNTIME and optionally the DEBUG symbol defined. We also make sure to include the UnityEngine assembly in the building, so that you can reference stuff from the UnityEngine namespace.</p>
<p>In the second line, we build the editor assembly &#8211; containing all our editor code from Source/Editor/*.cs. This time we define the EDITOR and optionally the DEBUG symbol during building. This assembly references not only the UnityEngine assembly, but also the UnityEditor one and the runtime assembly which was just built in the line above.</p>
<h2>Distribution</h2>
<p>And that&#8217;s about it! As mentioned early in this post, all you need to do in order to include these assemblies in your project is to drag them into your assets folder, but if you&#8217;re very nice, you could just make that copy a part of the build script:</p>
<pre>system ("cp Awesomenessness.Runtime.dll Test\\ project/Assets/Awesomenessness");
system ("cp Awesomenessness.Editor.dll Test\\ project/Assets/Awesomenessness/Editor");</pre>
<p>Notice that this uses the OS X cp command-line tool. For windows, replace with equivalent.</p>
<h2>Limitation: Editor classes in assemblies</h2>
<p>While MonoBehaviours can live just fine in assemblies, editor scripts (ScriptableObject derived classes) come with a limitation (currently still active, as of Unity 3.1): You can not initialize these classes via UnityEditor API calls. That would be calls like ScriptableObject.CreateInstance and EditorWindow.GetWindow.</p>
<p>However &#8211; you can create instances of classes via &#8220;new&#8221; just fine and you can derive scripts located outside of the assembly and instantiate those via UnityEditor calls without incident. Say for example that MyEditorWindow derives from EditorWindow and is located in an assembly. Now I cannot instantiate it via GetWindow, but if I create a .cs file in my assets folder containing a class which does nothing but inherit from MyEditorWindow, then that class can be instantiated via GetWindow just fine and will have the exact same behaviour.</p>
<h2>Extra trick: Including resources in the assembly</h2>
<p>For extra points, you can include resources, such as textures, in your assembly. This has the bonus of limiting the clutter of your distribution even more.</p>
<p>Including the resource in your build is as simple as appending the &#8220;-resource:[path]&#8221; parameter to your gmcs build command. This will add the bytes into the assembly manifest &#8211; under the name of the original file. You can fetch these bytes at runtime, using that name. For example, here&#8217;s some utility methods for fetching textures:</p>
<pre>public static Stream GetResourceStream (string resourceName, Assembly assembly)
{
	if (assembly == null)
	{
		assembly = Assembly.GetExecutingAssembly ();
	}

	return assembly.GetManifestResourceStream (resourceName);
}

public static Stream GetResourceStream (string resourceName)
{
	return GetResourceStream (resourceName, null);
}

public static byte[] GetByteResource (string resourceName, Assembly assembly)
{
	Stream byteStream = GetResourceStream (resourceName, assembly);
	byte[] buffer = new byte[byteStream.Length];
	byteStream.Read (buffer, 0, (int)byteStream.Length);
	byteStream.Close ();

	return buffer;
}

public static byte[] GetByteResource (string resourceName)
{
	return GetByteResource (resourceName, null);
}

public static Texture2D GetTextureResource (string resourceName, Assembly assembly)
{
	Texture2D texture = new Texture2D (4, 4);
	texture.LoadImage (GetByteResource (resourceName, assembly));

	return texture;
}

public static Texture2D GetTextureResource (string resourceName)
{
	return GetTextureResource (resourceName, null);
}</pre>
<p>Given that you added &#8220;-resource:path/to/Logo.png&#8221; to your gmcs build command, you will with the above utility methods be able to fetch that into a texture like so:</p>
<pre>Texture2D logoTexture = GetTextureResource ("Logo.png");</pre>
<p>Well, I hope you guys found some of this useful! I&#8217;ll see if I can&#8217;t do a follow-up on how to do this in MonoDevelop.</p>
<div id="tweetbutton571" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Ftipsandtricks%2Fassembling-and-assimilating%2F&amp;text=Assembling%20and%20assimilating&amp;related=AngryAnt&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Feej.dk%2Fangryant%2Fgeneral%2Ftipsandtricks%2Fassembling-and-assimilating%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://eej.dk/angryant/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://eej.dk/angryant/general/tipsandtricks/assembling-and-assimilating/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

