<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Beats, Code and Entropy</title>
	
	<link>http://www.joshrevilo.com</link>
	<description />
	<lastBuildDate>Wed, 28 Dec 2011 13:47:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BeatsCodeAndEntropy" /><feedburner:info uri="beatscodeandentropy" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Building the iFolder Client on Linux</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/_AqCfi6yFYA/</link>
		<comments>http://www.joshrevilo.com/2011/12/building-the-ifolder-client-on-linux/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 20:51:31 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.joshrevilo.com/?p=258</guid>
		<description><![CDATA[I just submitted Archlinux build scripts for the iFolder client to the Archlinux User Repository (AUR). If you want to build the iFolder Client on Linux by hand, maybe looking at these scripts will give you some hints. Here are the packages: libflaim simias ifolder &#160;]]></description>
			<content:encoded><![CDATA[<p>I just submitted Archlinux build scripts for the iFolder client to the Archlinux User Repository (AUR). If you want to build the iFolder Client on Linux by hand, maybe looking at these scripts will give you some hints. Here are the packages:</p>
<ul>
<li><a href="http://aur.archlinux.org/packages.php?ID=10186">libflaim</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=10183">simias</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=10182">ifolder</a></li>
</ul>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/_AqCfi6yFYA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/12/building-the-ifolder-client-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/12/building-the-ifolder-client-on-linux/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=building-the-ifolder-client-on-linux</feedburner:origLink></item>
		<item>
		<title>Configuring Log4Net in Unity3D – 18 hours in</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/9CwMTrTfrmo/</link>
		<comments>http://www.joshrevilo.com/2011/12/configuring-log4net-in-unity3d-18-hours-in/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 01:49:17 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[log4net config file]]></category>
		<category><![CDATA[TPTHNNY]]></category>
		<category><![CDATA[unity3d]]></category>

		<guid isPermaLink="false">http://www.joshrevilo.com/?p=254</guid>
		<description><![CDATA[Yes, I just spent two hours trying to get some output from Log4Net in Unity3D. The main problem was of course in front of the computer but I also blame the log4net online docs for not having a quick start guide that outputs to a file. I had three problems: I didn&#8217;t know what the <a href='http://www.joshrevilo.com/2011/12/configuring-log4net-in-unity3d-18-hours-in/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Yes, I just spent two hours trying to get some output from Log4Net in Unity3D. The main problem was of course in front of the computer but I also blame the log4net online docs for not having a quick start guide that outputs to a file. I had three problems:</p>
<ul>
<li>I didn&#8217;t know what the default working directory of a Unity3D app running in the editor is. (hint: It&#8217;s the root of the project folder) So I was looking all over the place for that log file to appear.</li>
<li>I copy pasted example configuration snippets from here: <a href="http://logging.apache.org/log4net/release/config-examples.html">log4net Config Examples</a>. I didn&#8217;t realize these are not complete config files, but just parts that need to be inserted into a real log4net config.</li>
<li>log4net does not report errors regarding to log4net in any way by default. Of course, I didn&#8217;t know this either, since who reads the complete documentation to a simple logging API right?</li>
</ul>
<div>So the result was that log4net was unhappy with my config file but I didn&#8217;t notice it since it doesn&#8217;t report any errors. Instead, I thought that maybe Unity3D is sandboxing file system access on some level and was chasing around the usual places in the filesystem looking for my newly created log file. Not finding it I tweaked the log4net config file and went looking again. Rinse, repeat. Only after I realized that log4net was not reporting internal errors and then changing this behavior I was notified that my config file was ill formatted. From there getting it to finally work was easy.</div>
<div>I also made some progress with the game design.</div>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/9CwMTrTfrmo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/12/configuring-log4net-in-unity3d-18-hours-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/12/configuring-log4net-in-unity3d-18-hours-in/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=configuring-log4net-in-unity3d-18-hours-in</feedburner:origLink></item>
		<item>
		<title>Finally Wide Corridors – 16 hours</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/D15oWFXK8qs/</link>
		<comments>http://www.joshrevilo.com/2011/11/finally-wide-corridors-16-hours/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 20:45:15 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[a star algorithm]]></category>
		<category><![CDATA[conways game of life]]></category>
		<category><![CDATA[corridor tiles]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[door connection]]></category>
		<category><![CDATA[game prototype]]></category>
		<category><![CDATA[indie game]]></category>
		<category><![CDATA[TPTHNNY]]></category>
		<category><![CDATA[unity 3d game]]></category>
		<category><![CDATA[wide corridors]]></category>
		<category><![CDATA[world generator]]></category>

		<guid isPermaLink="false">http://www.joshrevilo.com/?p=247</guid>
		<description><![CDATA[As the title suggests, I finally managed to add wide corridors in the world generator for my Unity 3D game prototype. Instead of spending a huge amount of time in tweaking and debugging the A* star algorithm that creates the corridors, I now just call it multiple times per door to door connection and encourage <a href='http://www.joshrevilo.com/2011/11/finally-wide-corridors-16-hours/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>As the title suggests, I finally managed to add wide corridors in the world generator for my Unity 3D game prototype. Instead of spending a huge amount of time in tweaking and debugging the A* star algorithm that creates the corridors, I now just call it multiple times per door to door connection and encourage it to lay the paths side by side by adjusting the weights in the grid. It leaves some artifacts sometimes but these are easily removed by passing a few times over the tilemap and removing all wall tiles that are surrounded by 3 or more corridor tiles (excluding diagonals). Almost like Conway&#8217;s Game of Life.</p>
<p><a href="http://www.joshrevilo.com/wp-content/uploads/2011/11/screen3.png"><img class="aligncenter size-large wp-image-248" title="Wide Corridors" src="http://www.joshrevilo.com/wp-content/uploads/2011/11/screen3-1024x569.png" alt="" width="695" height="386" /></a></p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/D15oWFXK8qs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/finally-wide-corridors-16-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/finally-wide-corridors-16-hours/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=finally-wide-corridors-16-hours</feedburner:origLink></item>
		<item>
		<title>Map generator update and AI for Unity – 15 hours</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/u0PuuRt4wCQ/</link>
		<comments>http://www.joshrevilo.com/2011/11/map-generator-update-and-ai-for-unity-15-hours/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 19:21:11 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[TPTHNNY]]></category>

		<guid isPermaLink="false">http://joshrevilo.com/?p=221</guid>
		<description><![CDATA[Yesterday I wanted to improve the corridor generation by actually using a path finding algorithm instead of the hard coded mess I had before. While looking for path finding solutions in the asset store, I found a whole bunch of AI solutions &#8211; not exactly what I need right now but they looked interesting so <a href='http://www.joshrevilo.com/2011/11/map-generator-update-and-ai-for-unity-15-hours/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I wanted to improve the corridor generation by actually using a path finding algorithm instead of the hard coded mess I had before. While looking for path finding solutions in the asset store, I found a whole bunch of AI solutions &#8211; not exactly what I need right now but they looked interesting so I spent two hours looking at them. The most interesting seem to be <a href="http://rivaltheory.com/product">Rain{one}</a> and the <a href="http://www.arongranberg.com/unity/a-pathfinding/">A* Pathfinding Project</a>. Both feature path finding and <a href="http://code.google.com/p/recastnavigation/">recast </a>based nav-mesh generation. Rain{one} also comes with environment sensing, behavior trees and integrated animation control while the path finding project seems to be more optimized if you just need path finding. But, as I don&#8217;t have a game concept yet and I don&#8217;t need AI or navigation meshes right now, I ended up using an old-school open source C# <a href="http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c12527__1/A-Star-A-Implementation-in-C-Path-Finding-PathFinder.htm">A* implementation</a> for grids. It is well designed and has many options for tweaking. Having the source to the implementation is a big bonus, too,  since I later want to make corridors that are several tiles wide and no standard A* implementation can generate wide paths.</p>
<p>So, equipped with this new tool I can now connect rooms that are not right next to each other &#8211; the path finder is able to map out corridors between any two points on the map. I forbid the finder to use diagonal movements and I enabled the direction change penalty which makes it prefer generating straight lines instead of zigzag corridors that it generated to substitute for the lack of diagonals. Another set of tweaks was added to the weights in the grid. Basically, I told it to avoid making corridors directly next to a room&#8217;s wall and to prefer to make corridors right next to existing corridors. The last tweak tends to generate some wider corridors in areas where a lot of rooms are next to each other. As long as I can&#8217;t just outright tell it to make corridors with three tiles width, this is the next best thing.</p>
<p>While I was at it, I changed the look of the rooms&#8217; walls and added automatic doors to the room exits.</p>
<p style="text-align: center;"><a href="http://joshrevilo.com/wp-content/uploads/2011/11/screen2.png"><img class="size-large wp-image-223 aligncenter" title="screen" src="http://joshrevilo.com/wp-content/uploads/2011/11/screen2-1024x569.png" alt="" width="695" height="386" /></a><a href="http://joshrevilo.com/wp-content/uploads/2011/11/screen21.png"><img class="size-large wp-image-224 aligncenter" title="screen2" src="http://joshrevilo.com/wp-content/uploads/2011/11/screen21-1024x569.png" alt="" width="695" height="386" /></a></p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/u0PuuRt4wCQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/map-generator-update-and-ai-for-unity-15-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/map-generator-update-and-ai-for-unity-15-hours/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=map-generator-update-and-ai-for-unity-15-hours</feedburner:origLink></item>
		<item>
		<title>Dungeon generation now with multiple Z levels – 11 hours in</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/3jFkYWBJQ64/</link>
		<comments>http://www.joshrevilo.com/2011/11/dungeon-generation-now-with-multiple-z-levels-11-hours-in/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 01:05:20 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[TPTHNNY]]></category>

		<guid isPermaLink="false">http://joshrevilo.com/?p=217</guid>
		<description><![CDATA[No screenshots today. But I restructured the map generation code so that it can cope with multiple z-levels. Right now it just generates the same maze type layout you could see in earlier posts, layered on top of each other. This enables me to generate multistory rooms later. I&#8217;m not sure if I will make <a href='http://www.joshrevilo.com/2011/11/dungeon-generation-now-with-multiple-z-levels-11-hours-in/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>No screenshots today. But I restructured the map generation code so that it can cope with multiple z-levels. Right now it just generates the same maze type layout you could see in earlier posts, layered on top of each other. This enables me to generate multistory rooms later. I&#8217;m not sure if I will make use of multiple z levels in the final game but it&#8217;s cool to have it available for experimenting. In case this game gets a top down Dungeon Keeper style interface, the mouse wheel could be used to move between z-levels. In case it will be first / 3rd person, I will need to add elevators or ramps. I could also just use it to generate background scenery for rooms with transparent floors. The possibilities are endless!</p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/3jFkYWBJQ64" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/dungeon-generation-now-with-multiple-z-levels-11-hours-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/dungeon-generation-now-with-multiple-z-levels-11-hours-in/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dungeon-generation-now-with-multiple-z-levels-11-hours-in</feedburner:origLink></item>
		<item>
		<title>Minimap in Unity3D – 9 hours in</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/1ojZcsSI16g/</link>
		<comments>http://www.joshrevilo.com/2011/11/minimap-in-unity3d-9-hours-in/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 18:16:17 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[TPTHNNY]]></category>

		<guid isPermaLink="false">http://joshrevilo.com/?p=206</guid>
		<description><![CDATA[While running around in 3rd person perspective I got lost and decided to quickly implement a minimap. Can&#8217;t be that hard in Unity3D right? Well, two hours later I finally pulled it off. The hard part wasn&#8217;t to get the map to show, but to draw the location of the player as little red dot <a href='http://www.joshrevilo.com/2011/11/minimap-in-unity3d-9-hours-in/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">While running around in 3rd person perspective I got lost and decided to quickly implement a minimap. Can&#8217;t be that hard in Unity3D right? Well, two hours later I finally pulled it off.</p>
<p style="text-align: left;"><a href="http://joshrevilo.com/wp-content/uploads/2011/11/screen1.png"><img class="size-large wp-image-207 aligncenter" title="Now with minimap" src="http://joshrevilo.com/wp-content/uploads/2011/11/screen1-1024x569.png" alt="" width="695" height="386" /></a>The hard part wasn&#8217;t to get the map to show, but to draw the location of the player as little red dot onto that map<strong> in the correct position. </strong>I looked at various tutorials but I they only either dealt with the aspect of actually rendering the world in the minimap <strong>or </strong>how to draw blips on a radar like screen but without rendering the world. The first aspect required a second camera positioned above the world to actually render the minimap. But the radar only style maps don&#8217;t make use of a second camera, they just blit a few textures into a rectangle somewhere on the screen without using a camera. This sounds similar, and yes, it is similar, but not similar enough to take the code from the wiki and have it work.</p>
<p>The actual problem was to determine where the red dot has to be drawn on the minimap so that it covers the position where the player happens to be. You might think that a function called</p>
<pre>camera.WorldToScreenPoint</pre>
<p>would do the trick, but it doesn&#8217;t seem to take the viewport position and size of the camera into account. That alone took a while to realize. After I found that out I just needed to fiddle with the viewport values of the camera to get the projection correct.</p>
<p>So here&#8217;s the C# code:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">UnityEngine</span><span style="color: #668066;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections</span><span style="color: #668066;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Minimap <span style="color: #668066;">:</span> MonoBehaviour
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> Texture2D BlipTex<span style="color: #668066;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> GameObject Player<span style="color: #668066;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnGUI<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        var objPos <span style="color: #668066;">=</span> camera<span style="color: #668066;">.</span><span style="color: #6666FF;">WorldToViewportPoint</span><span style="color: #008000;">&#40;</span>Player<span style="color: #668066;">.</span><span style="color: #6666FF;">transform</span><span style="color: #668066;">.</span><span style="color: #6666FF;">position</span><span style="color: #008000;">&#41;</span><span style="color: #668066;">;</span>
&nbsp;
        GUI<span style="color: #668066;">.</span><span style="color: #6666FF;">DrawTexture</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> Rect<span style="color: #008000;">&#40;</span>
            Screen<span style="color: #668066;">.</span><span style="color: #6666FF;">width</span> <span style="color: #668066;">*</span> <span style="color: #008000;">&#40;</span>camera<span style="color: #668066;">.</span><span style="color: #6666FF;">rect</span><span style="color: #668066;">.</span><span style="color: #6666FF;">x</span> <span style="color: #668066;">+</span> <span style="color: #008000;">&#40;</span>objPos<span style="color: #668066;">.</span><span style="color: #6666FF;">x</span><span style="color: #668066;">*</span>camera<span style="color: #668066;">.</span><span style="color: #6666FF;">rect</span><span style="color: #668066;">.</span><span style="color: #6666FF;">width</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #668066;">-</span> <span style="color: #FF0000;">2</span>,
            Screen<span style="color: #668066;">.</span><span style="color: #6666FF;">height</span> <span style="color: #668066;">*</span> <span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #668066;">-</span><span style="color: #008000;">&#40;</span>camera<span style="color: #668066;">.</span><span style="color: #6666FF;">rect</span><span style="color: #668066;">.</span><span style="color: #6666FF;">y</span> <span style="color: #668066;">+</span> <span style="color: #008000;">&#40;</span>objPos<span style="color: #668066;">.</span><span style="color: #6666FF;">y</span><span style="color: #668066;">*</span>camera<span style="color: #668066;">.</span><span style="color: #6666FF;">rect</span><span style="color: #668066;">.</span><span style="color: #6666FF;">height</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #668066;">-</span> <span style="color: #FF0000;">2</span>,
            <span style="color: #FF0000;">4</span>, <span style="color: #FF0000;">4</span><span style="color: #008000;">&#41;</span>, BlipTex<span style="color: #008000;">&#41;</span><span style="color: #668066;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Make a second camera, attach the script to it. Set the camera depth to &gt;0, projection to orthographic. Set the x-axis rotation of the camera to 90 degrees and position it above your world. Drag a texture into the BlipTex field and it should work.</p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/1ojZcsSI16g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/minimap-in-unity3d-9-hours-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/minimap-in-unity3d-9-hours-in/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=minimap-in-unity3d-9-hours-in</feedburner:origLink></item>
		<item>
		<title>Corridors are now built properly – 7 hours in</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/cYNBRTGgvvc/</link>
		<comments>http://www.joshrevilo.com/2011/11/corridors-are-now-built-properly-7-hours-in/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 01:53:06 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[TPTHNNY]]></category>

		<guid isPermaLink="false">http://sharky-x.com/?p=185</guid>
		<description><![CDATA[Also, the rooms look a lot more random now due to a change in the placing code. Eventually I also want to have it generate non rectangular rooms. Next up is making sure that all rooms are interconnected so that they are all reachable.]]></description>
			<content:encoded><![CDATA[<p>Also, the rooms look a lot more random now due to a change in the placing code. Eventually I also want to have it generate non rectangular rooms. Next up is making sure that all rooms are interconnected so that they are all reachable.</p>
<p style="text-align: center;"><a href="http://sharky-x.com/wp-content/uploads/2011/11/screen.png"><img class="size-large wp-image-186 aligncenter" title="Corridors!" src="http://sharky-x.com/wp-content/uploads/2011/11/screen-1024x569.png" alt="Corridors!" width="695" height="386" /></a></p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/cYNBRTGgvvc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/corridors-are-now-built-properly-7-hours-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/corridors-are-now-built-properly-7-hours-in/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=corridors-are-now-built-properly-7-hours-in</feedburner:origLink></item>
		<item>
		<title>Started working on a game prototype – 6 hours in.</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/3BM9XCtxj8A/</link>
		<comments>http://www.joshrevilo.com/2011/11/started-working-on-a-game-prototype-6-hours-in/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 03:40:59 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[TPTHNNY]]></category>

		<guid isPermaLink="false">http://sharky-x.de/?p=123</guid>
		<description><![CDATA[Finally, after a very, very long time, I&#8217;m back into game development. I started working on a game prototype in Unity a few weeks ago and just finished my 3rd session on it. Yeah I know, this game is not going anywhere with a development pace like this, however, this is what I got so far: <a href='http://www.joshrevilo.com/2011/11/started-working-on-a-game-prototype-6-hours-in/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Finally, after a very, very long time, I&#8217;m back into game development. I started working on a game prototype in Unity a few weeks ago and just finished my 3rd session on it. Yeah I know, this game is not going anywhere with a development pace like this, however, this is what I got so far:</p>
<p style="text-align: center;"><img class="size-large wp-image-124 aligncenter" title="Screenshot" src="http://sharky-x.de/wp-content/uploads/2011/11/shot1-1024x569.png" alt="" width="695" height="386" /></p>
<p>So what do you see here? It&#8217;s a tilemap. With rooms and (still broken) corridors that connect the rooms. The map is generated procedurally. Ignore the graphics and the textures. These are all placeholders while I&#8217;m working on the map generator.</p>
<p>What kind of game is it you ask? I have no idea. I have no firm concept, just a list of urges I want to satisfy. I&#8217;m not sure how many others are working this way and if anyone managed to finish a (good) game with a methodology like this, but this is what I am doing now.  I have this desire to combine elements from Nethack, Dungeon Keeper, Dwarf Fortress, The Settlers and Majesty with an Old School Arcade feeling. This list is not exhaustive and might change when I play something else that rocks my world, even if it&#8217;s only momentarily. So, I want to make a simulation where stuff is produced and minions are roaming around doing stuff to the stuff. Fights will be had. You have to manage resources, explore, design a base. Maybe. I like games where things happen without the player doing anything. I don&#8217;t know yet if this will be a 1st person, 3rd person, RTS, Tower Defense or Tycoon game. I don&#8217;t know if it will be multiplayer. I don&#8217;t know if a game session will take 10 minutes, 10 hours or 10 weeks. What I do know is that there is no game out there that feels like what I have in mind. So there, now that you know <em>exactly </em>where I&#8217;m going with this, let&#8217;s talk tech.</p>
<p>I initially wanted to make this a Flashgame with Flixl or FlashPunk, both very awesome frameworks for developing tile-based games. I evaluated both and liked what I saw. Then I looked at Unity and was immediately hooked.  Multiplatform, Rapid Application Development, C# scripting (yes!), a large development community, the asset store. Wow. The time it takes to get something to screen is really short, so this is the perfect framework for prototyping, even though it&#8217;s my first project using Unity. I&#8217;m learning a lot of basics as I go and I think I&#8217;m about 6 hours in now. Feats accomplished so far:</p>
<ul>
<li>Generate non-overlapping rooms in 2D space (brute force randomize new room until it doesn&#8217;t overlap), tends to get very slow. I should really just use some randomized, recursive partitioning instead.</li>
<li>Detect neighboring rooms and and build a connection graph.</li>
<li>Fail to generate corridors according to said connection graph.</li>
<li>Convert the generated 2D tile map into a 3D mesh.</li>
<li>Add a player character from the Angry Bots Unity demo project and control it with both an overhead shooter control scheme and a Dead Space like over the shoulder camera (not at the same time).</li>
</ul>
<p>This project has no name, yet and thus will be known as the project that has no name, yet or TPTHNNY for short which paradoxically gives it a name.</p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/3BM9XCtxj8A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/11/started-working-on-a-game-prototype-6-hours-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/11/started-working-on-a-game-prototype-6-hours-in/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=started-working-on-a-game-prototype-6-hours-in</feedburner:origLink></item>
		<item>
		<title>Getting iFolder / Simias to run</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/9mdJipc6TVg/</link>
		<comments>http://www.joshrevilo.com/2011/08/getting-ifolder-simias-to-run/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 01:51:00 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ifolder]]></category>

		<guid isPermaLink="false">http://sharky-x.de/wp/?p=88</guid>
		<description><![CDATA[Update: Here&#8217;s a related post. If you are trying to install iFolder Server 3.8.0.3 on Ubuntu or Fedora, you might run into problems. I followed this manual: http://www.chimos.de/stuff/ifolder-ubuntu.txt Everything went fine, until I wanted to login into the admin interface. I just couldn&#8217;t get logged in. The apache server log said: Error: Exception Object reference <a href='http://www.joshrevilo.com/2011/08/getting-ifolder-simias-to-run/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><em>Update: <a title="Building the iFolder Client on Linux" href="http://www.joshrevilo.com/2011/12/building-the-ifolder-client-on-linux/">Here&#8217;s a related post</a>.</em></p>
<p>If you are trying to install iFolder Server 3.8.0.3 on Ubuntu or Fedora, you might run into problems.</p>
<p>I followed this manual:</p>
<p>http://www.chimos.de/stuff/ifolder-ubuntu.txt</p>
<p>Everything went fine, until I wanted to login into the admin interface. I just couldn&#8217;t get logged in. The apache server log said:</p>
<p>Error: Exception Object reference not set to an instance of an object. Could not initialize collection store.</p>
<p>Over and over again.</p>
<p>In /var/simias/data/simias is a file called Simias.log4net. This controls the logging output. I opened it and changed the two lines containing INFO to say DEBUG instead and lo and behold. I got proper error messages after that in /var/simias/data/simias/log.</p>
<p>As it turns out, Simias tries to store something to /var/www/.config and hadn&#8217;t any permission to do so. The manual I mentioned at the beginning of this article actually contains the fix, but I skipped this step due to a typo. The manual says:<br />
If /root/.config/mono exists again (just to be sure), perform the following operation:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>mono
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>mono <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>mono
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data.www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config</pre></div></div>

<p>Well, it didn&#8217;t exist. But /root/.config/.mono existed. So I skipped this step. But after seeing the error in the log and executing</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>.mono
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>.mono <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>.config</pre></div></div>

<p>and restarting apache, it finally worked.</p>
<p>Yay!</p>
<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/9mdJipc6TVg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/08/getting-ifolder-simias-to-run/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/08/getting-ifolder-simias-to-run/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-ifolder-simias-to-run</feedburner:origLink></item>
		<item>
		<title>Guake Tip: How to make the first line appear at the bottom</title>
		<link>http://feedproxy.google.com/~r/BeatsCodeAndEntropy/~3/tm-uowLyBqs/</link>
		<comments>http://www.joshrevilo.com/2011/04/guake-tip-how-to-make-the-first-line-appear-at-the-bottom/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 16:55:00 +0000</pubDate>
		<dc:creator>sharkyx</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sharky-x.de/wp/?p=86</guid>
		<description><![CDATA[The Gnome Guake console tool is really handy, since you have a command shell ready for typing at the press of a single button (F12 or F1 for example). Yakuake for KDE does the same thing, and it works a little better in one aspect: When you have the console at the top of the <a href='http://www.joshrevilo.com/2011/04/guake-tip-how-to-make-the-first-line-appear-at-the-bottom/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>The Gnome Guake console tool is really handy, since you have a command shell ready for typing at the press of a single button (F12 or F1 for example). Yakuake for KDE does the same thing, and it works a little better in one aspect: When you have the console at the top of the screen, the first line of text appears at the bottom of the console space. In Guake however, the first line of text appears at the very top of the screen.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://3.bp.blogspot.com/-VpKLU7K2kf8/Tah0ym0Z-dI/AAAAAAAAAA0/0cvuN1lHYuQ/s1600/Bildschirmfoto.jpg"><img class="aligncenter" style="border-style: initial; border-color: initial; border-width: 0px;" src="http://3.bp.blogspot.com/-VpKLU7K2kf8/Tah0ym0Z-dI/AAAAAAAAAA0/0cvuN1lHYuQ/s640/Bildschirmfoto.jpg" alt="" width="640" height="400" border="0" /></a></div>
<p>This is not where I am used to look. Even the original Quake console starts printing from the bottom.</p>
<p>So what we want is this:</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://1.bp.blogspot.com/-Q3C3uC33UIA/Tah1bkTGGcI/AAAAAAAAAA4/xLf6IvBNATo/s1600/Bildschirmfoto.jpg"><img src="http://1.bp.blogspot.com/-Q3C3uC33UIA/Tah1bkTGGcI/AAAAAAAAAA4/xLf6IvBNATo/s640/Bildschirmfoto.jpg" alt="" width="640" height="400" border="0" /></a></div>
<p>I didn&#8217;t find any way to configure this inside Guake, so I had to use some other means to achieve my goal: Just print some newlines when a new shell is opened. Of course, we can&#8217;t just echo some newline chars in .bashrc, otherwise everytime we open a shell or login from a tty or via ssh it would get executed, too. So we need a way to determine if the currently opening shell is inside a Guake session.</p>
<p>To achieve this, we take the PID of the current bash shell with <strong>$$</strong>, use <strong>ps</strong> to ask for the parent PID, and then use <strong>ps</strong> again to determine which binary image is executed with this PID. If the direct parent is python, it is likely we are running inside Guake, since it is written in python.</p>
<p>So, long story short &#8211; put this in your <strong>.bashrc:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># check if we are running inside guake</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-o</span> ppid <span style="color: #660033;">-p</span> <span style="color: #007800;">$$</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-n</span> 2p <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> python <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-eq</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;echo -e  '\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>\<span style="color: #000099; font-weight: bold;">\n</span>'&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<img src="http://feeds.feedburner.com/~r/BeatsCodeAndEntropy/~4/tm-uowLyBqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.joshrevilo.com/2011/04/guake-tip-how-to-make-the-first-line-appear-at-the-bottom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.joshrevilo.com/2011/04/guake-tip-how-to-make-the-first-line-appear-at-the-bottom/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=guake-tip-how-to-make-the-first-line-appear-at-the-bottom</feedburner:origLink></item>
	</channel>
</rss>

