<?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>Shedletsky&#039;s Random Bits &#187; .net</title>
	<atom:link href="http://shedletsky.com/blog/tag/net/feed" rel="self" type="application/rss+xml" />
	<link>http://shedletsky.com/blog</link>
	<description>Random Bits are Incompressible</description>
	<lastBuildDate>Mon, 31 Oct 2011 05:39:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Neil Gaiman&#8217;s &#8220;Nicholas Was&#8230;&#8221;</title>
		<link>http://shedletsky.com/blog/neil-gaimans-nicholas-was</link>
		<comments>http://shedletsky.com/blog/neil-gaimans-nicholas-was#comments</comments>
		<pubDate>Wed, 01 Dec 2010 00:16:28 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[gaiman]]></category>
		<category><![CDATA[Natives]]></category>

		<guid isPermaLink="false">http://shedletsky.com/blog/neil-gaimans-nicholas-was</guid>
		<description><![CDATA[Listen to it HERE. Here is the text. Nicholas Was… Older than sin, and his beard could grow no whiter. He wanted to die. The dwarfish natives of the Arctic caverns did not speak his language, but conversed in their own, twittering tongue, conducted incomprehensible rituals, when they were not actually working in the factories. <a href="http://shedletsky.com/blog/neil-gaimans-nicholas-was"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p>Listen to it <a href="http://www.neilgaiman.net/sound/02-nicholas-was.mp3">HERE</a>.</p>
<p>Here is the text.</p>
<blockquote><p>Nicholas Was…</p>
<p>Older than sin, and his beard could grow no whiter. He wanted to die. </p>
<p>The dwarfish natives of the Arctic caverns did not speak his language, but conversed in their own, twittering tongue, conducted incomprehensible rituals, when they were not actually working in the factories.</p>
<p>Once very year they forced him, sobbing &amp; protesting, into Endless Night. During the journey he would stand near every child in the world, leave one of the dwarves’ invisible gifts by its bedside. The children slept, frozen into time. </p>
<p>He envied Prometheus and Loki, Sisyphus and Judas. His punishment was harsher. </p>
<p>Ho. </p>
<p>Ho. </p>
<p>Ho.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/neil-gaimans-nicholas-was/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www.neilgaiman.net/sound/02-nicholas-was.mp3" length="3104932" type="audio/mpeg" />
		</item>
		<item>
		<title>Give me all your ore or die</title>
		<link>http://shedletsky.com/blog/give-me-all-your-ore-or-die</link>
		<comments>http://shedletsky.com/blog/give-me-all-your-ore-or-die#comments</comments>
		<pubDate>Thu, 23 Sep 2010 00:48:13 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[game design]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[board games]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Settlers of Catan]]></category>
		<category><![CDATA[War on Terror]]></category>

		<guid isPermaLink="false">http://shedletsky.com/blog/give-me-all-your-ore-or-die</guid>
		<description><![CDATA[I’ve recently been messing around with Jsettlers2, a java implementation of Settlers of Catan featuring AI players (it also allows network play, but I don’t really see the point in that. Most of the fun of Settlers is in the in-person social interaction). I’ve got the source code and it looks as though it was <a href="http://shedletsky.com/blog/give-me-all-your-ore-or-die"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline" title="catan" alt="catan" src="http://shedletsky.com/blog/wp-content/uploads/2010/09/catan.png" width="830" height="650" /> </p>
<p>I’ve recently been messing around with <a href="https://sourceforge.net/projects/jsettlers2/">Jsettlers2</a>, a java implementation of Settlers of Catan featuring AI players (it also allows network play, but I don’t really see the point in that. Most of the fun of Settlers is in the in-person social interaction).</p>
<p>I’ve got the source code and it looks as though it was designed with the idea of allowing new bot AIs to be plugged in. The existing AI is pretty credible. Anyways, I am curious enough about how it all works to download the whole Java dev stack. I might try to make my own AI.</p>
<p>Most people don’t realize that Settlers is a completely broken game (as are most games that allow free trading between players). Rationally, the player in last place should be holding the player in first place ransom – constantly demanding resource concessions lest he throw the game and give all of his resources to the player in second place. If you are playing with a cut throat crowd, this is the inevitable outcome of the game. In this regard, Settlers is most similar to <a href="http://www.waronterrortheboardgame.com/">War on Terror</a>. It’s either clumsy game design or a brilliant commentary on the human condition. AI players, naturally, play a much more civilized version of Catan.</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/give-me-all-your-ore-or-die/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>I find this stuff incredibly boring.</title>
		<link>http://shedletsky.com/blog/i-find-this-stuff-incredibly-boring</link>
		<comments>http://shedletsky.com/blog/i-find-this-stuff-incredibly-boring#comments</comments>
		<pubDate>Wed, 02 Jun 2010 17:34:44 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://shedletsky.com/blog/i-find-this-stuff-incredibly-boring</guid>
		<description><![CDATA[Stolen from What’s Wrong With Turkey Most languages have this covered; there are functions that allow you to read or write dates and numbers appropriately for various cultures. In .NET, for example, it&#8217;s the difference between these two calls: int.Parse(&#34;32.768&#34;); int.Parse(&#34;32,768&#34;, System.Globalization.NumberFormatInfo.InvariantInfo); The &#34;invariant&#34; culture is every American programmer&#8217;s secret dream realized: we merely close <a href="http://shedletsky.com/blog/i-find-this-stuff-incredibly-boring"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p>Stolen from <a href="http://www.codinghorror.com/blog/2008/03/whats-wrong-with-turkey.html">What’s Wrong With Turkey</a></p>
<p>Most languages have this covered; there are functions that allow you to read or write dates and numbers appropriately for various cultures. In .NET, for example, it&#8217;s the difference between these two calls: </p>
<pre>int.Parse(&quot;32.768&quot;);
int.Parse(&quot;32,768&quot;, System.Globalization.NumberFormatInfo.InvariantInfo);</pre>
<p>The &quot;invariant&quot; culture is every American programmer&#8217;s secret dream realized: we merely close our eyes and wish away all those confusing languages and cultures and their crazy, bug-inducing date and number formatting schemes in favor of our own. A nice enough dream while it lasts, but instead of rudely asking your users to &quot;speak American&quot; through the invariant culture, <b>you could politely ask them to enter data in ISO international standard format instead.</b></p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/i-find-this-stuff-incredibly-boring/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Convolution Colonel</title>
		<link>http://shedletsky.com/blog/convolution-colonel</link>
		<comments>http://shedletsky.com/blog/convolution-colonel#comments</comments>
		<pubDate>Tue, 02 Jan 2007 14:53:47 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Maze]]></category>
		<category><![CDATA[witherwyn]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=6</guid>
		<description><![CDATA[After wrestling with it for the past week, I&#8217;ve finally got a mostly functional random dungeon generator for my roguelike game Witherwyn. I hit several serious set backs (such as my algorithm predictably terminating only at infinity). The upside, is that the new algorithm produces topologically more interesting mazes than its rather naive predecessor. Most <a href="http://shedletsky.com/blog/convolution-colonel"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID400"></a>
<p><font size="+2">A</font>fter wrestling with it for the past week, I&#8217;ve finally got a mostly functional random dungeon generator for my roguelike game Witherwyn. I hit several serious set backs (such as my algorithm predictably terminating only at infinity). The upside, is that the new algorithm produces topologically more interesting mazes than its rather naive predecessor.</p>
<p>Most roguelike map generators are diggers. This means that they work by initially filling up the entire map with walls and then they cut out rooms and corridors. Working this way guarantees that every cell in the dungeon is reachable from any other cell (a very desirable trait in any level for any game). <a href="../coding/index.html#WinappDungen">My previous attempt at a random dungeon generator</a> was made in 2001 and was intended to run on a TI-89 (which it did). I was using it in Witherwyn for a while. It worked by hollowing out a large room in the middle of the map, then it entered into a loop:</p>
<p>1. Find a wall that was exposed only on one face<br />2. Decide to try to put a room or corridor here<br />3. See if this feature will fit<br />4. If so, add it, other go to step 1.</p>
<p>After several hundred iterations, you would get a nice-looking map. However, all the maps it produced had a starfish topology &#8211; i.e. all paths between distant cells in the map went through the center.</p>
<p>For version two, I am using the much more complicated scheme outlined <a href="http://www.aarg.net/~minam/dungeon_design.html">here</a>. Basically the steps are:</p>
<p>1. Generate a dense perfect maze (no cycles, all points reachable) using Hunt and Kill (or Prim&#8217;s, or similar algorithm)<br />2. Sparsify the maze by iteratively filling in dead ends<br />3. Remove x% of the dead ends in the maze by intentionally adding cycles<br />4. Place rooms in smart places</p>
<p>I am still working on the room-placing step. It involves a double convolution &#8211; when I try to add a room to the map &#8211; I try to place it in all possible positions and then score those positions based on whether they would cause the room to intersect another room, or an existing corridor. The whole thing is a gigantic mess of nested for loops (6 of them, I think). It would never run on the 12 Mhz TI-89. Having gotten the damn thing to work, I&#8217;m declaring myself the Convolution Colonel.</p>
<p><img src="pics/mazegen.png"></p>
<p>Now all I have to figure out is the best way to add doors&#8230;</p>
<p><img> Witherwyn Google Count: 94</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/convolution-colonel/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Buglist Haiku</title>
		<link>http://shedletsky.com/blog/buglist-haiku</link>
		<comments>http://shedletsky.com/blog/buglist-haiku#comments</comments>
		<pubDate>Thu, 10 Aug 2006 07:31:53 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gamedev]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=28</guid>
		<description><![CDATA[At most code shops, reports for known bugs are filed and kept in massive databases. At my job, known bugs are are scribbled on little cards and described using Haiku. I thought I would share my top 3. I Spatial hash is fullfalling for eternityperformance not good II Damn profanity!Battlemaster&#8217;s mom complained.TODO: smite cuss words. <a href="http://shedletsky.com/blog/buglist-haiku"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID375"></a>
<p>At most code shops, reports for known bugs are filed and kept in massive databases.</p>
<p>At my job, known bugs are are scribbled on little cards and described using Haiku.</p>
<p>I thought I would share my top 3.</p>
<p>I</p>
<p><i>Spatial hash is full<br />falling for eternity<br />performance not good</i></p>
<p>II</p>
<p><i>Damn profanity!<br />Battlemaster&#8217;s mom complained.<br />TODO: smite cuss words.</i></p>
<p>III</p>
<p><i>Oh! Please, server, please<br />Replicate and distribute<br />my ValueInstance!</i></p>
<p>Some of my favorites from gamedev.net:</p>
<p><i>Divide by zero<br />So many messy long ints<br />Why does God hate me</i></p>
<p><i>Windows NT crashed.<br />I am the Blue Screen of Death.<br />No one hears your screams.</i></p>
<p><i>I have no log class<br />Many things behave strangely<br />For reasons unknown</i></p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/buglist-haiku/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>0xDECAFBAD: The Making of Euclidean Crisis</title>
		<link>http://shedletsky.com/blog/0xdecafbad-the-making-of-euclidean-crisis</link>
		<comments>http://shedletsky.com/blog/0xdecafbad-the-making-of-euclidean-crisis#comments</comments>
		<pubDate>Tue, 27 Jun 2006 04:28:22 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=38</guid>
		<description><![CDATA[For those who have not heard of Euclidean Crisis&#8230; Euclidean Crisis is a realtime strategy game for the TabletPC. Uniquely, it is designed to be played using solely the tablet stylus and voice command. Euclidean Crisis casts players strategic commanders of a battalion of spacefighters. The goal of the game is the ultimate destruction of <a href="http://shedletsky.com/blog/0xdecafbad-the-making-of-euclidean-crisis"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID363"></a>
<p><img src="pics/crisis0.jpg"></p>
<p><font size="+2">F</font>or those who have not heard of Euclidean Crisis&#8230;</p>
<p>Euclidean Crisis is a realtime strategy game for the TabletPC. Uniquely, it is designed to be played using solely the tablet stylus and voice command. Euclidean Crisis casts players strategic commanders of a battalion of spacefighters. The goal of the game is the ultimate destruction of the oppositions&#8217; energy Cores. Euclidean Crisis consists of more than 50,000 lines of code and was completed in ten weeks. Euclidean Crisis demonstrates how quickly you can put together a cool game using C#. With the fancy new VS IDE, a lot of the code basically wrote itself.</p>
<p>Doug, Daniel, Travis and I wrote Euclidean Crisis for CS194, the senior project class for CS majors. The class was a toolshed of groups doing web 2.0 social networking modules with AJAX on rails on struts blah blah blah (there were a couple of other cool projects &#8211; shout out to Albert&#8217;s Bot MMO, in particular). We took in quite a haul with our game. Out of nine awards in the offing at the Faire, we won 1st place for five of them, netting us a brand new XBox 360 from Microsoft, along with other loot.</p>
<p>I&#8217;m currently working on packaging up Euclidean Crisis into a downloadable package &#8211; it should appear someplace on my website in the next week or two. Creating an install project for this code is difficult because it has a lot of dependencies: .Net 2.0, Managed DirectX, Microsoft Speech API, Tablet Ink API, and some other things. </p>
<p><img src="pics/crisis1.jpg"></p>
<p>Doug shouting at our game. &#8220;Shut up!&#8221; *Nooo. Yoo. Shutt. Dupp.*</p>
<p><img src="pics/crisis2.jpg"></p>
<p>For the Software Faire, we had head-to-head games running on an adjacent pair of super-large TabletPC-like devices. Webster, the company that makes the devices may not actually have any engineers. Given how flaky the input system is, it would not surprise me. Here&#8217;s a hint dudes &#8211; use different radio channels for different pens.</p>
<p><img src="pics/crisis3.jpg"></p>
<p>This n00b is about to get pwned.</p>
<p><img src="pics/crisis4.jpg"></p>
<p>h3nry, victoriouos~ haX0r The palnnet !!!!!!!!!!!!!!!!!!!!!!!!!11~~~ AHCK Y0UUUUUuU</p>
<p>Henry beat both Doug and I in succession, on his first attempt ever to play our game. This basically makes him the best Euclidean Crisis player on the planet.</p>
<p><img src="pics/crisis5.jpg"></p>
<p>A screenshot of our game. Gold has surrounded his energy Core with a tesla barrier and is setting a group of fighters on patrol. Cyan&#8217;s pitiful attack is deflected. I&#8217;m working on teaching the computer player to hold back units until it has an sizeable attack force.</p>
<p><img src="pics/crisis6.jpg"></p>
<p>What dangers lurk in the nebula?</p>
<p><img src="pics/adamaeyes.jpg"></p>
<p><img src="pics/ecicon.png">  <b>Euclidean Crisis</b> Google count: 2</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/0xdecafbad-the-making-of-euclidean-crisis/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DirectPain</title>
		<link>http://shedletsky.com/blog/directpain</link>
		<comments>http://shedletsky.com/blog/directpain#comments</comments>
		<pubDate>Fri, 31 Mar 2006 06:48:43 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=58</guid>
		<description><![CDATA[[rant] This is making me very sad. Why was DirectDraw deprecated? Here&#8217;s the situation. I&#8217;m making a tile based game in C# using MDX and Direct3D. I&#8217;m trying to achieve real time framerates and having a dismal time at it. I have done some benchmarking with a PerformanceTimer and I&#8217;ve determined my problem is that <a href="http://shedletsky.com/blog/directpain"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID339"></a>
<p>[rant]</p>
<p>This is making me very sad. Why was DirectDraw deprecated?</p>
<p>Here&#8217;s the situation. I&#8217;m making a tile based game in C# using MDX and Direct3D. I&#8217;m trying to achieve real time framerates and having a dismal time at it.</p>
<p><img src="pics/stupid.png"></p>
<p>I have done some benchmarking with a PerformanceTimer and I&#8217;ve determined my problem is that I am calling DrawPrimative once for every visible tile. That is, to draw the map, I transform the world coordinates, call DP on a square vertex buffer, then move to the next tile. Typically I have about 1000 tiles on the screen at once. So this didn&#8217;t seem like it would be a problem, even if this is not the way to draw a 3D scene.</p>
<p>To draw the whole 100&#215;100 map this way, without textures, gives 1.5 FPS. I did an experiment and made a single vertex buffer to render the whole map with one DP call (still passing in 60,000 vertices) and my FPS jumped to 40-80 (variance probably due to the presentation params and the vblank).</p>
<p>I now have 3 options, that I can tell, all of them unappealing.</p>
<p>1. Trying using the MDX Sprite class. I hear different things about it&#8217;s performance from different people.</p>
<p>2. Put all my textures into one big texture, put my whole map in one big vertex buffer, set all the texture coords of the individual tiles right, and blast the whole mess to the GPU with one DP call. This is not ideal since it makes updating the tilemap complicated. Especially for layers above the ground layer (critters, items, ect) that are sparse and would need constant updating. Also I would need to batch my textures if they don&#8217;t fit on a single large texture in video mem.</p>
<p>3. Use DirectDraw, even though it is deprecated. Or use OpenGL, which doesn&#8217;t have this problem of the DP-equivalent call costing so much. OpenGL is not natively supported by C#, so I&#8217;d rather not. There&#8217;s also stuff like SDL.Net &#8212; but it doesn&#8217;t seem I should need a 3rd party lib to draw a tilemap. I mean, come on.</p>
<p>So&#8230; What should I do?</p>
<p>Discontinuing DirectDraw was so short-sighted. D3D really isn&#8217;t a substitute. Why is the latency of DP so high? Modern GPUs had GBs of bandwidth, and I&#8217;m not close to using all mine.</p>
<p>[/rant]</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/directpain/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking of Google&#8230;</title>
		<link>http://shedletsky.com/blog/speaking-of-google</link>
		<comments>http://shedletsky.com/blog/speaking-of-google#comments</comments>
		<pubDate>Wed, 15 Feb 2006 13:49:52 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=87</guid>
		<description><![CDATA[Also, someone at Robots.net posted about my auction. Cool!]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID308"></a>
<p><img src="pics/googlerobot.gif"></p>
<p>Also, someone at <a href="http://robots.net/article/1813.html">Robots.net</a> posted about my auction. Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/speaking-of-google/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All the doors I closed one time will open up again</title>
		<link>http://shedletsky.com/blog/all-the-doors-i-closed-one-time-will-open-up-again</link>
		<comments>http://shedletsky.com/blog/all-the-doors-i-closed-one-time-will-open-up-again#comments</comments>
		<pubDate>Fri, 09 Sep 2005 11:38:26 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[Bitmaps]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Color Cursors]]></category>
		<category><![CDATA[Context Menu]]></category>
		<category><![CDATA[Couple Of Days]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Gui]]></category>
		<category><![CDATA[Open Doors]]></category>
		<category><![CDATA[Open Source Components]]></category>
		<category><![CDATA[Voodoo]]></category>
		<category><![CDATA[witherwyn]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=204</guid>
		<description><![CDATA[Doors! Over the past couple of days I have added doors to Witherwyn. They can be opened, closed, and smashed in by right-clicking on them and using the handy context menu that pops up. Getting the bitmaps on the context menu requires a bit of voodoo &#8211; luckily someone on TheCodeProject already did that work. <a href="http://shedletsky.com/blog/all-the-doors-i-closed-one-time-will-open-up-again"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID183"></a></p>
<p><img src="pics/witherwyncontext.png" alt="" /><br />
Doors!</p>
<p><span style="font-size: x-small;">O</span>ver the past couple of days I have added doors to Witherwyn. They can be opened, closed, and smashed in by right-clicking on them and using the handy context menu that pops up. Getting the bitmaps on the context menu requires a bit of voodoo &#8211; luckily <a href="http://thecodeproject.com/cs/menu/MenuExtender.asp">someone on TheCodeProject</a> already did that work. I just imported his code into my project and it magically worked. C# is the first language I&#8217;ve ever used that makes grabbing other open source components and incorporating them into a project easy. I also figured out how to embed fonts in a .Net assembly and load them at runtime, so soon Witherwyn&#8217;s GUI will use a more appropriately medieval font. Finally, I used some interop voodoo to allow Witherwyn to use animated color cursors.</p>
<p><img alt="" /> Witherwyn Google Count: about 37</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/all-the-doors-i-closed-one-time-will-open-up-again/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Witherwyn has Version Numbers&#8230;</title>
		<link>http://shedletsky.com/blog/witherwyn-has-version-numbers</link>
		<comments>http://shedletsky.com/blog/witherwyn-has-version-numbers#comments</comments>
		<pubDate>Tue, 06 Sep 2005 10:11:26 +0000</pubDate>
		<dc:creator>shedletsky</dc:creator>
				<category><![CDATA[Oldblog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[Context Menu]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[witherwyn]]></category>

		<guid isPermaLink="false">http://shedletsky.com/jjshed/blog/?p=209</guid>
		<description><![CDATA[Witherwyn: Now with Shiny Things! v. 0.02 demonstrates: Simple melee combat, with Player vs. Monster and Monster vs. Monster Rudimentary inventory support More object-oriented map structure Reworked tile and entity management system Roguelikes are apparently notorious for the number of rewrites their code bases require before one can complete a finished game. I did my <a href="http://shedletsky.com/blog/witherwyn-has-version-numbers"><b>...More</b></a>]]></description>
			<content:encoded><![CDATA[<p><a name="BlogID176"></a>
<p><img src="pics/witherwyn02.jpg" /><br /><a href="http://www.stanford.edu/~jjshed/witherwyn">Witherwyn: Now with Shiny Things!</a></p>
<p>v. 0.02 demonstrates:</p>
<p>
<li>Simple melee combat, with Player vs. Monster and Monster vs. Monster</li>
<p>
<li>Rudimentary inventory support</li>
<p>
<li>More object-oriented map structure</li>
<p>
<li>Reworked tile and entity management system</li>
</p>
<p>Roguelikes are apparently notorious for the number of rewrites their code bases require before one can complete a finished game. I did my first one this week. I decided that my goal of having user-edittable resources was all well and good, but was complicating the process of managing tiles and managing entities (the player, items, monsters, ect&#8230;). The key problem is that you can let the user make up new tiles easily, but it&#8217;s difficult to make the random dungeon generator understand where and when to use them. At some level, this information has to be hard-coded. So I bit the bullet and did that with the new GameData class which replaces the TileSet and TileResolver classes.</p>
<p>Inspiried by looking at the <a href="http://ivan.sourceforge.net/">source to IVAN</a> (also known as &#8220;Iter Vehemens ad Necem&#8221;), I decided that I would be better off if I changed the MapElem struct into a full-fledged object. I did this and moved some of the map logic into the new MapTile object. Most people on rec.games.roguelike.development said this was an unecessarily wasteful way to go. A lot of respondents were UNIX clerics and think that using ten extra kilobytes is a Big Deal. I saw no difference in Witherwyn&#8217;s memory footprint after the change.</p>
<p>I got some simple melee combat working. The game crashes if you died, though, so try to avoid it. To attack a boogaboo, just run into it. In the future I&#8217;m going to add floating number animations above the target of an attack which shows how much damage was taken (like the Blademaster doing a criticial strike in Warcraft III). In the near future, you will be able to equip weapons and armor.</p>
<p>I subclassed Entity into Critter and Item objects. Critters re any Entity that has an inventory (the player and monsters). Items are anything that can be picked up. Inventories hold items. Pressing ALT-I or clicking on the &#8220;inventory&#8221; menu item will open the inventory window. Eventually the items shown there will have context menus for manipulating them. I&#8217;m going to augment the inventory screen with an equipment list so that you can drag and drop items onto your character to equip them.</p>
<p><img> Witherwyn Google Count: about 30</p>
]]></content:encoded>
			<wfw:commentRss>http://shedletsky.com/blog/witherwyn-has-version-numbers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

