<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9191282505396518907</id><updated>2011-11-21T07:27:19.616-08:00</updated><category term='Skill Tree'/><category term='i18n'/><category term='iteration9'/><category term='7DOMC'/><category term='helloworld'/><category term='roguelike'/><category term='Emergent Behavior'/><category term='libtcod'/><category term='Crossplatform'/><category term='silverlight'/><category term='iteration10'/><category term='magecrawl-arena'/><category term='programming'/><category term='economy'/><category term='swig'/><category term='Map Generator'/><category term='Monster AI'/><category term='offtopic'/><category term='Magecrawl'/><category term='iteration8'/><category term='libtcod-net'/><category term='c#'/><category term='cmake'/><category term='opengl'/><category term='python'/><category term='status update'/><category term='licensing'/><category term='mac'/><category term='optimization'/><category term='release'/><category term='architecture'/><category term='Balancing'/><category term='review'/><category term='status effects'/><title type='text'>If Error Throw New Brick</title><subtitle type='html'>A simple blog on programming and the quest for the perfect roguelike.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default?start-index=101&amp;max-results=100'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>134</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8478801371933087799</id><published>2011-11-20T21:38:00.000-08:00</published><updated>2011-11-21T07:27:19.675-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Finished, but just barely...</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here's the proof:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QSEPDZ4OCS4/TsnjtW2PguI/AAAAAAAAAWc/-KsF2Ez2NzE/s1600/Magecrawl.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://2.bp.blogspot.com/-QSEPDZ4OCS4/TsnjtW2PguI/AAAAAAAAAWc/-KsF2Ez2NzE/s400/Magecrawl.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;http://dl.dropbox.com/u/8791050/Magecrawl%20-%20Arena%20.1.zip&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;This version has the correct SDL libraries bundled so you don't need the SDL dev libraries installed.&lt;br /&gt;&lt;br /&gt;http://dl.dropbox.com/u/8791050/Magecrawl%20-%20Arena%20.11.zip &lt;br /&gt;&lt;br /&gt;Tomorrow I'll have a legitimate posting with instructions and the like. I just wanted to get something up tonight.&lt;br /&gt;&lt;br /&gt;You'll need the .NET 4 runtime or the equivalent mono. You probably need the SDL development libraries installed as well. I'll try to clean things up tomorrow and shove out a better release.&lt;br /&gt;&lt;br /&gt;Go go 4DRL. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8478801371933087799?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8478801371933087799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8478801371933087799' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8478801371933087799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8478801371933087799'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/11/finished-but-just-barely.html' title='Finished, but just barely...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-QSEPDZ4OCS4/TsnjtW2PguI/AAAAAAAAAWc/-KsF2Ez2NzE/s72-c/Magecrawl.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-571784302661855888</id><published>2011-11-19T20:13:00.000-08:00</published><updated>2011-11-19T20:13:33.712-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Hello...is this thing on...</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I just received a comment wondering what the status of anything I've been working on, since I haven't posted in forever. This was ironic, since I was thinking about making a post tomorrow anyway.&lt;br /&gt;&lt;br /&gt;The wife was out of town for a business conferences, so I decided to see what I could hack out in two after-work timeslots and Saturday/Sunday.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-13yiTeXgoro/Tsh8niGR9VI/AAAAAAAAAWU/ErP-TTQ2Qts/s1600/Magecrawl.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://2.bp.blogspot.com/-13yiTeXgoro/Tsh8niGR9VI/AAAAAAAAAWU/ErP-TTQ2Qts/s320/Magecrawl.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You might notice the stubbed out "action bar" at the bottom, but I have a lot working. I've "stolen" chunks of code from previous "iterations" of the game, but the "core" is all new.&lt;br /&gt;&lt;br /&gt;It's written in C# and using &lt;a href="http://cs-sdl.sourceforge.net/"&gt;SDL C#&lt;/a&gt;. My goal was to get something playable by end of the day tomorrow, so I've kept many things simple (but functional). &lt;br /&gt;&lt;br /&gt;Things working so far:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Turn based movement with a "party" of player characters and various enemy monsters&lt;/li&gt;&lt;li&gt;Line of Sight and Pathfinding&lt;/li&gt;&lt;li&gt;"Animations" done in a way that for once makes me not want to cry&lt;/li&gt;&lt;li&gt;AI decision making is done off the UI thread to keep the game responsive.&lt;/li&gt;&lt;/ul&gt;Things to finish by tomorrow "hopefully"&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt; Melee/Ranged combat with animations and targetting&lt;/li&gt;&lt;li&gt;"Skills" of some basic type&lt;/li&gt;&lt;li&gt;Multiple different monster types&lt;/li&gt;&lt;li&gt;Different "rounds" in the arena&lt;/li&gt;&lt;/ul&gt;Wish me luck on my 4DRL. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-571784302661855888?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/571784302661855888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=571784302661855888' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/571784302661855888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/571784302661855888'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/11/hellois-this-thing-on.html' title='Hello...is this thing on...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-13yiTeXgoro/Tsh8niGR9VI/AAAAAAAAAWU/ErP-TTQ2Qts/s72-c/Magecrawl.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1250939088705187274</id><published>2011-04-23T10:59:00.000-07:00</published><updated>2011-04-23T11:00:25.238-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='magecrawl-arena'/><category scheme='http://www.blogger.com/atom/ns#' term='status update'/><title type='text'>Magecrawl-Arena status update</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I'm going to try to try to create something like &lt;span id="goog_626612688"&gt;&lt;/span&gt;&lt;span id="goog_626612689"&gt;&lt;/span&gt;&lt;a href="http://doryen.eptalys.net/arena/"&gt;Doryen Arena&lt;/a&gt; using python, seeing how things go. I figured I'd post a status update:&lt;br /&gt;&lt;br /&gt;Project started 8 days ago, with about an hour of coding a day roughly. I'm through stage 5 of &lt;a href="http://roguebasin.roguelikedevelopment.org/index.php?title=How_to_Write_a_Roguelike_in_15_Steps"&gt;this&lt;/a&gt;, which includes:&lt;br /&gt;&lt;br /&gt;GUI - Using public domain graphical tiles from &lt;a href="http://crawl.develz.org/wordpress/"&gt;Crawl Stone Soup&lt;/a&gt;, found &lt;a href="http://code.google.com/p/crawl-tiles/"&gt;here&lt;/a&gt;, I have a scrollable map with variable tiles (not every dirt tile is the same), that persist.&lt;br /&gt;Physics - I have a simple physics engine that includes walls (that one can't walk through), and doors one can open.&lt;br /&gt;Keybinding - Arbitrary key mapping (mouse support to come!)&lt;br /&gt;Serialization - Save/Load support.&lt;br /&gt;&lt;br /&gt;Compared to Magecrawl itself, it seems somewhat pathetic a feature list. However, I'm enjoying poking around in python between games of &lt;a href="http://en.wikipedia.org/wiki/Portal_2"&gt;Portal 2&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Rift_%28video_game%29"&gt;Rift&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Source can be found &lt;a href="http://code.google.com/p/magecrawl-arena/"&gt;here&lt;/a&gt; if you are curious. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1250939088705187274?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1250939088705187274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1250939088705187274' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1250939088705187274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1250939088705187274'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/04/magecrawl-arena-status-update.html' title='Magecrawl-Arena status update'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1360623400189387770</id><published>2011-04-23T10:49:00.000-07:00</published><updated>2011-04-23T10:49:36.517-07:00</updated><title type='text'>Clever Python Hacks Part II - Serialization</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Serialization is Magecrawl is pretty good, however it is somewhat verbose. I write out a giant XML tree with all of the attributes of everything, and parse that in on load. It is about 200 lines of core code, along with about 100 for the map and about another 100 for the player.&lt;br /&gt;&lt;br /&gt;Here's what my serialization code looks like in python so far:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SaveVersion = 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def __save(self):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with open(self.player.name + ".sav", 'wb') as file:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pickle.dump((self.SaveVersion, self.player, self.level), file)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def __load(self, filename):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with open(filename, 'rb') as file:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileSaveVersion, player, level = pickle.load(file)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assert fileSaveVersion == self.SaveVersion&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.player = player&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.level = level&lt;br /&gt;&lt;br /&gt;I do loose the XML format in exchange for a binary one, but you have to love that simplicity. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1360623400189387770?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1360623400189387770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1360623400189387770' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1360623400189387770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1360623400189387770'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/04/clever-python-hacks-part-ii.html' title='Clever Python Hacks Part II - Serialization'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6190334615646749263</id><published>2011-04-20T06:19:00.000-07:00</published><updated>2011-04-20T06:19:38.614-07:00</updated><title type='text'>Clever Python Hacks Part I - Keymapping</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Keymapping was complicated stuff in Magecrawl. See &lt;a href="http://www.google.com/codesearch/p?hl=en#SFl1w0_v0F4/Trunk/MageCrawl/DefaultKeystrokeHandler.cs&amp;amp;q=KeyMappings.xml%20package:http://magecrawl%5C.googlecode%5C.com&amp;amp;sa=N&amp;amp;cd=2&amp;amp;ct=rc"&gt;here&lt;/a&gt; for the XML reader(LoadKeyMappings() and HandleKeystroke). It was powerful stuff, using reflection, XML and such. However, I just got 80% of that in a four liner today:&lt;br /&gt;&lt;br /&gt;def load_key_mapping():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; globalDict = {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec(open("KeyMapping").read(), globalDict)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return globalDict["KeyMapping"]&lt;br /&gt;&lt;br /&gt;This function loads the given file as a python script and executes it, then sucks out the KeyMapping dictionary. The KeyMapping script looks like this:&lt;br /&gt;&lt;br /&gt;import pygame&lt;br /&gt;&lt;br /&gt;KeyMapping = \&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pygame.K_UP : 'Up',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pygame.K_DOWN : 'Down',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pygame.K_RIGHT : 'Right',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pygame.K_LEFT : 'Left',&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I get a simple dictionary of button presses to string, and I can switch off those later. The only concern I have is people sharing KeyMapping files and people doing stupid things in them. However, right now I'm now that concerned, as this is stupidly simple and works great. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6190334615646749263?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6190334615646749263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6190334615646749263' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6190334615646749263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6190334615646749263'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/04/clever-python-hacks-part-i-keymapping.html' title='Clever Python Hacks Part I - Keymapping'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5025255258833388863</id><published>2011-04-19T16:47:00.000-07:00</published><updated>2011-04-19T16:51:52.418-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Spinning Up The Time Machine</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;So, I'm still playing with python. Not sure I'm going to write an entire roguelike in it, but figured I'd hack out to the step 4 (walking around a room) on the &lt;a href="http://roguebasin.roguelikedevelopment.org/index.php?title=How_to_Write_a_Roguelike_in_15_Steps"&gt;15 steps to a roguelike&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;I noticed the number of files/lines of code seemed to be much smaller than I remembered, so I pulled up the &lt;a href="http://code.google.com/p/magecrawl/source/detail?r=f97da12fcf99cd538c2c2890255365b50b686a28"&gt;equivalent submission&lt;/a&gt; in magecrawl.&lt;br /&gt;&lt;br /&gt;The python copy looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-FSqxMYrNAog/Ta4dCUH3xUI/AAAAAAAAAU4/fyjKcDiDPM8/s1600/python_walking_around.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="249" src="http://1.bp.blogspot.com/-FSqxMYrNAog/Ta4dCUH3xUI/AAAAAAAAAU4/fyjKcDiDPM8/s320/python_walking_around.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;While the magecrawl looked similar to this (this was from a few weeks later, similar idea though)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/SwmsbRo2SRI/AAAAAAAAANI/M_wHimYnC2M/s1600/Magecrawl.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/SwmsbRo2SRI/AAAAAAAAANI/M_wHimYnC2M/s320/Magecrawl.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here is the comparision (excluding test code). This isn't comparing to the map generator picture above, just the walking around an empty room. &lt;br /&gt;&lt;br /&gt;Python - 3 source files, 127 lines of code. &lt;br /&gt;C# - 13 source files, 503 lines of code.&lt;br /&gt;&lt;br /&gt;Much of that difference comes from the verbosity of C#. Some of it comes from the use of interfaces in C# compared to &lt;a href="http://en.wikipedia.org/wiki/Duck_typing"&gt;duck typing&lt;/a&gt; in python. The rest comes from an effort to implement the minimum needed and keep things simplier.&lt;br /&gt;&lt;br /&gt;As a side note, pygame is pretty awesome. I might pull in &lt;a href="http://doryen.eptalys.net/libtcod/"&gt;libtcod&lt;/a&gt; for line of sight and pathfinding, but since I want "tiles" graphics, pygame made that crazy easy. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5025255258833388863?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5025255258833388863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5025255258833388863' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5025255258833388863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5025255258833388863'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/04/spinning-up-time-machine.html' title='Spinning Up The Time Machine'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-FSqxMYrNAog/Ta4dCUH3xUI/AAAAAAAAAU4/fyjKcDiDPM8/s72-c/python_walking_around.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4213243808256507498</id><published>2011-04-15T10:33:00.000-07:00</published><updated>2011-04-15T10:33:48.724-07:00</updated><title type='text'>Has it been 6 months already?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Wow, I can't believe 6 months slipped by that quickly. Between work and my personal life, I seem to have lost track of time (and stopped updating this). Eitherway, I'll try not to let that happen again.&lt;br /&gt;&lt;br /&gt;I've picked up programming for fun again, but so far not on magecrawl. I still want to finish it or something like it, but I've come to realize something about myself and the projects I work on as a hobby. I find things fun that are different from what I work on while at work. While I was working in C/C++, C# was fun to work on; now that I use it 8+ hours a day, not so much now. The Silverlight front end was fun until I started wrestling with Silverlight at work. &lt;br /&gt;&lt;br /&gt;I'm playing around with &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;Test Driven Development&lt;/a&gt; and Python these days. It is kind of funny that I have more test code in my little project than actual lines of code, but I hear that is how things are supposed to be.&lt;br /&gt;&lt;br /&gt;Once I get something a bit more presentable I'll post more about it. I just wanted to get back in the habit of blogging again.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4213243808256507498?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4213243808256507498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4213243808256507498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4213243808256507498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4213243808256507498'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2011/04/has-it-been-6-months-already.html' title='Has it been 6 months already?'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6110312018349897693</id><published>2010-11-07T14:22:00.000-08:00</published><updated>2010-11-07T14:22:05.827-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opengl'/><title type='text'>Learning OpenGL, slowly...</title><content type='html'>So I've burned a few hours trying to learn OpenGL. I'm using C#, accessing OpenGL via &lt;a href="http://www.opentk.com/"&gt;OpenTK&lt;/a&gt;. The tutorials &lt;a href="http://nehe.gamedev.net/lesson.asp?index=01"&gt;here&lt;/a&gt; are great, but a bit out of date. After much frustrations, I found that &lt;a href="http://www.ramblingcoder.com/"&gt;ramblingcoder&lt;/a&gt; picked them up and converted them to C#.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/TNcmR1j-0_I/AAAAAAAAAUI/BEHsDR0ehg8/s1600/OpenGL1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="252" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/TNcmR1j-0_I/AAAAAAAAAUI/BEHsDR0ehg8/s320/OpenGL1.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6110312018349897693?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6110312018349897693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6110312018349897693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6110312018349897693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6110312018349897693'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/11/learning-opengl-slowly.html' title='Learning OpenGL, slowly...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/TNcmR1j-0_I/AAAAAAAAAUI/BEHsDR0ehg8/s72-c/OpenGL1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3178789769504236110</id><published>2010-11-03T20:51:00.000-07:00</published><updated>2010-11-03T20:53:04.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Frustrations on programming languages</title><content type='html'>So, I'm honestly a bit demotivated to work on Magecrawl. Part of it is that I'm in the middle of porting it to Silverlight as a way to get a tiles version with little work that will work on Windows/Mac/Linux. Then this week, I come across &lt;a href="http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834"&gt;these&lt;/a&gt; &lt;a href="http://team.silverlight.net/announcement/pdc-and-silverlight/"&gt;articles&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While it isn't like they are canceling Silveight, their "change in focus" and the fact that Mono is currently &lt;b&gt;two major &lt;/b&gt;versions behind has me a bit worried. I don't want to sink another 20+ hours fixing things up, and then in a year or two have to move to &lt;b&gt;another &lt;/b&gt;UI layer. I also don't want to loose being able to work on it on my Mac, and right now I'm in that boat.&lt;br /&gt;&lt;br /&gt;More fundamentally, I'm frustrated that there doesn't seem to be a "good" way to do cross platform UIs for my game. I'm going to rattle though the programming languages I know or are good options. None of them right now seem to be a good fit.&lt;br /&gt;&lt;br /&gt;C# - Silverlight: Only Mac/Windows right now. Linux is an unknown period of time away. A bit worried about its future, but probably best option right now.&lt;br /&gt;&lt;br /&gt;C# - libtcod: Works everywhere, but no tiles UI.&lt;br /&gt;&lt;br /&gt;C# - winforms - Yeah, it might technically work on Mac/Linux, but there are licensing concerns that make ppl not want to install it.&lt;br /&gt;&lt;br /&gt;C# - GTK# - Doesn't look native on ANY platform except Gnome.&lt;br /&gt;&lt;br /&gt;C/C++ - Any number of frameworks here, QT being the most obvious framework or OpenGL. Ignoring the rewrite aspect, I'd rather not &lt;a href="http://iferrorthrownewbrick.blogspot.com/2009/12/why-your-next-roguelike-should-be-in.html"&gt;chase memory errors&lt;/a&gt; in an unmanaged language when I'm not being paid for it.&lt;br /&gt;&lt;br /&gt;python - pygame would be the most logical choice. I don't think I want to write in a &lt;a href="http://en.wikipedia.org/wiki/Type_system#Dynamic_typing"&gt;dynamically typed&lt;/a&gt; language.&lt;br /&gt;&lt;br /&gt;objective C - See C/C++ for the unmanaged language type. It also wouldn't work well on Windows/Linux, and I have no clue what GUI framework to use.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Java - Seriously? Swing looks terrible anywhere, and with &lt;strike&gt;Sun&lt;/strike&gt; Oracle trying its best to &lt;a href="http://arstechnica.com/tech-policy/news/2010/08/oracle-sues-google-over-use-of-java-in-android-sdk.ars"&gt;kill developer uptake&lt;/a&gt;, that isn't an option.&lt;br /&gt;&lt;br /&gt;In writing this article, I've come across &lt;a href="http://www.opentk.com/"&gt;opentk&lt;/a&gt;, which appears to be a open gl binding for C#. While I'd have to learn yet another UI framework, at least I know it'd work everywhere...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3178789769504236110?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3178789769504236110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3178789769504236110' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3178789769504236110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3178789769504236110'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/11/frustrations-on-programming-languages.html' title='Frustrations on programming languages'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5076453106103424785</id><published>2010-10-31T07:43:00.000-07:00</published><updated>2010-10-31T07:43:03.337-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='status update'/><title type='text'>Status Update - Not dead yet...</title><content type='html'>As one might have noticed, my postings the last few weeks have been few and far between. There are a few contributing factors to this decline:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Large amounts of software testing reduce my motivation to come home and work on Magecrawl&lt;/li&gt;&lt;li&gt;Work on a website for my wife's business. {shamelessPlug} &lt;a href="http://www.northaustinmusictherapy.com/"&gt;Music therapy in Austin, Round Rock, Georgetown&lt;/a&gt; {/shamelessPlug}. This involved learning pretty quickly CSS/HTML and Joomla as a &lt;a href="http://en.wikipedia.org/wiki/Web_content_management_system"&gt;CMS&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Starcraft II - I gave in and got it. It is video games goodness distilled into a drug like potency. I am currently playing against Gold level players on 1v1, and I have a pretty mean 4gate rush.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&amp;nbsp;I still haven't given up on Magecrawl. With the testing at work ending and the website up and running, things should be calmer over here. The only hurdle to working on Magecrawl will be not playing SC II...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5076453106103424785?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5076453106103424785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5076453106103424785' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5076453106103424785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5076453106103424785'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/10/status-update-not-dead-yet.html' title='Status Update - Not dead yet...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2708915257702235296</id><published>2010-10-19T20:56:00.000-07:00</published><updated>2010-10-19T20:56:43.410-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>[Offtopic] Pain in PDF printing on my mac, workaround...</title><content type='html'>So, since I spent three hours of my life on this, I figured a post on the internets for other to find was worth writing.&lt;br /&gt;&lt;br /&gt;My goal was simple. My wife had created a document in pages and wanted it professionally printed. First attempt was a simple "save as pdf". That failed, as there were tiny inconsistencies when viewed on a PC. I installed adobe reader on my mac and low and behold, they showed up there. I thought PDFs were supposed to look the same everywhere...&lt;br /&gt;&lt;br /&gt;Some google research pointed to PDF X-3, which iWorks claims to be able to export. It is apparently a subset of PDF that everyone agrees on. Yes, let that last sentence sink in. PDF, the format that is supposed to look the same everywhere, now has a sub-format to do that job. Eitherway, attempts to export the document fail with a generic "can not create PDF-X3" error. Apparently this is a long standing bug with iWorks where some complicated documents throw that error. No fix, no work around. This is starting to sound like bloody Linux...&lt;br /&gt;&lt;br /&gt;Alright, next approach is using the "ColorSync Utility" to create a filter. People online seem to saying this sometimes works. After launching the beast, I find out that it apparently fails to save resolution settings at all. This means when I filter wife's document through it, it comes out looking like 1990 smacked it upside the head, low resolution and all...&lt;br /&gt;&lt;br /&gt;The solution I have come up with is the 500 lb &amp;nbsp;(226 kg for my metric friends) sledgehammer of a solution.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open iWorks. Save document as PDF that won't work in adobe.&lt;/li&gt;&lt;li&gt;Open PDF in preview, File-&amp;gt;Save As.&lt;/li&gt;&lt;li&gt;Selection JPG, change quality to full and DPI to 500.&lt;/li&gt;&lt;li&gt;Send that 15 meg JPG to the printer...&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2708915257702235296?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2708915257702235296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2708915257702235296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2708915257702235296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2708915257702235296'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/10/offtopic-pain-in-pdf-printing-on-my-mac.html' title='[Offtopic] Pain in PDF printing on my mac, workaround...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3037099673170585741</id><published>2010-10-07T05:32:00.000-07:00</published><updated>2010-10-07T05:32:27.775-07:00</updated><title type='text'>crawl-tiles announcned, a "public domain" source of graphical tiles</title><content type='html'>My work on getting the crawl tiles public domain is complete. Here is the "press release" that I posted to R.G.R.D:&lt;br /&gt;&lt;br /&gt;I am happy to announce the first release of the crawl-tiles project &lt;br /&gt;(&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http://code.google.com/p/crawl-tiles/&amp;amp;usg=AFQjCNEAReDEOtvuc6Yk6uYwl5FCJ_EFrg" rel="nofollow" target="_blank"&gt;http://code.google.com/p/crawl-tiles/&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Crawl Stone Soup (&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http://crawl.develz.org/wordpress/&amp;amp;usg=AFQjCNEPWlr4rIRrgsXZPJ1ov1PdbBYDTw" rel="nofollow" target="_blank"&gt;http://crawl.develz.org/wordpress/&lt;/a&gt;) has a beautiful &lt;br /&gt;set of graphical tiles based on rltiles (http://rltiles.sourceforge.net/) with many extensions and modifications. &lt;br /&gt;&lt;br /&gt;Until now, they were under the "Crawl license", derived from the &lt;br /&gt;Nethack license and thus unusable by most projects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A majority of the developers/artists have signed off their work into &lt;br /&gt;the public domain (CC Zero license technically), and thus their work &lt;br /&gt;is now redistributable and usable by other projects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have packaged that work up into a form easily consumable by other &lt;br /&gt;projects, and placed it on the crawl-tiles download page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Feel free to take a look, use them in your new project. If you do so, &lt;br /&gt;please consider noting in your game where they came from.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3037099673170585741?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3037099673170585741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3037099673170585741' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3037099673170585741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3037099673170585741'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/10/crawl-tiles-announcned-public-domain.html' title='crawl-tiles announcned, a &quot;public domain&quot; source of graphical tiles'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6471284386733076862</id><published>2010-09-30T16:49:00.000-07:00</published><updated>2010-09-30T16:49:24.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Chugging along on Magecrawl for SL...</title><content type='html'>Quick update:&lt;br /&gt;&lt;br /&gt;I'm still chugging along on Magecrawl for Silverlight. I just finished ranged targetting with overlays, which makes melee/ranged attacks, inventory/spell use, and operate doors work.&lt;br /&gt;&lt;br /&gt;I have a bunch of "easy" dialog work to do, a splash screen to make, animations for ranged attacks, etc. I also have the harder work of a skill tree, preferences, and such.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6471284386733076862?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6471284386733076862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6471284386733076862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6471284386733076862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6471284386733076862'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/chugging-along-on-magecrawl-for-sl.html' title='Chugging along on Magecrawl for SL...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4459066855977424776</id><published>2010-09-28T06:53:00.000-07:00</published><updated>2010-09-28T06:53:26.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Back to work - FF XIV currently a bust...</title><content type='html'>As some of my previous posts mentioned, I was blasted excited about &lt;a href="http://en.wikipedia.org/wiki/Final_fantasy_xiv"&gt;Final Fantasy XIV&lt;/a&gt; and planned a month or two of ignoring Magecrawl around it. The short answer is that isn't happening anymore. The game has major balance and lag issues that currently make it not fun to play. If you were interested in it, I'd give it a few months to see if they can shake out the bugs and make it fun to play.&lt;br /&gt;&lt;br /&gt;And so, I'm back to normal development again. My plan is as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Finish up my crawl tiles license project, which just involves a boring night or two in front of changelists.&lt;/li&gt;&lt;li&gt;Get Magecrawl for SL up and running. My previous post had my TODO list.&lt;/li&gt;&lt;li&gt;Start work on the backlog of bugs/features. Right now, for each one that involves UI changes, I'm planning on doing it twice if reasonable.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4459066855977424776?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4459066855977424776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4459066855977424776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4459066855977424776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4459066855977424776'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/back-to-work-ff-xiv-currently-bust.html' title='Back to work - FF XIV currently a bust...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4642853812405954806</id><published>2010-09-20T21:05:00.000-07:00</published><updated>2010-09-20T21:05:18.486-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Magecrawl Status Update</title><content type='html'>I'm making good progress. I finished up the inventory dialogs tonight, and got started on targetting. Here is is my todo list as of tonight:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;Other:&lt;br /&gt;Health/Mana Bars&lt;br /&gt;Status Effect/Monster list on character info&lt;br /&gt;Handle player death&lt;br /&gt;Icons in inventory&lt;br /&gt;Hitting z to cast spell, z should target&lt;br /&gt;&lt;br /&gt;Dialogs:&lt;br /&gt;Splash Screen&lt;br /&gt;Help&lt;br /&gt;&lt;br /&gt;Hard:&lt;br /&gt;Equipment&lt;br /&gt;Skill Tree&lt;br /&gt;Way to edit preferences&lt;br /&gt;Reasignable keystrokes&lt;br /&gt;&lt;br /&gt;Message Box:&lt;br /&gt;Up/Down Stairs&lt;br /&gt;Save&lt;br /&gt;Quit&lt;br /&gt;Welcome Message&lt;br /&gt;&lt;br /&gt;Requires Targetting:&lt;br /&gt;Operate&lt;br /&gt;Draw ranged attack&lt;br /&gt;Attack Melee/Ranged&lt;br /&gt;Inventory w\ targetting&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Obviously rewriting the skill tree viewer will take the most work, but most of the rest of them will fall into place quickly. Four them require targetting, which I'm currently working on, while 6 require dialog to be written (easy). 4-6 of them don't have to be done for the game to be playable, just nice to haves.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4642853812405954806?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4642853812405954806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4642853812405954806' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4642853812405954806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4642853812405954806'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/magecrawl-status-update.html' title='Magecrawl Status Update'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7368099873427494186</id><published>2010-09-19T17:02:00.000-07:00</published><updated>2010-09-19T17:02:42.367-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>[Silverlight] ChildWindow focus bugs, oh my!</title><content type='html'>Another day of programming, another bug in silverlight to work around. When I'm not working around bugs, I'm crazy productive however.&lt;br /&gt;&lt;br /&gt;The issue today is key focus, in particular with ChildWindow. This class allows you to place modal dialogs up with a minimal of fuss. The problem is that for some reason they weren't getting keyboard focus correctly. This is a big problem when you want your entire game to be able to be run from the keyboard alone.&lt;br /&gt;&lt;br /&gt;Here is my solution (with help from a friend):&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ChildWindowNoFade ParentWindow;&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; ChildWindowNoFade()&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.DefaultStyleKey = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(ChildWindowNoFade);&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.Loaded += &lt;span class="kwrd"&gt;new&lt;/span&gt; RoutedEventHandler(ChildWindowNoFade_Loaded);&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.Closing += &lt;span class="kwrd"&gt;new&lt;/span&gt; EventHandler&amp;lt;System.ComponentModel.CancelEventArgs&amp;gt;(ChildWindowNoFade_Closing);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; ChildWindowNoFade_Closing(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, System.ComponentModel.CancelEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            Dispatcher.BeginInvoke(() =&amp;gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (ParentWindow != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    ParentWindow.Focus();&lt;br /&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (ParentWindow.InitialFocusItem != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;                        ParentWindow.InitialFocusItem.Focus();&lt;br /&gt;                }&lt;br /&gt;            });&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; ChildWindowNoFade_Loaded(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            Dispatcher.BeginInvoke(() =&amp;gt; &lt;br /&gt;            {&lt;br /&gt;                Focus();&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (InitialFocusItem != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;                    InitialFocusItem.Focus();&lt;br /&gt;            });&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;abstract&lt;/span&gt; Control InitialFocusItem&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;Roughly, I'm creating a base class that hooks into loading and closing of windows. It fixes up the focus problems in cases of stacked modal dialog (where ParentWindow is non-null).&lt;br /&gt;&lt;br /&gt;A few other notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Some child windows act funny with keyboard focus if they don't have controls in them and/or they don't have IsTabStop="True" TabIndex="1" set on the window&lt;/li&gt;&lt;li&gt;System.Windows.Browser.HtmlPage.Plugin.Focus();&amp;nbsp;&amp;nbsp;&amp;nbsp; If you call this guy on the creation of your root object will give your application focus. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7368099873427494186?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7368099873427494186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7368099873427494186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7368099873427494186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7368099873427494186'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/silverlight-childwindow-focus-bugs-oh.html' title='[Silverlight] ChildWindow focus bugs, oh my!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4757035343269055357</id><published>2010-09-18T20:56:00.000-07:00</published><updated>2010-09-18T21:15:01.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>[Silverlight] Binding to list box elements throwing MethodAccessException</title><content type='html'>I spent an hour or two figuring this out, so I figured I'd post about it. Hopefully, the next poor soul who runs into it will find it here:&lt;br /&gt;&lt;br /&gt;I was running into a problem binding my list to a Silverlight list box. On listbox creation, the output window had lots of lines that looked like this: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;System.Windows.Data  Error: Cannot get 'DisplayName' value (type 'System.String') from  'Magecrawl.Items.Consumable' (type 'Magecrawl.Items.Consumable').  BindingExpression: Path='DisplayName'  DataItem='Magecrawl.Items.Consumable' (HashCode=45492604); target  element is 'System.Windows.Controls.TextBlock' (Name=''); target  property is 'Text' (type 'System.String')..  System.MethodAccessException: Attempt by method  'System.Windows.CLRPropertyListener.get_Value()' to access method  'Magecrawl.Items.Consumable.get_DisplayName()' failed.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj,  RuntimeMethodHandleInternal method, RuntimeType parent, UInt32  invocationFlags)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj,  IRuntimeMethodInfo method, RuntimeType parent, UInt32 invocationFlags)&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://andy.theschotts.net/2009/03/silverlight-databinding-and-methodaccessexception.html"&gt;answer&lt;/a&gt; is that under Silverlight, &lt;b&gt;you can not bind to non-public objects&lt;/b&gt;. The Consumable objects noted above was a internal object with a public interface. Once I made it public, the problem went away.&lt;br /&gt;&lt;br /&gt;A side note, this &lt;a href="http://grahammurray.wordpress.com/2010/05/30/binding-to-anonymous-types-in-silverlight/"&gt;apparently&lt;/a&gt; also occurs if you bind to an anonymous type as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4757035343269055357?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4757035343269055357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4757035343269055357' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4757035343269055357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4757035343269055357'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/silverlight-binding-to-list-box.html' title='[Silverlight] Binding to list box elements throwing MethodAccessException'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8252417862224817830</id><published>2010-09-14T19:04:00.000-07:00</published><updated>2010-09-14T19:04:58.791-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='licensing'/><title type='text'>Why getting your licensing straight is important</title><content type='html'>So, you might have noticing my posting frequency has decreased the last few weeks. A few things factors have contributed:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Deadlines at work give me less time/energy to code for fun&lt;/li&gt;&lt;li&gt;Final Fantasy XIV is in open beta&lt;/li&gt;&lt;li&gt;Side projects&lt;/li&gt;&lt;/ul&gt;One of those side projects is what I want to talk about. As you might have noticed, the Silverlight prototypes uses the wonderful graphics from &lt;a href="http://crawl.develz.org/wordpress/"&gt;Crawl&lt;/a&gt;. Those graphics were based on &lt;a href="http://rltiles.sourceforge.net/"&gt;rltiles&lt;/a&gt; and expanded upon by many great artists.&lt;br /&gt;&lt;br /&gt;However, no explicit license grant was required of those submissions, and such they are by default under Crawl's license. It is derived from Nethack's license, and is incompatible with pretty much everything. I got around this in the short term by duel licensing magecrawl under BSD/Crawl, but this is not something I'd like to continue forever.&lt;br /&gt;&lt;br /&gt;In talking to the development team, I offered to attempt to contact the 20-30 people who have made changes and ask for them to relicense their work. They were interested in getting away from the crawl license, and so they agreed. The license that I suggested and we settled on was &lt;a href="http://creativecommons.org/publicdomain/zero/1.0/"&gt;this one,&lt;/a&gt; which is pretty much a cute way to say "public domain".&lt;br /&gt;&lt;br /&gt;The e-mails are still going out to try to get a hold of everyone. This work is going to suck up at least a week or two of my programming nights when it all finished. In addition to that, if I can't get a hold of some people, those tiles will either have to be redone or separated from the "public domain" tiles. &lt;br /&gt;&lt;br /&gt;If the number of people that touched the tiles was higher, in the hundreds or thousands, it would be impossible to get everyone to sign off. The impossibility to relicense the Linux kernel is a great example of a project that is in that boat. It is somewhat different, because they are happy with the gpl v2.&lt;br /&gt;&lt;br /&gt;This is why getting your license straightened out early is important. Here is a 30 second, I am not a lawyer so don't pretend I am one (not even on TV), summery of licensing.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"Public Domain" - Technically not a license, the idea is to give up all rights to the code. This &lt;a href="http://creativecommons.org/publicdomain/zero/1.0/"&gt;CC license&lt;/a&gt; or the &lt;a href="http://en.wikipedia.org/wiki/WTFPL"&gt;WTFPL&lt;/a&gt; licenses are in this class.&lt;/li&gt;&lt;li&gt;"&lt;a href="http://en.wikipedia.org/wiki/BSD_license#3-clause_license_.28.22New_BSD_License.22.29"&gt;BSD&lt;/a&gt;" - This is the next step in being restrictive, but just barely. The license only requires that you keep the copyright notations on the source code. The &lt;a href="http://en.wikipedia.org/wiki/MIT_License"&gt;MIT license&lt;/a&gt; is also very similar.&lt;/li&gt;&lt;li&gt;"&lt;a href="http://en.wikipedia.org/wiki/Gpl"&gt;GPL&lt;/a&gt;" - A very common license, with the idea that the source code should stay "open/free". Roughly, any code linked to GPL code must be GPL, and you must offer to distribute any changes that you make to anyone you give copies of your program. It places more &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/01/magecrawl-changes-license-now-new-bsd.html"&gt;restrictions on you as a programmer&lt;/a&gt; (other licensing may not be GPL compatible and hence a GPL program can not link against them), and also places restrictions on anyone who distributes your program. However, it prevents anyone from using your source code without opening their changes.&lt;/li&gt;&lt;li&gt;"CC" - Many of these licensing don't apply very well to things like text and artwork. The &lt;a href="http://creativecommons.org/about/licenses"&gt;creative commons licensees&lt;/a&gt; many times are good fits, with many different flavors.&lt;/li&gt;&lt;li&gt;Proprietary - The source code is not open for view/edit. Uncommon but &lt;a href="http://en.wikipedia.org/wiki/ADOM"&gt;not unheard of&lt;/a&gt; in roguelikes. Can not link against GPL code, but can use BSD/Public Domain code.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8252417862224817830?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8252417862224817830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8252417862224817830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8252417862224817830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8252417862224817830'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/why-getting-your-licensing-straight-is.html' title='Why getting your licensing straight is important'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1323636100164307592</id><published>2010-09-07T20:14:00.000-07:00</published><updated>2010-09-07T20:14:21.358-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Silverlight fun and arcane "batteries"</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/TIbzq057tkI/AAAAAAAAATw/Gtmmk0sKabA/s1600/Magecrawl+Silverlight+One.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/TIbzq057tkI/AAAAAAAAATw/Gtmmk0sKabA/s400/Magecrawl+Silverlight+One.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;While the open beta of Final Fantasy 14 has taken more programming time away that I'd like to admit, I haven't dropped off the face of the planet yet. I've made good progress so far on the new "tiles" GUI, using silverlight. See &lt;a href="http://dl.dropbox.com/u/8791050/SilverlightMagecrawlOne.swf"&gt;this video&lt;/a&gt; for a quick video of gameplay. There is a huge number of things needed to make it fully functional, ranging from picking up items to the skill tree.&lt;br /&gt;&lt;br /&gt;Assuming I was able to make the tiles interface work on Windows/Mac/Linux, both in the web browser and in a stand alone application, I've been toying around with the idea of ditching the ascii interface. I personally enjoy playing the tiles version of crawl more than the ascii version, and I feel I could make either two decent front ends or one awesome one. There is a lot of "if"s still in the air, but would doing that enrage anybody out there? While in the end I'm programming this game for personal pleasure, I do care about the opinions of the players of my game.&lt;br /&gt;&lt;br /&gt;Another idea floating around my head is redesigning the magic system in Magecrawl. Right now, it is a fantasy standard MP system, with the MP being generally recharged after every fight. This makes fights "front heavy" with the characters dumping most of their MP early on, and resorting to melee afterwards. Also, it generally devolves into spamming the most powerful attack spell over and over. When I think about arcane duels, this isn't how I imagine things. I imagine almost every round until exhaustion some spell being cast, whether it is a earth-shaking powerful effect or a simple cantrip.&lt;br /&gt;&lt;br /&gt;It is hard to make such a wide spread of spell types and tempos effective in the current system. My idea is a take on &lt;a href="http://www.d20srd.org/srd/variant/magic/rechargemagic.htm"&gt;recharge magic&lt;/a&gt;, with a twist. Each spell has a total amount of "energy" that is needed to cast it. The player has a "battery" of mana, which at the end of each turn (that isn't spent moving?) some is syphoned off to fill each skill not ready to cast.&lt;br /&gt;&lt;br /&gt;With a property selection of spells, one could alternate between two relatively fast recharging spells, or cast a range of spells (damage, push back, damage, blink away). Long term effects could reduce either the total "battery" before spells start running dry or the rate that spells recharge. Playing arcane characters should be about casting spells and making things blow up :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1323636100164307592?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1323636100164307592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1323636100164307592' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1323636100164307592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1323636100164307592'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/09/silverlight-fun-and-arcane-batteries.html' title='Silverlight fun and arcane &quot;batteries&quot;'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/TIbzq057tkI/AAAAAAAAATw/Gtmmk0sKabA/s72-c/Magecrawl+Silverlight+One.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1275123467982806082</id><published>2010-08-31T21:32:00.000-07:00</published><updated>2010-08-31T21:32:16.480-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>I can has magecrawl on the internets?</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/TH3Ooi-_iRI/AAAAAAAAATg/wbfKsyFpozI/s1600/Silverlight+Hello+World.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/TH3Ooi-_iRI/AAAAAAAAATg/wbfKsyFpozI/s320/Silverlight+Hello+World.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So it might not look like much, but that's magecrawl running in a web browser! Levels generated, items created, monsters waiting for time to start ticking. The only thing missing is drawing and control. &lt;br /&gt;&lt;br /&gt;My good friend Ben inspired the idea and helped implement some the magic.&lt;br /&gt;&lt;br /&gt;Roughly the magic entails removing all references to libtcod from the game engine. That way, we can load all that code inside a web browser via silverlight, (which can't load native code). I "ported" this code from libtcod:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Shadowcasting Line of Sight&lt;/li&gt;&lt;li&gt;A* Pathfinding&lt;/li&gt;&lt;li&gt;Bresenham Line Generation&lt;/li&gt;&lt;/ul&gt;"Porting" could be described as the twisted application of force needed to move C code to compile and run in C#. Since none of them used pointer math too heavily, it was reasonable to attempt. The code looks ugly for C# code, but it works.&lt;br /&gt;&lt;br /&gt;In theory, it should even save and load! I can use my same serialization code, just point it to "isolated storage" and away we go.&lt;br /&gt;&lt;br /&gt;Obviously, a lot of work is needed to make it a real game frontend. But the fact that I could even get this far (and not have to rewrite everything in flash) is pretty awesome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1275123467982806082?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1275123467982806082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1275123467982806082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1275123467982806082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1275123467982806082'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/i-can-has-magecrawl-on-internets.html' title='I can has magecrawl on the internets?'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/TH3Ooi-_iRI/AAAAAAAAATg/wbfKsyFpozI/s72-c/Silverlight+Hello+World.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1970963544232845145</id><published>2010-08-28T08:53:00.000-07:00</published><updated>2010-08-28T08:53:50.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>A simple way to reduce memory usage of structs/enums in Dictionaries</title><content type='html'>I can't take credit for this tip, it was pointed out &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/08/class-vs-struct-it-actually-can-matter.html?showComment=1281687310678#c3898989607300045654"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As pointed out &lt;a href="http://blog.nickgravelyn.com/2009/04/net-misconceptions-part-1/"&gt;here&lt;/a&gt;, by default if you use a struct or an enum inside a dictionary, you will alloc objects every time you access the dictionary to box/unbox things. For example this will allocate both a Point an object to box it in:&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;var squareLookup = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;Point, SkillSquare&amp;gt;()&lt;br /&gt;squareLookup[&lt;span class="kwrd"&gt;new&lt;/span&gt; Point(0,0)] = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;I ran into issues because I used something like this for drawing the skill tree, and when you scrolled we hit the dictionary a huge number of time.&lt;br /&gt;&lt;br /&gt;The linked hint suggests doing something like:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; PointEqualityComparer : IEqualityComparer&amp;lt;Point&amp;gt;&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; PointEqualityComparer Instance = &lt;span class="kwrd"&gt;new&lt;/span&gt; PointEqualityComparer();&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Equals(Point x, Point y)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; x == y;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; GetHashCode(Point obj)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; obj.GetHashCode();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;var squareLookup = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;Point, SkillSquare&amp;gt;&lt;br /&gt;    (PointEqualityComparer.Instance)&lt;br /&gt;squareLookup[&lt;span class="kwrd"&gt;new&lt;/span&gt; Point(0,0)] = &lt;span class="kwrd"&gt;null&lt;/span&gt;; &lt;/pre&gt;&lt;br /&gt;With this simple change, a profiled run of scrolled went from over 70% of all allocated memory being Points to so few it wasn't even broken out as an entry. This increased performance by a huge amount.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1970963544232845145?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1970963544232845145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1970963544232845145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1970963544232845145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1970963544232845145'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/simple-way-to-reduce-memory-usage-of.html' title='A simple way to reduce memory usage of structs/enums in Dictionaries'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5505805899293211426</id><published>2010-08-27T07:01:00.000-07:00</published><updated>2010-08-27T07:01:03.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Testing - Baby Steps</title><content type='html'>I just committed the first nunit tests for magecrawl this morning. Automatic testing has been on my "nice to have, but not now" list for multiple releases. The reason in short is that writing tests isn't fun, which in some regards is a stupid reason, and in others is understandable (this project is my hobby, not my second job).&lt;br /&gt;&lt;br /&gt;My first step into testing was 11 tests, testing the generators (Item, Monster, Map). They simply just poke each generator public API thousands of times, looking for a hang or crash. During development, I ran into a significant number of issues related to this, so this was a "low hanging fruit".&lt;br /&gt;&lt;br /&gt;In the future, I'm planning on writing more tests, testing the game engine itself and more of the external libraries. However, I'm currently demotivated enough that I want/need to work on other more interesting things.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/THfE94xzSQI/AAAAAAAAATY/meKw27UJyh8/s1600/NUnit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/THfE94xzSQI/AAAAAAAAATY/meKw27UJyh8/s320/NUnit.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5505805899293211426?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5505805899293211426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5505805899293211426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5505805899293211426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5505805899293211426'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/testing-baby-steps.html' title='Testing - Baby Steps'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_HGdMxBYRQLs/THfE94xzSQI/AAAAAAAAATY/meKw27UJyh8/s72-c/NUnit.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2340854988642891473</id><published>2010-08-24T06:50:00.000-07:00</published><updated>2010-08-24T06:50:32.345-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Modularization -  The joys</title><content type='html'>Modularization, the process of breaking a monolithic software component into multiple separate components. To be honest, it isn't very much fun. For a year or so, I did a lot of it at work, enough so that my wife recognizes the word and knows it isn't very much fun. This is what I did all weekend.&lt;br /&gt;&lt;br /&gt;The first question is why I would spend a significant portion of the weekend doing something I admit isn't fun as part of my "hobby". The truth is that in most hobbies there are parts that one does not enjoy. Runners don't always enjoy getting up early to run, some parts of video games are called "grinds", and practicing a skill or instrument isn't often fun.&lt;br /&gt;&lt;br /&gt;Magecrawl during development had a few modular boundaries established early on, between the GameEngine and the UI, that has been honored. However, the "GameEngine" component has grown to include much of the games logic, enough that I felt for testability (more on that in further posts) and understandability, things had to be broken up. &lt;br /&gt;&lt;br /&gt;Here is a picture of what I currently have:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/THNRL3nQelI/AAAAAAAAATQ/1JW51fH9D3o/s1600/DependencyGraph.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/THNRL3nQelI/AAAAAAAAATQ/1JW51fH9D3o/s1600/DependencyGraph.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/THNRL3nQelI/AAAAAAAAATQ/1JW51fH9D3o/s640/DependencyGraph.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;A bit of explanation, everything that isn't MageCrawl.exe, GameUI, Interfaces, and Utilities used to be in GameEngine. Here's a rough idea of what everything does:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Utilities - Low level stuff, like the Point class, Preferences, and helper classes for saving and finding types at run time.&lt;/li&gt;&lt;li&gt;Interfaces - These are interfaces that the GameEngine as a whole provide that allow the GameUI and controls to query information about the current game state. Things like IPlayer, IMap, IGameEngine, etc.&lt;/li&gt;&lt;li&gt;GameUI - This is what draws the map, menus, etc.&lt;/li&gt;&lt;li&gt;MageCrawl - This is the game engine proper. It has an implicit dependency of GameEngine via MEF. It kicks everything off and runs the main game loop.&lt;/li&gt;&lt;li&gt;EngineInterfaces - This is a set of internal interfaces the game engine components use to talk about objects everyone needs to know about. For example IGameEngineCore describes the calls to the GameEngine the various modules can use to implement their behavior. For example, those interfaces might expose how to add a status effect to a creature, but to do that you need to know what a status effect is. But status effects live "above" this module, so we create an interfaces that we can expose at this low level, IStatusEffectCore (IStatusEffect is in Interfaces for the GUI).&lt;/li&gt;&lt;li&gt;Items - This guy technically existed last release. It was the newest written code, hence being formed as a separate module. This guy handles creating items and exposing their behavior via Attributes.&lt;/li&gt;&lt;li&gt;StatusEffect - This guy handles short and long term status effects, things like poison, haste, and the like. It acts by using the exposed interfaces in IGameEngineCore and attributes.&lt;/li&gt;&lt;li&gt;Actors - Technically, this module contains monsters (and their AI), along with the Character base class. Characters can wield equipment (Melee for all monsters right now though) and have StatusEffects upon them.&amp;nbsp; Player lives in GameEngine since it has a lot of other stuff (Spells, Skills, etc).&lt;/li&gt;&lt;li&gt;Maps - This was the guy I wanted to pull out. It exposes the map data structures, and the multiple ways to generate maps. Maps place monsters onto them self, and can contain items on the ground.&lt;/li&gt;&lt;li&gt;GameEngine - This is where everything else lives. It handles physics (who can move where, etc), combat (resolve attacks), magic (what does the spell do), and the like.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;This is a rough outline of MageCrawl's internal structure. I'll talk about it more in future posts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2340854988642891473?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2340854988642891473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2340854988642891473' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2340854988642891473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2340854988642891473'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/modularization-joys.html' title='Modularization -  The joys'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/THNRL3nQelI/AAAAAAAAATQ/1JW51fH9D3o/s72-c/DependencyGraph.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1742972431404058106</id><published>2010-08-21T08:18:00.000-07:00</published><updated>2010-08-21T08:18:44.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod-net'/><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><title type='text'>libtcod 1.5.1b1 released!</title><content type='html'>As many may know, Magecrawl uses libtcod (via libtcod-net) for both graphics and engine support (FOV, LOS, etc). Months ago, I created a &lt;a href="http://en.wikipedia.org/wiki/Swig"&gt;SWIG&lt;/a&gt;'ed version of libtcod-net, so that I could stop supporting a hand-rolled wrapper. A (beta) release featuring that has now come out.&lt;br /&gt;&lt;br /&gt;If you use libtcod via c#, I &lt;b&gt;highly recommend &lt;/b&gt;upgrading to the new wrapper, as the old one is deprecated and no new work will be done on it. Also, the new version has OSX versions for both C# and native C/C++ developers.&lt;br /&gt;&lt;br /&gt;Get the hotness &lt;a href="http://doryen.eptalys.net/2010/08/libtcod-1-5-1b1-released/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1742972431404058106?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1742972431404058106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1742972431404058106' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1742972431404058106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1742972431404058106'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/libtcod-151b1-released.html' title='libtcod 1.5.1b1 released!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6940474978982958745</id><published>2010-08-19T20:48:00.000-07:00</published><updated>2010-08-19T20:48:56.012-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration10'/><title type='text'>Iteration 10 - The long road to slices (want to get out and help push)?</title><content type='html'>So I've spent this week doing "research" on what next lies in store for Magecrawl.&lt;br /&gt;&lt;br /&gt;The first thing I've realized is I now have a good "family tree" for Magecrawl. While Magecrawl isn't developed enough for &lt;a href="http://crawl.develz.org/wordpress/"&gt;Crawl&lt;/a&gt; to consider it a legitimize offspring, it provides much of the inspiration and root ideas. Things like tactical gameplay, high difficulty, removal of any "grinding" gameplay, and a crazy good auto-explore are all things I aspire to have. &lt;a href="http://en.wikipedia.org/wiki/Borderlands_%28video_game%29"&gt;Borderlands&lt;/a&gt; takes the role of the crazy uncle that rubs of a little bit. It provides such a varied equipment set that playing the game a second (and third) playthrough is fun and interesting. &lt;a href="http://en.wikipedia.org/wiki/Diablo_%28video_game%29"&gt;Diablo&lt;/a&gt; can be considered one of the grandfather figures. It to me was one of the great dungeon delve games of my youth.&lt;br /&gt;&lt;br /&gt;My serious hope is that is the last "iteration" in the series to build up a game engine. Tasks I want to finish to put me in a great place include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;55 open issues in my bug database, mostly minor and a few major features. Some major ones include:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Better monster AI using sounds or smell&lt;/li&gt;&lt;li&gt;Status effects from various schools&lt;/li&gt;&lt;li&gt;Better use of spell effect areas to differentiate the schools&lt;/li&gt;&lt;li&gt;"Typed" damage, just as fire or physical. Resistances to various damage types.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Refactor the GameEngine library into multiple separate libraries, pulling out:&lt;/li&gt;&lt;ul&gt;&lt;li&gt; Monster creation/behavior&lt;/li&gt;&lt;li&gt;Status effects&lt;/li&gt;&lt;li&gt;Map creation&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Some form of basic integration testing for common operations.&lt;/li&gt;&lt;li&gt;Some form of "arena" for testing the weights of various skill tree nodes, along with the possibility of an awesome screen saver. &lt;/li&gt;&lt;/ul&gt;So yeah, that's a lot of work. I'm in no hurry to start working a masses of content for a "slice" game, so if it takes me multiple months, it isn't the end of the world.&lt;br /&gt;&lt;br /&gt;While I'm still planning on working on Magecrawl (a lot), I feel like I'm in a good place to open up development to others if they are interested. Developing on Magecrawl offers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A relatively clean/nice C# codebase&lt;/li&gt;&lt;li&gt;Licensed BSD&lt;/li&gt;&lt;li&gt;Works on Windows/Mac/Linux, development is possible on any platform&lt;/li&gt;&lt;li&gt;The possibility to implement high level functionality on a working game, as opposed to starting at square one with an @ walking around the screen (not that there is anything wrong with that)&lt;/li&gt;&lt;/ul&gt;If this sounds interesting, feel free to contact me at chris dot hamons at gmail dot com.&lt;br /&gt;&lt;br /&gt;One last thing, I re-realized how awesome &lt;span id="goog_1787246631"&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/"&gt;Ascii Dreams&lt;span id="goog_1787246632"&gt;&lt;/span&gt;&lt;/a&gt; is. The "Designing a Magic System" serious of &lt;a href="http://roguelikedeveloper.blogspot.com/2008/05/unangband-magic-system-part-one.html"&gt;articles&lt;/a&gt; and the &lt;a href="http://roguelikedeveloper.blogspot.com/2010/08/design-magic-system-redux-status.html"&gt;follow&lt;/a&gt; &lt;a href="http://roguelikedeveloper.blogspot.com/2010/08/designing-magic-system-redux-status.html"&gt;ups&lt;/a&gt; &lt;b&gt;should be on the required reading list for any future roguelike developer&lt;/b&gt; (or game developer in general). I wish he updated it more often these days, the content is golden.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6940474978982958745?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6940474978982958745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6940474978982958745' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6940474978982958745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6940474978982958745'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/iteration-10-long-road-to-slices-want.html' title='Iteration 10 - The long road to slices (want to get out and help push)?'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5082158120384906199</id><published>2010-08-15T16:55:00.000-07:00</published><updated>2010-08-15T16:55:14.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>Release aftermath and thoughts</title><content type='html'>So, the new release has been on the interwebs for a few days now. I figured a post with thoughts and future plans was in order.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Some people had issues getting things to run. All of them involved needing either the MSVC 2010 C runtime, or the required mac frameworks. I didn't have them listed on the release page, which has been fixed. In the far future, and installer for magecrawl would be nice to take care of stuff like this.&lt;/li&gt;&lt;li&gt;Very little feedback so far. Maybe the summer and quick release since the last tech demo have something to do with that...&lt;/li&gt;&lt;li&gt;No crashes or savegame corruption reports so far. If people got the game working, it seems to be working fine.&lt;/li&gt;&lt;/ul&gt;Now that it is out the door, the next question is "now what?". Here are my current thoughts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Spend the next week collecting game play ideas. My wife pointed out this means I can play video games and call it "research". Magecrawl has matured past the point that calling it a tech demo is becoming a stretch, yet the gameplay is kinda bland. I want to come up with interesting mechanics to make combat more than "jam damage spell, unless I can hit more than one with a bigger spell".&lt;/li&gt;&lt;li&gt;Iteration 10 - Yes, one more. I have a ton of things I need to do, refactors, cleanup, and minor feature polish.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Slice 1- Once I get the base in good shape, I need to come up with a "theme" for my slice. I plan on picking one skill tree, and one/a few map types, and create a lot of content. For example, maybe the arcane tree and ruins maps, or the fire tree and interesting caves. I'll jam it out to be a "full length" game, seriously this time. It might be shallow, but it'll be complete.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5082158120384906199?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5082158120384906199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5082158120384906199' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5082158120384906199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5082158120384906199'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/release-aftermath-and-thoughts.html' title='Release aftermath and thoughts'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3899605997521944742</id><published>2010-08-12T22:20:00.000-07:00</published><updated>2010-08-12T22:21:19.743-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Magecrawl Tech Demo III v2 Demo Video</title><content type='html'>I've wanted to put together a quick video demo'ing magecrawl for those who want to see the game before downloading it or are having trouble getting started.&lt;br /&gt;&lt;br /&gt;I found some decent software which made creating the video easy enough to tackle tonight. If anybody has a pointer to free software that captures screen video and sound and outputs to youtube, please let me know in the comments. Jing, the software I used was easy, but it outputs only to a flash file unless you buy the pro version.&lt;br /&gt;&lt;br /&gt;Eitherway, check it out &lt;a href="http://dl.dropbox.com/u/8791050/Tech%20Demo%20III.swf"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3899605997521944742?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3899605997521944742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3899605997521944742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3899605997521944742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3899605997521944742'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/magecrawl-tech-demo-iii-v2-demo-video.html' title='Magecrawl Tech Demo III v2 Demo Video'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1907601868655736277</id><published>2010-08-12T20:34:00.000-07:00</published><updated>2010-08-15T15:42:40.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Magecrawl Tech Demo III v2 released!</title><content type='html'>I am pleased to announce the release of "Magecrawl Tech Demo III v2". Released two months after the previous Tech Demo III release, it adds features that I wished were part of that release, but not enough I feel to bump it up to number "IV". Highlights of the user visible changes in this release include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Difficulty that won't melt your face &lt;/li&gt;&lt;li&gt;Concurrent Mac/Linux/Windows release with a single release zipfile &lt;/li&gt;&lt;li&gt;Monster and Items that scale as the game progresses&lt;/li&gt;&lt;li&gt;Long term persistent effects&lt;/li&gt;&lt;li&gt;"Backgrounds" - Starting configurations of skills and items &lt;/li&gt;&lt;li&gt;New skill trees with tons more skills&lt;/li&gt;&lt;li&gt;Smarter AI&lt;/li&gt;&lt;li&gt;New spells, items, and monsters&lt;/li&gt;&lt;li&gt;Bug fixes, and balance fixes&lt;/li&gt;&lt;/ul&gt;One important note for Linux users, due to a last minute found bug, you will be unable to save unless you add the following string into your Preferences.xml file&lt;br /&gt;&lt;br /&gt;&amp;lt; UseSavegameCompression &amp;gt; False &amp;lt; /UseSavegameCompression &amp;gt;&lt;br /&gt;&lt;br /&gt;If you run into any crashes, please send the created file "DebuggingLog.txt" to me (chris dot hamons at gmail dot com), along with any save file you have.&lt;br /&gt;&lt;br /&gt;One last thing, please seriously consider filing a comment or sending me an e-mail both letting me know you checked out my game and your thoughts. Feedback is the breakfast of champions you know.&lt;br /&gt;&lt;br /&gt;Now that I've made you read though all of that, binaries can be found &lt;a href="http://code.google.com/p/magecrawl/"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;If you haven't run Magecrawl before, here's is what you need installed to make things work:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows - .Net 3.5 found &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7&amp;amp;displaylang=en"&gt;here&lt;/a&gt;. You might need to 2010 C RTE &lt;a href="http://www.blogger.com/%20http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&amp;amp;displaylang=en"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Mac - Mono found &lt;a href="http://www.mono-project.com/Main_Page"&gt;here.&lt;/a&gt; You probably need the frameworks &lt;a href="http://www.libsdl.org/release/SDL-1.2.14.dmg"&gt;SDL&lt;/a&gt;, and &lt;a href="http://ethan.tira-thompson.org/Mac_OS_X_Ports_files/libpng%20%28universal%29.dmg"&gt;libpng.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Linux - Also mono found &lt;a href="http://www.mono-project.com/Main_Page"&gt;here&lt;/a&gt;, however you might want to try a copy installed by your package manager first&lt;/li&gt;&lt;/ul&gt;Here is how you run Magecrawl:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Windows - Unzip the zip file somewhere, and double click MageCrawl.exe&lt;/li&gt;&lt;li&gt;Mac/Linux - Unzip the zip file somewhere, open a terminal and cd to that directory, and run "mono ./MageCrawl.exe"&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1907601868655736277?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1907601868655736277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1907601868655736277' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1907601868655736277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1907601868655736277'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/magecrawl-tech-demo-iii-v2-released.html' title='Magecrawl Tech Demo III v2 released!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7407037963685744476</id><published>2010-08-11T21:01:00.000-07:00</published><updated>2010-08-11T21:02:29.928-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='Balancing'/><title type='text'>"Leaky" stamina, and other "balance" changes</title><content type='html'>So, I'm still hacking out changes to make Magecrawl playable.&lt;br /&gt;&lt;br /&gt;The major change of the night implements what I hope is a solution to the HP problem I talked about last post. I decided the underlying problem was that going from 100% stamina to 5% stamina involved zero risk. Now, once your stamina goes below a cutoff (currently 80%), there is a chance that some of the damage will "leak" through and apply directly to the underlying health. The chance is inversely proportional to the amount of stamina, so you are much more likely to leak at 20% stamina than 75%. This changes make combat more dangerous overall, but having lots of stamina is still useful but not overpowering.&lt;br /&gt;&lt;br /&gt;Other changes I've implemented this week include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Map generator won't generate a horde of monsters on top of the player starting position&lt;/li&gt;&lt;li&gt;Monsters will notice the player from farther away when they are wearing heavy armor (noise).&lt;/li&gt;&lt;li&gt;Toughness skill will now give health instead of stamina, giving the player the option to "buy" more long term health.&lt;/li&gt;&lt;li&gt;Bug fixes, seriously lots of bug fixes. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7407037963685744476?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7407037963685744476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7407037963685744476' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7407037963685744476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7407037963685744476'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/leaky-stamina-and-other-balence-changes.html' title='&quot;Leaky&quot; stamina, and other &quot;balance&quot; changes'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3615004985521510661</id><published>2010-08-09T21:25:00.000-07:00</published><updated>2010-08-09T21:25:42.882-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='Balancing'/><title type='text'>The problem with HP...</title><content type='html'>I know I've linked to &lt;a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/CriticalExistenceFailure"&gt;this&lt;/a&gt; tv trope, but it is seriously still true in magecrawl. For those not playing along at home, here's what the current system is:&lt;br /&gt;&lt;br /&gt;HP is divided into health and stamina. Damage taken is drained from stamina first. Stamina quickly recovers in between battles (assuming you aren't noticed by enemies, you can't rest then). Health damage requires magical healing to fix up. Stamina represents your ability to dodge and block damage enough to get out only with scrapes, bruises, and surface cuts. Health represents actual wounds, while bandaged up enough not to get worse, would normally require weeks to heal on their own.&lt;br /&gt;&lt;br /&gt;Let me show you my current problem with an example:&lt;br /&gt;&lt;br /&gt;Given 100 health and 60 stamina, you fight a monster which on average does 20 damage per round and takes 4 rounds to kill. Given these stats, you'll exhaust your stamina every fight, taking 20 damage to your health. In five fights, excluding magical healing, you will be dead. &lt;br /&gt;&lt;br /&gt;Now repeat with 80 stamina, you on average take little to no health damage, extending the number of one-on-ones to tens or hundreds. If you repeat with 100 or more stamina, you'll extend the theoretical number of battle you can last, but you'll never get close to the "jump" between 60 and 80.&lt;br /&gt;&lt;br /&gt;This creates a problem with skills and armor that increase your stamina, at some point you'll be able to solo monsters with no danger of taking semi-permanent health damage. I have a few solutions I'm playing around with:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Make the line between stamina and health less clear cut. When you are at 100% stamina, you are sure any damage you take will be stamina related. As it decrease, there is a higher chance some of the damage goes to your health.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Advantages - Makes battles less one sided, as any blow after a round or two can be lasting.&lt;/li&gt;&lt;li&gt;Disadvantages - Adds a significant luck factor&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make healing stamina take resources&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Advantages - Makes every battle matter&lt;/li&gt;&lt;li&gt;Disadvantages - Makes every battle matter, makes it easy to want to micro optimize which isn't fun. Starts to approach the dreaded "food" system in other roguelikes.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make low stamina penalize certain attributes, such as mp total or time in between actions.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Advantages - Makes stamina damage matter.&lt;/li&gt;&lt;li&gt;Disadvantages - Can snowball, making you more likely to take even more damage. In a game with permadeath, this can get nasty.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make the stamina and health levels relativity constant (they increase at a rate similar to monsters damage output). Skills/armor give other benefits than more stamina.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Advantages - Makes balancing easier. One you have a good setup, just make sure the rates of growth match.&lt;/li&gt;&lt;li&gt;Disadvantages - Intellectually unsatisfying. Keeps player from feeling any tougher, as at the beginning of the game to the end, the can pretty much only take x hits from a even level monster, where x stays constant.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;I'm currently leaning towards the first option, but am unsure right now.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3615004985521510661?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3615004985521510661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3615004985521510661' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3615004985521510661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3615004985521510661'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/problem-with-hp.html' title='The problem with HP...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5533910538890750782</id><published>2010-08-05T07:15:00.000-07:00</published><updated>2010-08-05T07:15:47.241-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>All primary feature work is done for iteration 9, finally...</title><content type='html'>So this morning I finished up the last issues I had targeted for iteration 9 in fogbugz. The release isn't yet ready to go out, as I have to play with the numbers to make the game fun/winnable. However, outside of bug fixes, I should be done make code changes for now.&lt;br /&gt;&lt;br /&gt;I'm hoping that balancing should be "easy" now that I have filled in tech trees and have a reasonable spread of items, but as I've said before &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/07/trouble-with-game-balencing-is-that-it.html"&gt;balancing games&lt;/a&gt; &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/05/balancing-combat-is-hard-lets-go.html"&gt;is hard&lt;/a&gt;. Do any other game developers have trouble balancing stats, abilities, items, and such to make a fun game? Any suggestions on ways to make it easier outside playing the game a bunch and make lots of small tweaks?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5533910538890750782?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5533910538890750782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5533910538890750782' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5533910538890750782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5533910538890750782'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/all-primary-feature-work-is-done-for.html' title='All primary feature work is done for iteration 9, finally...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3864010713826851328</id><published>2010-08-04T18:18:00.000-07:00</published><updated>2010-08-04T18:18:05.831-07:00</updated><title type='text'>Skill Trees "Filled Out"</title><content type='html'>I decided to spend some time "filling out" a few skill trees, and have simple but complete trees for five sub-trees: Arcane, Fire, Light, Martial, Attributes. Each tree has between 7 and 10 node (except martial which has 37), and each node provides a new skill or improves an existing one. I still at some point need to write descriptions for the martial skills, but beyond that the skill tree is done for this iteration.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/TFoQ5Uc5wrI/AAAAAAAAASQ/JM-3URvtlL0/s1600/ArcaneSkillTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/TFoQ5Uc5wrI/AAAAAAAAASQ/JM-3URvtlL0/s400/ArcaneSkillTree.png" width="400" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/TFoQ6hv7MnI/AAAAAAAAASY/N9J0X9OWJwA/s1600/AttributeSkillTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/TFoQ6hv7MnI/AAAAAAAAASY/N9J0X9OWJwA/s400/AttributeSkillTree.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/TFoQ8vgJVaI/AAAAAAAAASg/gvwV7FGso2E/s1600/FireSkillTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/TFoQ8vgJVaI/AAAAAAAAASg/gvwV7FGso2E/s400/FireSkillTree.png" width="400" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/TFoQ9qEMWLI/AAAAAAAAASo/153SPyRntJU/s1600/LightSkillTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/TFoQ9qEMWLI/AAAAAAAAASo/153SPyRntJU/s400/LightSkillTree.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/TFoRD-qJRhI/AAAAAAAAASw/EcDxyNK-U4g/s1600/MartialSkillTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/TFoRD-qJRhI/AAAAAAAAASw/EcDxyNK-U4g/s400/MartialSkillTree.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3864010713826851328?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3864010713826851328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3864010713826851328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3864010713826851328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3864010713826851328'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/skill-trees-filled-out.html' title='Skill Trees &quot;Filled Out&quot;'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/TFoQ5Uc5wrI/AAAAAAAAASQ/JM-3URvtlL0/s72-c/ArcaneSkillTree.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-137206701506974569</id><published>2010-08-01T16:16:00.000-07:00</published><updated>2010-08-01T16:16:00.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><title type='text'>Class vs Struct - It actually can matter</title><content type='html'>So, the second of my optimization realizations today involves the difference between structs and classes. For those who've been with this blog for awhile, you might remember a post I made half a year ago, &lt;a href="http://iferrorthrownewbrick.blogspot.com/2009/12/optimization-ii-when-difference-between.html"&gt;here&lt;/a&gt;. In that post, I realized that a list of structs uses a lot less memory than a list of classes when each item is crazy small and there are a huge number of them.&lt;br /&gt;&lt;br /&gt;Today, I've ran into the inverse. I made Point a struct back when I made that realization, thinking that it was small and therefore memory savings were worth the savings. However, when you stick an item into a dictionary as a key, it apparently makes a copy if it is a struct. It also makes a copy if you query the dictionary with a struct as the key. This meant I could rack up half a million or more point copies by scrolling for 15 seconds in my skill tree. This caused the memory manager to go crazy, and introduce the lag I was seeing. Switching it to a class helped a bunch.&lt;br /&gt;&lt;br /&gt;When should you use struct vs when should you use class? Here's my current huristic:&lt;br /&gt;&lt;br /&gt;If the item is large or you won't be having a crazy huge number of them - Use class, the possible optimization isn't worth it.&lt;br /&gt;If a large number of the items will be stored in memory in a list - Try struct, as you'll save a pointer sized (4 or 8 bytes) amount for each item.&lt;br /&gt;If you will be using it as a key (or value to a lesser extent) in a dictionary - Use a class, as each query on the dictionary and every access will make a copy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-137206701506974569?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/137206701506974569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=137206701506974569' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/137206701506974569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/137206701506974569'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/class-vs-struct-it-actually-can-matter.html' title='Class vs Struct - It actually can matter'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-514484961908008768</id><published>2010-08-01T15:39:00.000-07:00</published><updated>2010-08-01T15:40:29.863-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>GetHashCode's preformance really matters if you use it as a dictionary key alot</title><content type='html'>Just a quick post about a surprisingly small change that improved performance in magecrawl's skill tree view. I have a custom point class since there doesn't exist one inside c# outside of some GUI toolkits I don't want to force dependencies on.Since I overrode Equals, the compiler told me to override GetHashCode. I did so the naive way:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; GetHashCode()&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; X ^ Y ^ &lt;span class="kwrd"&gt;base&lt;/span&gt;.GetHashCode();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;I have a spot in a tight loop that needs to lookup information based upon its position. I was previously using a List with a where LINQ call, which was insanely slow when I scaled up the number of skills. I figured this out using profiling and changed it to a dictionary. However, it was still too slow, so I read up on GetHashCode more and realized I could change GetHashCode for point to read:&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; GetHashCode()&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; X ^ Y;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;I didn't keep track of the numbers, but this very visibly made a huge difference. Keep GetHashCode in mind when you have data structures that are used as keys in large dictionaries. A small change can make a big improvement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-514484961908008768?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/514484961908008768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=514484961908008768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/514484961908008768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/514484961908008768'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/08/gethashcodes-preformance-really-matters.html' title='GetHashCode&apos;s preformance really matters if you use it as a dictionary key alot'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7468895181765447128</id><published>2010-07-28T16:57:00.000-07:00</published><updated>2010-07-28T16:57:09.594-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Iteration 9 and 10 - The new plan</title><content type='html'>So, I'm changing my iteration plans around the release of a video game. Let's just put it out there. &lt;a href="http://en.wikipedia.org/wiki/Final_Fantasy_14"&gt;Final Fantasy 14&lt;/a&gt; is being released September 30th (early access on 22nd), and I am excited enough to pre-order it. Due to that, and the expected week or two post-release that I won't involve much coding, here's the new plan.&lt;br /&gt;&lt;br /&gt;Iteration 9 - Finishes asap. As soon as I get the game balance reasonable, and a spread of items/weapons for the 5 levels of the current dungeon, kick it out of the door. I'm planning on calling it tech demo 3.1 or something similar, just for those readers of the blog who want to see the new stuff.&lt;br /&gt;&lt;br /&gt;Iteration 10 - Get as much done in August and September. Things like diminishing returns, school specific debufs, sound drawing monsters, etc. Also get enough of the small features done that the next "iteration" will be more of a "slice". Something where I create more interesting gameplay content and less concern on the game engine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7468895181765447128?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7468895181765447128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7468895181765447128' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7468895181765447128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7468895181765447128'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/iteration-9-and-10-new-plan.html' title='Iteration 9 and 10 - The new plan'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7846254915098985294</id><published>2010-07-27T19:45:00.000-07:00</published><updated>2010-07-27T19:47:01.333-07:00</updated><title type='text'>Generic can be the enemy of progress</title><content type='html'>As it was said on &lt;a href="http://www.codinghorror.com/blog/2006/04/a-blog-without-comments-is-not-a-blog.html"&gt;coding horror&lt;/a&gt;, "a blog without comments is not a blog". Earlier today Jotaf posted a &lt;a href="https://www.blogger.com/comment.g?blogID=9191282505396518907&amp;amp;postID=854673133420588853"&gt;comment&lt;/a&gt; on my last post that got me thinking. The post was on my work making changes to the skill tree easier, here's the meat of it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif; font-size: small;"&gt;"Nice, I agree completely, although you must always ask yourself the obvious question: "is it worth it?". Since you're gonna change the skill tree many times during balancing the answer is yes. This is almost always true for data-driven gameplay features (ie, stats, skills...). It's almost always not true ("it's not worth it!") for things that are more or less set in stone, like game mechanics, combat, AI, and I've seen many developers getting themselves into an endless loop of refactoring, because you can obviously always make future changes easier by changing your design to be more generic/plugin-driven/offloading more data or logic into external files."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think this is true and in some cases can prevent roguelikes from ever getting completed. Since none of us get paid to work on our pet projects, the temptation is to never set deadlines or abide by them. The desire to make the code "perfect" can make us spent all of our time making the code more generic to the point we're creating a game engine more that game itself. While this can sometimes be successful (&lt;a href="http://www.t-o-m-e.net/main.php?tome_current=0"&gt;ToME&lt;/a&gt; being the most obvious example), for 95% of us it doesn't buy us much.&lt;br /&gt;&lt;br /&gt;If I spend 10 hours refactoring the AI to move it to external files, and then spend only 5 hours tweaking it over the next year, the change was obviously a loss. Even if I save some time, that needs to be balanced by the fact that the code is more complicated. As opposed to a function you can debug, a problem can be in the file parser, the external file itself, the code implementing the behavior expressed in the file, etc.&lt;br /&gt;&lt;br /&gt;I have a few suggestions for other developers based on my experiences with magecrawl that so far have mitigated this issue for me (beyond my general pragmatic attitude).&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Set deadlines, preferably short ones - When you want to finish your iteration in three months, spending a month and a half on something like &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/03/all-your-libtcod-wrapper-are-belong-to.html"&gt;swig'ing libtcod&lt;/a&gt; or converting &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-first.html"&gt;libtcod's build system to cmake&lt;/a&gt;, makes you at least think about the trade off you are making.&lt;/li&gt;&lt;li&gt;Use bug tracking software - I love &lt;a href="http://www.fogcreek.com/FogBugz/"&gt;fogbugz&lt;/a&gt; myself, but the one built into google code or even bugzilla is better than nothing. When you find something you'd like to refactor or make more generic that would take longer than 15 minutes, go add an entry for this or a later iteration and get back to what you were originally working on.&lt;/li&gt;&lt;li&gt;Things that change often or by users should live in external configuration files, things that don't shouldn't - How often are you planning on changing your physics system? Even if you think this'd more more often than once, leave it hard coded for now. After the third time you mess with it, then go make it generic. By the time that third time happens, you'll probably have a better view on what to pull into data files anyway.&lt;/li&gt;&lt;li&gt;You can ignore any of these rules if you want to - beyond the fact that I'm just a random blogger on the internet, you are writing &lt;b&gt;your&lt;/b&gt; game. While I think getting a working game done early is the best way to do things, realize you are doing it for &lt;b&gt;enjoyment&lt;/b&gt;. If spending a year writing a engine that can make toast, run a neural net AI, or show pong on the screen, all with just changing configuration files sounds fun, go get coding.&lt;/li&gt;&lt;/ul&gt;One final node, I love comments on my blog. They are the breakfast of champions. Please feel free to leave them, they make things more interesting around here.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7846254915098985294?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7846254915098985294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7846254915098985294' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7846254915098985294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7846254915098985294'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/generic-can-be-enemy-of-progress.html' title='Generic can be the enemy of progress'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-854673133420588853</id><published>2010-07-25T16:01:00.000-07:00</published><updated>2010-07-25T16:01:30.686-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>When making a type of change in your game is tedious, first fix things so that it isn't anymore</title><content type='html'>So part of my balancing work involved buffing the player's abilities when it makes sense. One way to do this is to add new skills on the skill tree. However, the system I had in place for read/displaying the skill tree made me hesitant to do so, as even a simple change was a lot of work.&lt;br /&gt;&lt;br /&gt;The previous system involved a text file with a grid of ascii characters laying out the exact location for each node, along with a list of positions below to match each one up with the associated skill. If I wanted to add more nodes, I'd have to manually place it, then calculate the offset and write it below. If I needed to make the grid bigger, I'd have to recalculate the offset of every node for that tree. It pretty much never should have gotten submitted in that state, but it was "good enough" for the simple trees I had implemented. The horror can be found &lt;a href="http://code.google.com/p/magecrawl/source/browse/Trunk/GameUI/SkillTree/SkillTreeTab.cs?r=TECH_DEMO_3"&gt;here&lt;/a&gt; for those who are morbidly curious.&lt;br /&gt;&lt;br /&gt;I noticed that all my nodes were in a grid, so I converted each text file into an xml file describing the skill tree. One example can be found &lt;a href="http://code.google.com/p/magecrawl/source/browse/Trunk/dist/Resources/Skill%20Tree/ArcaneSkillTree.xml"&gt;here&lt;/a&gt;. I then wrote the &lt;a href="http://code.google.com/p/magecrawl/source/browse/Trunk/GameUI/SkillTree/SkillTreeTabXMLHelper.cs"&gt;xml reader&lt;/a&gt; and which would generate from the stored information the grid of characters to display on the screen. Overall it took about three hours to write, test, and submit.&lt;br /&gt;&lt;br /&gt;In less time, I probably could have made my balancing changes and "got out" without making things better, but I would have been more likely to not add new skills in the future. Now adding a new skill is as easy as copy pasting an xml node and changing a few lines of text.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-854673133420588853?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/854673133420588853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=854673133420588853' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/854673133420588853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/854673133420588853'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/when-making-type-of-change-in-your-game.html' title='When making a type of change in your game is tedious, first fix things so that it isn&apos;t anymore'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1540359098863817160</id><published>2010-07-24T13:42:00.000-07:00</published><updated>2010-07-24T13:42:58.864-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>"Backgrounds" - The compromise of class selection and skill tree</title><content type='html'>One of the unwritten design guides I've followed in magecrawl has been to not ask the player for choices they can't answer before the game starts. The first time I launch a game and am ambushed by something like this (care of &lt;a href="http://crawl.develz.org/wordpress/"&gt;Crawl Stone Soup&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/TEtKEg4hqDI/AAAAAAAAAR4/LUPSIJRS3XU/s1600/Crawl+Background+Selection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/TEtKEg4hqDI/AAAAAAAAAR4/LUPSIJRS3XU/s640/Crawl+Background+Selection.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I get overwhelmed with choices. What the difference between fighers and gladiators? What is the difference fire/ice/air/earth elementalists? These choices are ones that are difficult to make before playing (multiple) times.&lt;br /&gt;&lt;br /&gt;The reason this came up during my initial balancing effort is that I realized balancing some options were difficult. For example, how much should the heavy armor skill be? I didn't want to start the player with equipment they couldn't use, so by default they'd have to scavenge for at least part of a set before taking the option would make sense. It'd need to be powerful enough that it'd be worth going to all that trouble, but not so broken as that'd be the only logical choice.&lt;br /&gt;&lt;br /&gt;Letting the player choose to use armor/heavy armor before the game makes some sense, as I could start them with a set of said armor at the beginning of the game. I've decided to try to take some of the nice features of crawl's system and pair them down to something more reasonable:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/TEtPnZi9O2I/AAAAAAAAASI/TPehLbRTPII/s1600/Magecrawl+Backgrounds.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="498" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/TEtPnZi9O2I/AAAAAAAAASI/TPehLbRTPII/s640/Magecrawl+Backgrounds.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Opinions? These starting backgrounds would provide the initial equipment and preselect some skills in the skill tree. However, there's nothing to prevent a Templar from selecting skills from a tree and become a ranged attacker, beyond the penalty from using heavy armor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1540359098863817160?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1540359098863817160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1540359098863817160' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1540359098863817160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1540359098863817160'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/backgrounds-compromise-of-class.html' title='&quot;Backgrounds&quot; - The compromise of class selection and skill tree'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/TEtKEg4hqDI/AAAAAAAAAR4/LUPSIJRS3XU/s72-c/Crawl+Background+Selection.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8527438518392455880</id><published>2010-07-23T17:35:00.000-07:00</published><updated>2010-07-23T17:35:29.950-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>Current plans on dealing with game balance, with the first step being spelling it correctly...</title><content type='html'>(Potential bloggers out there, don't write new entries when you are tired or else you might blast everyone's RSS reader with blatant misspellings like my last post) &lt;br /&gt;&lt;br /&gt;So as I mentioned, balancing roguelikes is hard since doing so involves balancing multiple variables (with a significant amount of randomness thrown in). In an effort to motivate myself into finishing this work, I'm writing up a quick post on my decisions and strategy.&lt;br /&gt;&lt;br /&gt;The first variable I focused on was damage output. I decided on a "base" damage an average attack should do, 10d3. For those not initiated in the "d" notation, 10d3 refers to rolling 10 dice with three sides, and summing them all up. 10d3 produces a range of 10-30, with 20 being the center average.&lt;br /&gt;&lt;br /&gt;I chose d3s since they produce a nice range with some variability but don't have extreme variability. 5d6, for example, produces a range of 6-30, which is somewhat close to 10d3's range. However the possible "burst" of a good roll means five times the low roll or twice the average for 5d6, compared to three times the low roll or 1.5 times the average in 10d3.&lt;br /&gt;&lt;br /&gt;Once I had the damage set, I needed to guess how many hit points monsters and players should have. I started with a guess that the average combat should last five to six rounds, which with twenty points being the average round means 100-120 hit points. For the player, I split these up in health, stamina, and bonuses from the average set of equipment I'd guess one would have.&lt;br /&gt;&lt;br /&gt;The next variable is the rate of growth as the game progresses. Magecrawl doesn't have "levels" per say, but I assign an internal level to monsters and items. Each "level" of monster and equipment is currently scheduled to increase in damage and/or stamina by about 25%. This doesn't exactly work, I realized as I wrote the previous paragraph, since the player receives a majority of their hp from their initial stamina and health. Increasing damage monsters do by 50% while increases the stamina bonus of equipment by 50% doesn't even out. Still more to hammer out apparently...&lt;br /&gt;&lt;br /&gt;Now that I have some guesses of numbers, I coded them in and forced the map generator to produce only a single type of monster. I'm planning on playing a good number of games, tweaking the numbers so that I can "win" a decent percentage of the time but not always. Once I have that single pairing balanced, I'll continue with others until I have a good feel on the numbers that are fun....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8527438518392455880?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8527438518392455880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8527438518392455880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8527438518392455880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8527438518392455880'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/current-plans-on-dealing-with-game.html' title='Current plans on dealing with game balance, with the first step being spelling it correctly...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6218842006617915122</id><published>2010-07-20T16:11:00.000-07:00</published><updated>2010-07-20T16:11:36.226-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>The trouble with game balencing is that it is hard....seriously</title><content type='html'>So part of the long delay between this and the last post was a (hopefully?) well deserved break after a mammoth week of coding. However, part of it is related to my lack of progress in balancing the new monster/weapon/quality types. Trying to keep individual fights interesting while keeping ambushes from turning into two turn player-deaths and making it scale after (for now) 5 levels is hard. Like harder than writing the code that allowed it.&lt;br /&gt;&lt;br /&gt;Part of the problem is I want to get rid of the issue I call "rounding-error bonuses". For example, let's say that having a quality weapon improves the damage by 15%. If your sword base damage is 1d4, then 15% is less than 1 point of damage. It'd have effectively no effect. One could solve this by increasing all the numbers by a factor, say 10, then the sword base damage would be 10d4 (10-40) and 15% is on average 3-4 additional damage. Getting these numbers correct, along with making them look reasonable isn't going so well. It seems weird to have the starting sword do 10d3 damage and average swings totaling 18 or more (maybe that is my experience in d&amp;amp;d based roguelikes and games talking).&lt;br /&gt;&lt;br /&gt;Does anyone have a good system or set of tools for figuring this out? Bonus points if it has been proven in a shipping game or one at least farther along than magecrawl...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6218842006617915122?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6218842006617915122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6218842006617915122' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6218842006617915122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6218842006617915122'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/trouble-with-game-balencing-is-that-it.html' title='The trouble with game balencing is that it is hard....seriously'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4362290123663512090</id><published>2010-07-10T20:58:00.000-07:00</published><updated>2010-07-10T20:58:03.545-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 7 - Monsters and thoughts on this week</title><content type='html'>With my commit &lt;a href="http://code.google.com/p/magecrawl/source/detail?r=6d92a78896798be738242819ee371695446b40f1"&gt;here&lt;/a&gt; I'm done with my XML generation changes this iteration. Monsters now have different names that are level dependent, with base stats and some stats that go up each level. The "trait" system has been booted to iteration 10 due to my exhaustion in this area of magecrawl. I need to create some content for items still, item levels for each armor/weapon from 1-6 or so, but otherwise I have the base material for a sane difficulty curve.&lt;br /&gt;&lt;br /&gt;So, if you've read this blog any this week, you probably can tell that I've been busy. With my wonderful wife coming home tomorrow and family in town next weekend, it'll probably be a few weeks before I implement anything major.&lt;br /&gt;&lt;br /&gt;Looking back on this week, I think the fact that I announced my intentions and wrote about them every day was useful. There were days that I didn't want to program, I would have rather played TF2 or Borderlands all night. However, the idea of skipping a day's post or admitting I didn't get anything accomplished pushed me to do some programming. Once I overcame the initial hump of launching Visual Studio, I generally started to enjoy my work.&lt;br /&gt;&lt;br /&gt;In some regards I got less done that I expected, but I think that was due to me vastly underestimating how much work some of my tasks would take. Item generation based on levels took three or four times longer that I would have initially assumed. I think it would have taken even longer if I had to break it up over a week or two's evenings.&lt;br /&gt;&lt;br /&gt;I have 26 items left targeted for this iteration. With the possible exception to my "field" idea for improving monster AI, each of them should involve significantly less work that either the item or monster changes this week. They should be "bite sized" enough to tackle one or two after work some night.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4362290123663512090?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4362290123663512090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4362290123663512090' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4362290123663512090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4362290123663512090'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-7-monsters-and-thoughts-on.html' title='7DOMC - Day 7 - Monsters and thoughts on this week'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1120457098044047424</id><published>2010-07-09T23:27:00.000-07:00</published><updated>2010-07-09T23:27:45.208-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 6 - I thought I was done with items, but I made them better.</title><content type='html'>So on day three I said I was done with the item rewrite. While this was a true statement, I realized today that there was one way I could improve items even more. The current system had each material list the base stats for a weapon/armor made of it. Something roughly:&lt;br /&gt;&lt;br /&gt;Wood Club - 3d3&amp;nbsp; CTCost=1.0&lt;br /&gt;Iron Sword - 4d6 CTCost=1.25 &lt;br /&gt;Cloth Armor -&amp;nbsp; +5 stamina&lt;br /&gt;&lt;br /&gt;The issues is that I had to list out each statistic for each material. If I know that say leather is 20% more stamina than cloth (the base type), I'd need to calculate that and put both values into the XML. If I decided to increase the base later, I'd need to update all the values again.&lt;br /&gt;&lt;br /&gt;To fix this, I now have materials list a percentage or linear amount better they are than base. For example, Wood adds 1d3 damage and leather adds 20% more stamina than base. If I update the base values, the change will propagate to all armors/weapons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1120457098044047424?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1120457098044047424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1120457098044047424' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1120457098044047424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1120457098044047424'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-6-i-thought-i-was-done-with.html' title='7DOMC - Day 6 - I thought I was done with items, but I made them better.'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7526509348466039387</id><published>2010-07-09T21:44:00.000-07:00</published><updated>2010-07-09T21:46:55.011-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='i18n'/><title type='text'>C# - The dangers of int.Parse() on non-english systems</title><content type='html'>I ran into this issue in a similar for way back in January &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/01/non-english-operating-systems.html"&gt; here&lt;/a&gt;, but I stumbled upon in again today and I figured another post wouldn't be a bad idea. &lt;br /&gt;&lt;br /&gt;This simple function&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;double&lt;/span&gt; ParseString(&lt;span class="kwrd"&gt;string&lt;/span&gt; s)&lt;br /&gt;{&lt;br /&gt;     &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(s);&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;is a timebomb waiting for one of your fans or customers to run into if s comes from a a source that isn't translated into the specific language. For my C/C++ fans, int.Parse() is similar to atoi() with a twist we're about to get to.&lt;br /&gt;&lt;br /&gt;My part of the world uses a period to separate the whole from the fractional part of a number, "10.0", other parts of the world uses a comma, "10,0". C# will helpfully use the latter on systems who's language is set to be one that uses this system. This can wreck you, if for example, the string comes from xml data files that you don't want to change for each language.&lt;br /&gt;&lt;br /&gt;There are two solutions. The simplest is to rewrite the function as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;double&lt;/span&gt; ParseString(&lt;span class="kwrd"&gt;string&lt;/span&gt; s)&lt;br /&gt;{&lt;br /&gt;     &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(s, CultureInfo.InvariantCulture);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;That will use the "standard" english system of period for decimal seperate.&lt;br /&gt;&lt;br /&gt;The second is one that works if you are about to do some operation that is going to call Parse a large number of times (e.g. Save/Load).&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;double&lt;/span&gt; ParseString(&lt;span class="kwrd"&gt;string&lt;/span&gt; s)&lt;br /&gt;{&lt;br /&gt;     &lt;span class="rem"&gt;// Save off previous culture and switch to invariant for serialization.&lt;/span&gt;&lt;br /&gt;     CultureInfo previousCulture = Thread.CurrentThread.CurrentCulture;&lt;br /&gt;     Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;&lt;br /&gt;&lt;br /&gt;     &lt;span class="kwrd"&gt;double&lt;/span&gt; result = &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(s, CultureInfo.InvariantCulture);&lt;br /&gt;&lt;br /&gt;     Thread.CurrentThread.CurrentCulture = previousCulture;&lt;br /&gt;&lt;br /&gt;     &lt;span class="kwrd"&gt;return&lt;/span&gt; result;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Just be careful that if you expect your code inside the culture setting blocks to throw an exception that you plan to survive from, to rewrite this to use finally so that it always happens.&lt;br /&gt;&lt;br /&gt;Now I have to go check every Parse() and fix up the ones that don't happen inside a save/load call...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7526509348466039387?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7526509348466039387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7526509348466039387' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7526509348466039387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7526509348466039387'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/c-dangers-of-intparse-on-non-english.html' title='C# - The dangers of int.Parse() on non-english systems'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3634260988216375158</id><published>2010-07-08T21:36:00.000-07:00</published><updated>2010-07-08T21:38:43.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 5 - Monsters AI changes wrapping up</title><content type='html'>So, all the great AI work that I did a few iterations back can be distilled into this chunk of code now:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;switch&lt;/span&gt;(typeName)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;"Bruiser"&lt;/span&gt;:&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DoubleSwingTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DefaultTactic());&lt;br /&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;"Healer"&lt;/span&gt;:&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; UseFirstAidTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; MoveToWoundedAllyTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DefaultTactic());&lt;br /&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;"Ranged"&lt;/span&gt;:&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; KeepAwayFromMeleeRangeIfAbleTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; UseSlingStoneTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; KeepAwayFromPlayerIfAbleTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; PossiblyRunFromPlayerTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; WaitTactic());&lt;br /&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;"Sprinter"&lt;/span&gt;:&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; RushTactic());&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DefaultTactic());&lt;br /&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span class="kwrd"&gt;default&lt;/span&gt;:&lt;br /&gt;                    tactics.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DefaultTactic());&lt;br /&gt;                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;            }&lt;/pre&gt;&lt;br /&gt;I obviously plan on pulling this out into an XML list or something similar, and add more intelligent "tactics" so I can make the AI even smarter. One idea I had would have slingers who don't have a line of sight for a shot to move to one more likely.  Another would have healers find bruisers and stay togeater, kinda like heavies and medics in TF2.&lt;br /&gt;&lt;br /&gt;Now that I have a "flat" monster hierarchy, I need to write generators similar to the ones I wrote for items that'll create level dependent monsters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3634260988216375158?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3634260988216375158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3634260988216375158' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3634260988216375158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3634260988216375158'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-5-monsters-wrapping-up.html' title='7DOMC - Day 5 - Monsters AI changes wrapping up'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4448987984439987686</id><published>2010-07-07T17:56:00.000-07:00</published><updated>2010-07-07T21:04:09.913-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 4 - Planning and Monsters</title><content type='html'>So, after the craziness of the last two days, today is a bit more subdued. Part of that is a bit of burnout and part of it is busyness at work.&lt;br /&gt;&lt;br /&gt;Even with the work {I've/I'm going to} accomplish, my chosen tasks for iteration 9 were a bit much. I pushed back 12 minor features to another iteration, giving me 28 total. For those doing math, that doesn't exactly add up to previous posts, which is due to me splitting a few tasks up into smaller bites.&lt;br /&gt;&lt;br /&gt;Speaking on smaller bites, I'm working on refactoring monsters completely as well. I want them to be more attribute based, like skills and items, and have more flexible behavior. Since they touch a smaller portion of the code base, I'm doing my refactoring in smaller bit sized pieces. &lt;br /&gt;&lt;br /&gt;Update -&lt;br /&gt;So I'm not done yet, but here's the jist of it.&lt;br /&gt;&lt;br /&gt;There is a set of tactics, which are discrete single actions that could or could not be preformed. Each tactics can be asked if it could apply now and ask to do it. Then a loop like this runs:&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;            m_tactics.ForEach(x =&amp;gt; x.NewTurn(&lt;span class="kwrd"&gt;this&lt;/span&gt;));&lt;br /&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (IMonsterTactic tactic &lt;span class="kwrd"&gt;in&lt;/span&gt; m_tactics)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (tactic.CouldUseTactic(engine, &lt;span class="kwrd"&gt;this&lt;/span&gt;))&lt;br /&gt;                {&lt;br /&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (tactic.UseTactic(engine, &lt;span class="kwrd"&gt;this&lt;/span&gt;))&lt;br /&gt;                        &lt;span class="kwrd"&gt;return&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;/pre&gt;&lt;br /&gt;Each monster would have a set of possible tactics, for example, my healer AI can be stated as: UseFirstAidTactic, MoveToWoundedAllyTactic, DefaultActionTactic.&lt;br /&gt;&lt;br /&gt;Each tactic setups the required attributes on the Attributes dictionary of the monster, which are serialized, so things are remembered past save/load like the cooldown on the first aid ability.&lt;br /&gt;&lt;br /&gt;The cute thing about this is once i code up a great new behavior, I can slip it in the monster behavior list and it'll start acting that way. Once I'm "done", I'm going to be pulling the list of behaviors a given monster has out to XML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4448987984439987686?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4448987984439987686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4448987984439987686' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4448987984439987686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4448987984439987686'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-4-planning-and-monsters.html' title='7DOMC - Day 4 - Planning and Monsters'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8090461539704030905</id><published>2010-07-06T17:16:00.000-07:00</published><updated>2010-07-06T17:16:46.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 3 - The item rewrite is done...finally.</title><content type='html'>So the patch I submitted was six thousand lines long, and took a grueling day of coding yesterday and half a day today cleaning up loose ends, but it's &lt;a href="http://code.google.com/p/magecrawl/source/detail?r=f82f6021da655ddc7febfebf3a60f822280e6e24"&gt;done&lt;/a&gt;. Much of the work involved moving a hierarchy of classes that defined weapon, armor, and consumable types into a flatter set of classes that allowed more dynamic changes.&lt;br /&gt;&lt;br /&gt;A quick overview of the way I generate items follows:&lt;br /&gt;&lt;br /&gt;For armor/weapons:&lt;br /&gt;We start with an expected item "level", determining how "good" the item should be. We first calculate a quality grade, which falls from -2 to +4 on a normal distribution. We then determine how many "levels" we have left to choose the material. Each material, for example wood, iron, or leather, states what items can be made of it and what their properties are. Some materials have higher level modifiers, so a bronze would be lower level than say cold-forged iron. The material determines the base damage/speed/protection of the item, while the quality increases or decreases it by percentages.&lt;br /&gt;&lt;br /&gt;For potions/scrolls/wands.&lt;br /&gt;&lt;br /&gt;A slightly different approach is taken. An effect is first determined, using the requested level item as a range to select from. Wands cut the level in half, since they allow the effect to be produced multiple times. For any left over levels we increase either the caster level of the effect (for potions/scrolls) or the number of charges in wands.&lt;br /&gt;&lt;br /&gt;I still need to implement the bulk of the content, for example material types for each weapon&amp;nbsp; varying over the ranges, and a ton of playtesting to find bugs and determine values for each material/quality. However, the coding for this headlining feature is done. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8090461539704030905?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8090461539704030905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8090461539704030905' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8090461539704030905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8090461539704030905'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-3-item-rewrite-is-donefinally.html' title='7DOMC - Day 3 - The item rewrite is done...finally.'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5452981979376343682</id><published>2010-07-05T10:39:00.000-07:00</published><updated>2010-07-05T23:01:38.895-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 2 - The great item rewrite</title><content type='html'>My first task today has been completed, which is moving all the skills to use the new attribute based system detailed &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/06/generic-system-for-implementing-skills.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I looked at doing the same with items, when I realized that I'm going to have to rewrite pretty much my entire item hierarchy to do things right. I ripped out (with a backup copy for reference) all the item, armor, and weapon classes from the game engine, and commented out or "throw new System.NotImplementedException()"'ed all the code using them. Now I can start again from scratch and when the diffs show no commented out code, I'll be back where I started.&lt;br /&gt;&lt;br /&gt;I very rarely try a rip out and rewrite. In general, I find a set of small incremental changes work best. However, the shear size of the item hierarchy was daunting to say the least. We'll see how this goes, I'll update later.&lt;br /&gt;&lt;br /&gt;Update 1 (10 hours later)&lt;br /&gt;&lt;br /&gt;So I have the weapon system up again. I've got generated weapons of various qualities and materials. The weapons damage is base speed comes from the material, with the quality affecting things as well. Descriptions are built up from the various parts, along with the names. Save/load works again for weapons. Much of the work was creating a brand new hierarchy for weapons, and the generator for materials and quality.&lt;br /&gt;&lt;br /&gt;I'm hoping to get armor up quickly now that I have this base. Then I need to rework consumables, such as potions/scrolls/wands.&lt;br /&gt;&lt;br /&gt;Update 2 (1 hour later)&lt;br /&gt;Armor works, with quality, materials and the like. Now onto consumables.&lt;br /&gt;&lt;br /&gt;Update 3 (1 1/2 hours later)&lt;br /&gt;Obviously things are taking longer than I'd expect. I'm almost all the way through consumables but I'll have to wait for tomorrow to finish up and submit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5452981979376343682?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5452981979376343682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5452981979376343682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5452981979376343682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5452981979376343682'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-2-great-item-rewrite.html' title='7DOMC - Day 2 - The great item rewrite'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2444105593145229553</id><published>2010-07-04T19:33:00.000-07:00</published><updated>2010-07-04T19:33:22.147-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>7DOMC - Day 1 Status</title><content type='html'>I'm winding down for the night, and I'm pretty happy what I accomplished today. Here's what I accomplished today:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/07/will-penguin-in-room-please-stand-up.html"&gt;Magecrawl for Linux&lt;/a&gt; - This single task involved hours of work. &lt;a href="http://en.wikipedia.org/wiki/Rpath_%28linking%29"&gt;rpath's&lt;/a&gt; still leave a bad taste in my mouth.&lt;/li&gt;&lt;li&gt;14 open tasks - I went from around 51 open items to 37. Some of these work items were tiny, while others involve entire features, so you can't say that I'm 27% complete however.&amp;nbsp;&lt;/li&gt;&lt;li&gt;One of those open tasks required me bringing some sanity to how MagicEffectsEngine::DoEffect outputted text to the log. It look awhile, but now looking at that file no longer makes me wince.&lt;/li&gt;&lt;/ul&gt;However, other that the Linux task, I didn't touch any of my head lining features.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/TDFENKkVgZI/AAAAAAAAARw/SrRzzP1XnIQ/s1600/Iteration+9+Tasks.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/TDFENKkVgZI/AAAAAAAAARw/SrRzzP1XnIQ/s640/Iteration+9+Tasks.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There is still much to be done this iteration (and this week).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2444105593145229553?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2444105593145229553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2444105593145229553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2444105593145229553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2444105593145229553'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-day-1-status.html' title='7DOMC - Day 1 Status'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/TDFENKkVgZI/AAAAAAAAARw/SrRzzP1XnIQ/s72-c/Iteration+9+Tasks.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-193827146288543716</id><published>2010-07-04T11:27:00.000-07:00</published><updated>2010-07-04T11:27:22.191-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='7DOMC'/><title type='text'>Will the penguin in the room please stand up...</title><content type='html'>Magecrawl now works on Linux again. You'll need a new copy of mono (one that isn't released yet but will be before my next release), but it works!&lt;br /&gt;&lt;br /&gt;For those who care about the bad things I had to do to make this work, read on...&lt;br /&gt;&lt;br /&gt;So, the major issues were causing problems was the libtcod-net-unmanaged library was not working as expecting.&lt;br /&gt;&lt;br /&gt;The first issues was both mac and linux wanted to create a library called libtcod-net-unmanaged.so. I modified the make files to create to new files and used &lt;a href="http://www.mono-project.com/Config_DllMap"&gt;mono's dllmap&lt;/a&gt; to &lt;a href="http://code.google.com/p/magecrawl/source/browse/Trunk/dist/libtcod-net.dll.config"&gt;point the right platform to the right binary&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once I fixed that, I was getting missing symbol errors. I had forgotten that libtcod.so doesn't have the C++ symbols under Linux. I linked against libtcodxx.so, copied that in, and fixed that.&lt;br /&gt;&lt;br /&gt;The final issue, which took three of four hours to solve, invoked this bug in &lt;a href="http://www.itk.org/Bug/view.php?id=8992"&gt;cmake&lt;/a&gt;. I had to use an internal "don't use this, it could break on new versions" macro to work around it. The code in question is:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IF(UNIX)&lt;br /&gt;     SET_TARGET_PROPERTIES(${SWIG_MODULE_${CSHARP_LIB_NAME}_REAL_NAME} PROPERTIES LINK_FLAGS "-Wl,-rpath,.")&lt;br /&gt;ENDIF()&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;with SWIG_MODULE_${NAME}_REAL_NAME being the forbidden fruit.&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-193827146288543716?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/193827146288543716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=193827146288543716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/193827146288543716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/193827146288543716'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/will-penguin-in-room-please-stand-up.html' title='Will the penguin in the room please stand up...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8210401447914355874</id><published>2010-07-03T21:27:00.000-07:00</published><updated>2010-07-03T21:27:41.215-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>7DOMC - Seven days of magecrawl coding</title><content type='html'>As I mentioned in my previous post, I have a huge list of things I'd like to accomplish in magecrawl in the short term. It just happens to be such that my wonderful wife is going to be visiting friends out of state until next Sunday. Combine this with a Monday/Tuesday holiday off work, and I have a significant amount of free time this week.&lt;br /&gt;&lt;br /&gt;My hope is to stay productive (not just play Eve online and TF2) for most of the upcoming week. We'll see how much I get accomplished. I'll be posting updates as the week progresses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8210401447914355874?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8210401447914355874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8210401447914355874' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8210401447914355874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8210401447914355874'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/7domc-seven-days-of-magecrawl-coding.html' title='7DOMC - Seven days of magecrawl coding'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6334776087537890656</id><published>2010-07-02T22:40:00.000-07:00</published><updated>2010-07-02T22:40:05.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>"Iteration", I don't think that means what I think it means...</title><content type='html'>So I have some time next week to work on magecrawl, and so I'm looking at my task list and realizing I currently have a &lt;b&gt;ton &lt;/b&gt;of things targeted for iteration 9. Ignore the bug fixing and corner cases issues, I have these high level goals currently:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create level dependent items and monsters&lt;/li&gt;&lt;li&gt;Refactor how skills and items are handled to combine with new traits for monsters&lt;/li&gt;&lt;li&gt;More effect work, including debuffs specific to various schools attack spells.&lt;/li&gt;&lt;li&gt;"Field" effect to model sound/smell to make monsters seem more realistic.&lt;/li&gt;&lt;/ul&gt;In addition to this, I currently have 51 open issues targeted to iteration 9. Some of these issues are minor, but some include creating new classes of items, major new spell types, and other significant chunks of work.&lt;br /&gt;&lt;br /&gt;I'll talk about my short term programming goals later this weekend, but the short answer is unless I seriously knock a lot of this work out soon, I'm going to have to punt on stuff to an iteration10 or have a bloated schedule.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6334776087537890656?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6334776087537890656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6334776087537890656' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6334776087537890656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6334776087537890656'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/07/iteration-i-dont-think-that-means-what.html' title='&quot;Iteration&quot;, I don&apos;t think that means what I think it means...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-598883633904554867</id><published>2010-06-21T20:02:00.000-07:00</published><updated>2010-07-02T13:55:01.482-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>A generic system for implementing skills, traits, and item bonuses...</title><content type='html'>I know the title is a mouthful, but if beyond it is an idea I'm excited about. Like most ideas, it came to me when I was doing something other than programming.&lt;br /&gt;&lt;br /&gt;This iteration I'm planning on implementing varying difficulty monsters and hopefully items of varying strengths. In my previous post, I suggested using a "trait" system to implement some of the monster characteristics. For example, one wolf might be "fast"-er or "strong"-er than another, trading that off against some additional base attributes. In my head I hoped to sneak in items with enchantments; a sword that could make you tougher or a staff that made you case spells better.&lt;br /&gt;&lt;br /&gt;It came to me that both of these use cases are very similar to the skill tree attributes I implemented last iteration. Those skills could increase base stats or allow new skills. As a programmer, when I hear of three different implementations of an idea, I get an itch to make a generic framework or factor out the pattern or something.&lt;br /&gt;&lt;br /&gt;The crux of the idea is that all of these ideas can be implemented as a system of tags and values. For example, a skill that increases the characters base hitpoints by 5 could be:&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;m_player[&lt;span class="str"&gt;"HPBonus"&lt;/span&gt;] = 5;&lt;/pre&gt;&lt;br /&gt;Then to calculate the number of hitpoints in this simple example one can do something like:&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Player&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; GetSkillTags(&lt;span class="kwrd"&gt;string&lt;/span&gt; tagName)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;int&lt;/span&gt; total = 0;&lt;br /&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt;(ISkill s &lt;span class="kwrd"&gt;in&lt;/span&gt; Skills)&lt;br /&gt;    {&lt;br /&gt;         &lt;span class="kwrd"&gt;if&lt;/span&gt;(s.attributes.Contains(tagName))&lt;br /&gt;             total += s.attributes[tagName];&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt;(IItem i &lt;span class="kwrd"&gt;in&lt;/span&gt; Equipment)&lt;br /&gt;    {&lt;br /&gt;         &lt;span class="kwrd"&gt;if&lt;/span&gt;(i.attributes.Contains(tagName))&lt;br /&gt;             total += s.attributes[tagName];&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; total;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Monster&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; GetSkillTags(&lt;span class="kwrd"&gt;string&lt;/span&gt; tagName)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;int&lt;/span&gt; total = 0;&lt;br /&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt;(Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, &lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt; d &lt;span class="kwrd"&gt;in&lt;/span&gt; Traits)&lt;br /&gt;    {&lt;br /&gt;         &lt;span class="kwrd"&gt;if&lt;/span&gt;(d.Contains(tagName))&lt;br /&gt;             total += d[tagName];&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; total;&lt;br /&gt;} &lt;/pre&gt;&lt;br /&gt;Once I implement a given skill or trait checking in one section of the game engine using this API, creating a new skill, item attribute, or monster trait to do the same thing is trivial. Also, since checking if a dictionary contains a key is fast, it should be efficient as well.&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-598883633904554867?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/598883633904554867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=598883633904554867' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/598883633904554867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/598883633904554867'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/06/generic-system-for-implementing-skills.html' title='A generic system for implementing skills, traits, and item bonuses...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5682490333976870236</id><published>2010-06-20T20:41:00.000-07:00</published><updated>2010-06-20T20:41:31.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Crossplatform'/><title type='text'>MEF is now cross platform friendly, kinda</title><content type='html'>So in February I &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/crossplatform-issues-with-mef-preview-8.html"&gt;noted&lt;/a&gt; some attempts at using &lt;a href="http://en.wikipedia.org/wiki/Managed_Extensibility_Framework"&gt;MEF&lt;/a&gt; and the disappointment that it was Windows only at the time. MEF in short is a way to break up your C# application into smaller pieces that are loosely connected.&lt;br /&gt;&lt;br /&gt;Since multiple of the tasks I have for iteration 9 involve refactoring, I figured I'd take a look at MEF again and see if it is in better shape. The short answer answer is that it works with mono, but only in their development branch. A kind fellow in the mono IRC channel pointed me to a copy he built of &lt;a href="http://code.google.com/p/magecrawl/source/browse/Trunk/dist/System.ComponentModel.Composition.dll"&gt;System.ComponentModel.Composition.dll&lt;/a&gt; that I could use. It works under Windows, Mac, and Linux. &lt;br /&gt;&lt;br /&gt;In the next release of Mono it seems likely that this will be built into the .NET 4 client profile, but packaging a single assembly along with your application seems to be an easy solution for now.&lt;br /&gt;&lt;br /&gt;Once I break up magecrawl into smaller components, I'm planning on making another post describing MEF and showing how I used it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5682490333976870236?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5682490333976870236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5682490333976870236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5682490333976870236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5682490333976870236'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/06/mef-is-now-cross-platform-friendly.html' title='MEF is now cross platform friendly, kinda'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8552997017504488113</id><published>2010-06-19T17:24:00.000-07:00</published><updated>2010-06-19T17:24:24.880-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration9'/><title type='text'>Iteration 9 - "Levels" and polish</title><content type='html'>So, I haven't had the time I wanted to work on magecrawl this week, but the ideas keep coming. I have over 50 major/minor/bug fixes I wish I could get into this iteration. Before an iteration, I try to come up with a "theme" tying together what I hope to accomplish in the next few months. This iteration (9), the theme is "Levels and polish". It also may be the last iteration before I move onto the next stage of my development plan.&lt;br /&gt;&lt;br /&gt;The "levels" in the theme refer to varying levels of difficulty in challenges, not different floors connected by stairs (which I already have). For example, the wolf that attacks you at the very beginning of the game should be different than the wolf pack that hounds you a few levels later when you have better equipment and skills. The quality of treasure should also vary based on depth.&lt;br /&gt;&lt;br /&gt;My current idea is to create an engine that creates these monsters and items on the fly. For example, asking for a level 3 monster could create a fast (+1 lv, 25% faster), strong (+1 lv 25% dmg) base kobold (base creature). Or it could create a experience goblin (+2 stat levels). A combination of traits (such as fast, strong, special abilities) and stat levels (more hp, etc). A similar system would exist for items, so creating a level 5 sword could return a masterwork wooden sword or a crude iron sword. Each quality grade and material would contribute to the effective level of the item, along with any enchantments. &lt;br /&gt;&lt;br /&gt;I think this system should help me balance magecrawl's difficult curve. Manually creating monster and item stats based on paper calculations is difficult and time consuming.&lt;br /&gt;&lt;br /&gt;In addition to "levels", I have a huge number of polish issues that I'd like to implement. They range from the status effect ideas I listed &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/06/status-effects-20.html"&gt;here&lt;/a&gt; to internal refactoring to improving monster AI.&lt;br /&gt;&lt;br /&gt;As I mentioned, this might be the last "iteration" of magecrawl. I think I laid this out on some other post, but finding it escaped me. The idea of iterations are to fill out functionality needed in the game engine and GUI needed for a "real" game. After I feel like I have enough functionality, I'm planning on moving to "slices". Slice would be a portion of the full planned game, from top to bottom. For example, the first slice could be implementing the entire fire skill tree and all its spells, and flushing out sections of the dungeon. The game itself would be a full (albeit shallow) game. After releasing that, I'd take another slice of say the water tree and more dungeon sections. &lt;br /&gt;&lt;br /&gt;Well I should get off to coding...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8552997017504488113?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8552997017504488113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8552997017504488113' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8552997017504488113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8552997017504488113'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/06/iteration-9-levels-and-polish.html' title='Iteration 9 - &quot;Levels&quot; and polish'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3802539383597125756</id><published>2010-06-12T09:23:00.000-07:00</published><updated>2010-06-12T09:23:22.239-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='status effects'/><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Status Effects 2.0</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;The initial implementation of status effects, the one you may have seen in the first three tech demos of magecrawl, was almost an exact reimplementation of the model used in &lt;a href="http://crawl.develz.org/wordpress/"&gt;&lt;span style="color: #053bee; text-decoration: underline;"&gt;crawl&lt;/span&gt;&lt;/a&gt;. Effects when cast have a length (in turns or ticks or whatever) at which time they disappear. Some effects are positive, some are negative. If you have a positive effect (say haste) that you want to have on you permanently, you need to recast it was it expires. Some games automate this step, but in the end it is the same model.&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;While simple and easy, I don't really like this model for magecrawl. Mages in books and legend sometimes were wrapped in layers of magical protection, and the idea that you need to stop walking every five minutes to recast all your buffs seems silly. I'm stealing a page from dragon age, and separating effects into two orthogonal categories: length and type.&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Sustained effects (long term) are ones that persist until canceled, however have a continuing cost. My current implementation reduces the player's maximum MP by an amount for each effect that persists. This provides a nice trade off; keep no effects up and have access to your entire mana pool, keep some up and have only part, or keep a bunch up and be able to maybe only cast one spell.&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Temporary effects are effects that use the traditional effect model of a deadline time and no additional cost while in effect. Unlike sustained effects, where having a sustained negative effect doesn't make sense, temporary effects can be positive or negative in nature. Positive effects that are too powerful or come from items could be temporary.&amp;nbsp;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Another status effect idea I had, which I haven't implemented yet, are school specific debufs for common attack spells. An simple example would be the school of fire. Fire attack spells could have a chance to apply a "burning" negative status effect upon targets. Some spells (like sticky flames) might have a higher chance to apply effects than others. In the case of burning, it would do damage over time to the target. If attacked by any water or ice damage damage, the effect would end early.&amp;nbsp;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Some effects I have in mind would reduce damage taken by some schools and increase others (e.g. being frozen reduces fire damage but a good earth spell would shatter the target nicely).&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Effects might be a trait added on by skills in the skill tree, so the initiates fireblast might do damage but not be powerful enough to set things on fire. It also brings up the possibility of branches in the skill tree, where some could specialize in damage over time or status effects while others specialize in raw power.&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 19.0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font: 16.0px Times; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;I think status effects will be on the areas I focus on for this iteration. I think it can be used to bring out a lot of flavor and interesting choices in magecrawl.&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3802539383597125756?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3802539383597125756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3802539383597125756' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3802539383597125756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3802539383597125756'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/06/status-effects-20.html' title='Status Effects 2.0'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3904628042423537553</id><published>2010-06-09T18:53:00.000-07:00</published><updated>2010-06-09T18:53:39.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>What I've been up to the last few weeks...</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/TBBDgkldNTI/AAAAAAAAARk/nwv0O_zTWoU/s1600/Russia.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/TBBDgkldNTI/AAAAAAAAARk/nwv0O_zTWoU/s320/Russia.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the age of &lt;a href="http://pleaserobme.com/"&gt;please rob me&lt;/a&gt;&amp;nbsp;and other such sites that make it easy to find people's home location, stating online that I was going to take a 10 day trip out of the country didn't seem like a good idea. Hence the "things are going to be crazy" excuse. My trip to Russia was wonderful if your are curious.&lt;/div&gt;&lt;br /&gt;Given the 12 hour flight both ways, I did get some hacking on magecrawl done. I refactored and redesigned how status effects work. I'll get around to writing it up as a long post hopefully this week.&lt;br /&gt;&lt;br /&gt;Now that I am back, and mostly recovered from jet lag, more forward progress on magecrawl seems likely. I have an idea list a mile long I need to enter into &lt;a href="http://www.fogcreek.com/fogbugz/"&gt;fogbugz&lt;/a&gt;, and I need to come up with a high level plan of what I'm going to accomplish this iteration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3904628042423537553?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3904628042423537553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3904628042423537553' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3904628042423537553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3904628042423537553'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/06/what-ive-been-up-to-last-few-weeks.html' title='What I&apos;ve been up to the last few weeks...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/TBBDgkldNTI/AAAAAAAAARk/nwv0O_zTWoU/s72-c/Russia.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4936221100223071070</id><published>2010-05-25T19:55:00.000-07:00</published><updated>2010-05-25T19:55:03.473-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Magecrawl Tech Demo III release for Windows/Mac</title><content type='html'>Magecrawl Tech Demo III is available for download. The difficulty is a bit harder that I would have liked, but should be playable. You can find it for Windows and Mac &lt;a href="http://code.google.com/p/magecrawl/downloads/list"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The new features compared to the last release include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/05/skill-tree-complete-for-iteration-8.html"&gt;Skill Tree&lt;/a&gt;  - This is the headlining feature of this release.&lt;/li&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/04/magecrawl-on-mac-part-i-announcement.html"&gt;Mac Support!&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/targetting-bump-to-attack-and-players.html"&gt;Preferences for keyboard mappings with presets for arrow/vim/numberpad.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/lightning-bolts-fireballs-and-blasts-of.html"&gt;Overlays for multiple targetted effects (Spells like fireball, lightning bolt, and cone of sparks).&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/05/magecrawl-title-screen.html"&gt;Welcome Screen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Plenty of bug fixes and crash fixes.&lt;/li&gt;&lt;/ul&gt;To play magecrawl, a few dependencies need to be installed.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;For Windows - the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&amp;amp;displaylang=en"&gt;.NET 3.5 runtime&lt;/a&gt; is all that is needed. &lt;/li&gt;&lt;li&gt;For Mac - Install &lt;a href="http://www.go-mono.com/mono-downloads/download.html"&gt;mono&lt;/a&gt;, &lt;a href="http://www.libsdl.org/release/SDL-1.2.14.dmg"&gt;SDL&lt;/a&gt;, and &lt;a href="http://ethan.tira-thompson.org/Mac_OS_X_Ports_files/libpng%20%28universal%29.dmg"&gt;libpng&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Since libtcod uses .dylibs for mac, the dependent frameworks need to be installed, not next to the program. I think there is a way around this, but I haven't had time to look into it.&lt;/li&gt;&lt;li&gt;On some mac laptops the default resolution will place magecrawl overlapping the dock.&amp;nbsp; Two workarounds for this include setting the dock to auto-hide or uncommenting the line in Preferences.xml "&lt;fullscreen&gt;True&lt;/fullscreen&gt;" so that magecrawl will run full screen.&lt;/li&gt;&lt;li&gt;To run open a terminal to the folder you unziped, and run "mono MageCrawl.exe"&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;If magecrawl happens to crash, a file called DebuggingLog.txt should be created in the magecrawl directory. Please note that this release is using an SVN version of libtcod, so be forgiving of any issues that crop up. Please send that file along with any description of the issue to chris dot hamons at gmail dot com.&lt;br /&gt;&lt;br /&gt;I'm sure there are some Linux fans out there that are wondering why Linux got left in cold. The short answer is that I ran into a last minute issue preventing the new SWIG'ed libtcod from working on my test vmware. As I won't get much time to work on it for the next two weeks, it was either delay the entire release or skip Linux. &lt;br /&gt;&lt;br /&gt;I'd love to hear feedback on Magecrawl; the good, the bad, and the flames about using .NET and how it made your goldfish sick. Send them to: chris dot hamons at gmail dot com&lt;br /&gt;&lt;br /&gt;Things are going to be be pretty crazy personally for the next two weeks, so if you comment on a post or send me feedback/bug reports, please forgive the long reply times. Once I get past the next two weeks, I should be back on starting for iteration 9.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4936221100223071070?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4936221100223071070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4936221100223071070' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4936221100223071070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4936221100223071070'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/magecrawl-tech-demo-iii-release-for.html' title='Magecrawl Tech Demo III release for Windows/Mac'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6432241746342848992</id><published>2010-05-21T21:05:00.000-07:00</published><updated>2010-05-21T21:05:27.813-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Balancing'/><title type='text'>Balancing combat is hard,  Let's go shopping!</title><content type='html'>It is amazing how difficult it is to balance the numbers that underlay combat. I've been messing them for a few hours now, and I have the game currently somewhere between &lt;a href="http://crawl.develz.org/wordpress/"&gt;Crawl&lt;/a&gt; and the "Nightmare" difficulty in doom. I can't get past the first level most of the time, so it needs some toning down obviously. A few thoughts:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Splitting HP into a regenerating and non-regenerating part is working great. For me, it makes the initial part of combat not-painful, as I don't feel like I'm burning non-replaceable resources (if hp didn't regenerate). As combat continues, it gives me a reason to finish quickly as soon as I get near the end of my stamina bar. If I let it continue past that, I start taking damage that won't regenerate easily.&lt;/li&gt;&lt;li&gt;Right now, allowing the player to rest after combat along with tough monsters makes the game feel like you're the little guy against the big army. You have to slink away after taking a guy or two down and rest before more find you. I've caught myself finding corners and cracks in the wall to press myself against before I hit '/' to rest to decrease the chance of a wondering monsters from finding me mid-heal.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In the next iteration, I have a rough idea how to model things like sound, smell, and visual changes due to battle. That will make monsters even more likely to stumble upon the player while he's resting. I'll have to tie that along with a system to keep some enemies grouped up, so groups don't turn into hide around a corner and pick one off at a time.&amp;nbsp; &lt;/li&gt;&lt;li&gt;I've been tempted to go play a video game tonight instead of doing the work on my own, hence the title. For those who don't get the humor of the title, see &lt;a href="http://itre.cis.upenn.edu/%7Emyl/languagelog/archives/002892.html"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6432241746342848992?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6432241746342848992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6432241746342848992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6432241746342848992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6432241746342848992'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/balancing-combat-is-hard-lets-go.html' title='Balancing combat is hard,  Let&apos;s go shopping!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1690900002711518305</id><published>2010-05-20T21:38:00.000-07:00</published><updated>2010-05-20T21:38:32.099-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>End of iteration 8 within sight....stay on target...</title><content type='html'>I'm down to three bugs for this iteration, then testing and polish. I implemented the first pass of &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/taking-damage-how-to-represent-health.html"&gt;my ideas on health and damage&lt;/a&gt;, with now stamina and health instead of hp. The idea of a "shield" spell is a good one I think, but I want to wrap this iteration up.&lt;br /&gt;&lt;br /&gt;For those curious, the three bugs I have left are:&lt;br /&gt;&lt;br /&gt;&lt;div class="content title"&gt;&lt;u&gt;"Armor should increase stamina, not  evade/resists"&lt;/u&gt;&lt;/div&gt;&lt;div class="content title"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; For now I'm going to remove the fact that armor gives evade/resist on damage. It's going to increase the amount of stamina you get, aka damage you can soak up. I'm doing this since evade is not what I want, it makes combat way too "bursty". Four rounds of missing followed by 2 hits and your dead.&lt;/div&gt;&lt;div class="content title"&gt;&amp;nbsp; &lt;/div&gt;&lt;div class="content title"&gt;&lt;u&gt;"Make combat take longer per enemy"&lt;/u&gt;&lt;/div&gt;&lt;div class="content title"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Somewhat related to the first one, right now combat for a given monster takes on average 3 rounds. I'd like that to be closer to 6 rounds. Enough time that doing status effects, healing, and such make sense. This involves buffing the hp and mp numbers on both sides. I'm going to try to bring some sanity to the way that numbers are handed out now.&lt;/div&gt;&lt;div class="content title"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="content title"&gt;&lt;u&gt;"Cone and blast need to handle things blocking exploding correctly"&lt;/u&gt;&lt;/div&gt;&lt;div class="content title"&gt;&amp;nbsp;This was just something I ran across and didn't like. Here's some awesome ascii art to show you what's up&lt;/div&gt;&lt;div class="content title"&gt;. . . . . . . . . y&lt;/div&gt;&lt;div class="content title"&gt;. . . @ . . # # #&lt;/div&gt;&lt;div class="content title"&gt;. . . . . . . .&amp;nbsp; x&lt;/div&gt;&lt;div class="content title"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="content title"&gt;If the player cast a fireball to x, y would be hit even though there's a wall between them. The current idea I have is for each point in the blast radius to make a line of sight check against the focus point. &lt;/div&gt;&lt;div class="content title"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1690900002711518305?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1690900002711518305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1690900002711518305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1690900002711518305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1690900002711518305'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/end-of-iteration-8-within-sightstay-on.html' title='End of iteration 8 within sight....stay on target...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4985958816370521113</id><published>2010-05-18T18:41:00.000-07:00</published><updated>2010-05-18T18:41:57.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>Skill Tree Complete for Iteration 8</title><content type='html'>So the planned features for the new skill tree in iteration 8 are complete. Here's what it looks like&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S_M_KYHE6uI/AAAAAAAAARM/wOvF2DdeGHo/s1600/Skill+Tree+III.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/S_M_KYHE6uI/AAAAAAAAARM/wOvF2DdeGHo/s400/Skill+Tree+III.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I now have 3 somewhat fleshed out trees (at least fleshed out for a tech demo) and one token tree. SP are earned for killing monsters, and spent in the tree. Dependency information and skill point costs will show up in red on cursor over if they can not be met.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;I've determined that in the short term at least, I'm going to have magecrawl use a pure skill approach, with no "character levels". As players get SP, they can level up in both new spells and abilities to improve existing ones. Right now the skill tree is filled out just for showing that it works, but in the future I expect each tree to have 30+ nodes. If you want a glass cannon, you spend points just in the elemental trees and none in the martial trees. If you want a "mystic knight" you spend half your points or more in the martial tree, earning armor and improved stats, and cherry picking the light or elemental spells you need.&lt;br /&gt;&lt;br /&gt;Balancing everything is going to be painful in the short term, but with SP being the cost skills, I hope it is manageable. Much play testing and feedback from early players will be needed.&lt;br /&gt;&lt;br /&gt;FogBugz says I have about seven hours of work left right now.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S_NB1chc4cI/AAAAAAAAARc/4smlG6XwRho/s1600/Iteration8+Tasks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="94" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/S_NB1chc4cI/AAAAAAAAARc/4smlG6XwRho/s640/Iteration8+Tasks.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Assuming that keeps somewhat on schedule, I should have a tech demo out by my new-self imposed deadline of middle of next week.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4985958816370521113?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4985958816370521113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4985958816370521113' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4985958816370521113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4985958816370521113'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/skill-tree-complete-for-iteration-8.html' title='Skill Tree Complete for Iteration 8'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/S_M_KYHE6uI/AAAAAAAAARM/wOvF2DdeGHo/s72-c/Skill+Tree+III.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4366640784748838457</id><published>2010-05-12T17:30:00.000-07:00</published><updated>2010-05-12T17:30:48.319-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>More Skill Tree Goodness</title><content type='html'>The skill tree is starting to shape up. Here's what the current build looks like...&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/S-tGvMgyviI/AAAAAAAAAQ0/8pFvtHZIaY8/s1600/Skill+Tree+II.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/S-tGvMgyviI/AAAAAAAAAQ0/8pFvtHZIaY8/s400/Skill+Tree+II.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I've added dependency information (albeit in a kinda hacky file format), and a "tab bar" of different trees. Each tree is read from a different file, and can contain any number/configuration of different skills.&lt;br /&gt;&lt;br /&gt;Here's the confirmation dialog I mentioned from last post...&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/S-tIAllsIUI/AAAAAAAAARE/5o--EVZN0Tw/s1600/Skill+Dialog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/S-tIAllsIUI/AAAAAAAAARE/5o--EVZN0Tw/s400/Skill+Dialog.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The spellbook ('z') now takes its cue from the skills the player has taken, with a few skills that provide spells already created. I need to add skills that provide improvements in spells, ones that passively increase stats, and ones that allow the use of certain equipment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4366640784748838457?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4366640784748838457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4366640784748838457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4366640784748838457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4366640784748838457'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/more-skill-tree-goodness.html' title='More Skill Tree Goodness'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_HGdMxBYRQLs/S-tGvMgyviI/AAAAAAAAAQ0/8pFvtHZIaY8/s72-c/Skill+Tree+II.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3475232673337773981</id><published>2010-05-10T07:14:00.000-07:00</published><updated>2010-05-10T07:14:06.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>Laptops on a plane, some things take longer than you'd expect...</title><content type='html'>So last week I went home for a family member's college graduation and had the joy of bringing my new laptop along. Hacking on code for 3-4 hours makes plane trips seem faster and airport waits suck less. Here's whats new:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In skill tree can select/deselect nodes, which change color&lt;/li&gt;&lt;li&gt;Selecting new nodes on dialog exit will add them to a list the player has, which is persisted.&lt;/li&gt;&lt;li&gt;On next open of skill tree, previously selected nodes show up a new color and can not be removed&lt;/li&gt;&lt;li&gt;A dialog appears when you exit with new nodes, asking to confirm the changes&lt;/li&gt;&lt;li&gt;Initial work on dependency information, so you can require some skills for another&lt;/li&gt;&lt;/ul&gt;It was that second to last item that took the longest. The problem with nice generic framework code is that sometimes it is hard to add new things. In this case, it was one dialog bringing up another dialog which refused to be dismissed until a choice was made. On selection, it had to communication back to the original dialog the choice made. Make all that a generic dialog for any two button dialog, and that's what I implemented.&lt;br /&gt;&lt;br /&gt;This isn't that hard if you have one of the sub-dialogs run a message pumping (draw, blit, read keystrokes) loop, but that is something I have vowed &lt;i&gt;never to do again&lt;/i&gt;. It took 5 or 6 classes and a bit of thinking, but it works now.&lt;br /&gt;&lt;br /&gt;Things to do until skills can be considered "good enough" for this release:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Finish up dependency information on skills&lt;/li&gt;&lt;li&gt;Make selected skills do something: add spells, increase stats, allow equipment, improve spells&lt;/li&gt;&lt;li&gt;Make skill tree take skill points to select nodes, reward these for level ups, so create exp for player &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3475232673337773981?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3475232673337773981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3475232673337773981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3475232673337773981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3475232673337773981'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/laptops-on-plane-some-things-take.html' title='Laptops on a plane, some things take longer than you&apos;d expect...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-973036202098049528</id><published>2010-05-04T06:55:00.000-07:00</published><updated>2010-05-10T07:01:45.541-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Skill Tree'/><title type='text'>Skill Tree Initial Work</title><content type='html'>So one of the primary goals for this iteration was a skill tree. I love games with an in depth set of skills to choose from. Whether &lt;a href="http://wz2100.net/"&gt;strategy games&lt;/a&gt;, or &lt;a href="http://www.wowarmory.com/talent-calc.xml?c=Mage"&gt;RPGs&lt;/a&gt;, having a long tree to climb with choices and tradeoffs brings a richness that I enjoy.&lt;br /&gt;&lt;br /&gt;I'm far from there yet, but here is what I have so far... &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S942EieHz0I/AAAAAAAAAQs/4pmpFdqwo5s/s1600/Skill+Tree+I.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S942EieHz0I/AAAAAAAAAQs/4pmpFdqwo5s/s320/Skill+Tree+I.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;It's a "field" of nodes, read from a file. Each one is associated with a skill read from xml. It currently doesn't do anything yet, but the idea is that as the player levels, they will get skill points, to spend in the tree. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;In the future, it will be a tree (or more accurately, a forest), with dependency information. Some nodes will give new abilities, other improve existing ones. There will different trees for each spell school, and most likely a tree for "martial" skills like weapons/armor/etc.&lt;br /&gt;&lt;br /&gt;An idea I've been kicking around is making the cost of nodes dependent on the number of nodes you already have filled in on a given tree, and inversely dependent on the number of nodes filled in on the opposition tree. For example, every node you fill in on the fire tree makes other fire skills cheaper, but adding water nodes makes fire nodes more expensive. That way, we make dipping into opposing schools more difficult but not impossible. &lt;br /&gt;&lt;br /&gt;I have a lot of work to go, but I'm excited about the concepts and what I have implemented so far. Any thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-973036202098049528?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/973036202098049528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=973036202098049528' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/973036202098049528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/973036202098049528'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/skill-tree-initial-work.html' title='Skill Tree Initial Work'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/S942EieHz0I/AAAAAAAAAQs/4pmpFdqwo5s/s72-c/Skill+Tree+I.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4998725166735177631</id><published>2010-05-02T19:31:00.000-07:00</published><updated>2010-05-02T19:31:47.789-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Magecrawl Title Screen</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;So doing a welcome window this early is a bit of &lt;a href="http://en.wikipedia.org/wiki/Gold_plating_%28analogy%29"&gt;gold plating&lt;/a&gt;, but it was fun to knock out. &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S94yYrmrMtI/AAAAAAAAAQk/QYR4oXc-UvM/s1600/WelcomeWindow.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S94yYrmrMtI/AAAAAAAAAQk/QYR4oXc-UvM/s1600/WelcomeWindow.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S94yYrmrMtI/AAAAAAAAAQk/QYR4oXc-UvM/s1600/WelcomeWindow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S94yYrmrMtI/AAAAAAAAAQk/QYR4oXc-UvM/s400/WelcomeWindow.png" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The idea is that the large text block contains snippets of stories in the game world, things like passages from books, letters, and travel tips. Fluff in general, but also trying to give you a feel for the world I'm trying to create.&lt;br /&gt;&lt;br /&gt;The smaller text block to the lower left gives a sample listing of spells in a given school. The lower right text block is a short description of the spell school.&lt;br /&gt;&lt;br /&gt;The title screen is a bit wall-of-texty, but a good first try. I'd like some awesome graphics or animations, or snippets of game play in the future, but that's something I can punt on until a 1.0 at least.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4998725166735177631?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4998725166735177631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4998725166735177631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4998725166735177631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4998725166735177631'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/05/magecrawl-title-screen.html' title='Magecrawl Title Screen'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/S94yYrmrMtI/AAAAAAAAAQk/QYR4oXc-UvM/s72-c/WelcomeWindow.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8550561002486464943</id><published>2010-04-25T12:12:00.000-07:00</published><updated>2010-04-25T12:12:18.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Magecrawl on Mac Part II (libtcod, SDL, and init code...)</title><content type='html'>This is a bunch of technical details about getting libtcod working on the mac. You might just be interested in the &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/04/magecrawl-on-mac-part-i-announcement.html"&gt;announcement post.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As promised, this post is a breakdown of the work it took to make libtcod work natively on the mac. By "native", I am not knocking the wonderful work&amp;nbsp;Michael De Rosa did for previous releases. I'm referring to ones produced auto-magically by the cmake system, &amp;nbsp;no manual xcodeprojs, .dylibs and all.&lt;br /&gt;&lt;br /&gt;The wonderful part of generated xcodeprojs is that they will stay in date as further changes are made. Nobody has to figure out what changes were made, and manually update things. This hopefully means that mac ports of the new version should come out same day or very soon after releases.&lt;br /&gt;&lt;br /&gt;Enough about that...getting libtcod working on the mac involved two major sections of work.&lt;br /&gt;&lt;br /&gt;Part I: Build system&lt;br /&gt;&lt;br /&gt;Getting cmake to play nicely with the mac wasn't too painful. I had noted places in my CMakeLists.txt where apple variables were needed when I created them, so the first step was filling them all in. Unlike the windows builds, the mac build currently uses the framework versions of libsdl and libpng. I'm unsure if this will require users installing those frameworks before use.... I did this since I wanted .dylibs of libtcod. The only other issue that SWIG apparently doesn't ship arrays_csharp.i built in for the mac. I had to download it from svn and copy it into the right place.&lt;br /&gt;&lt;br /&gt;Part II: Crashes on launch, init code, and mac&lt;br /&gt;&lt;br /&gt;This is where the pain started. The sample programs crashes on launch, due to an objective c exception about preconditions not being met. After some digging, I found &lt;a href="http://www.libsdl.org/faq.php?action=listentries&amp;amp;category=7"&gt;this&lt;/a&gt;. Apparently, SDL does some funny business to get initially properly on the mac. You need to include an object c file in your build and use a particular version of a main function.&lt;br /&gt;&lt;br /&gt;What happens on the mac is when you include the SDL headers, it renames your main via macros to something else. The objective c file defines its own main statement, which does the correct initing and then calls SDL_main which calls your main.&lt;br /&gt;&lt;br /&gt;This obviously doesn't work very well if your a C# program who doesn't have a main! I had a friend at work who know objective c well to bounce ideas off of, and then I ran into &lt;a href="http://osdl.sourceforge.net/main/documentation/rendering/SDL-macosx.html"&gt;this&lt;/a&gt;. It's a simple objective c method I could call from C code before initing SDL that would handle the mac stuff for me. No more renaming main nonsense for me. It worked great.&lt;br /&gt;&lt;br /&gt;Just one note, all of this doesn't apply if your use the "unix" style SDL libraries. Those you can use just normally, they don't need extra setup. However, I wanted a "real" mac port, dylibs and all. There is now code in libtcod that will fixup the mac specific stuff when you call console init. Hence, it works fine no matter the calling language.&lt;br /&gt;&lt;br /&gt;I normally try not to get this implementation specific when writing posts, however I couldn't find all this info in one place. If somebody is trying to get an SDL based library working on the mac, particularly in C#, I hope this info finds you well...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8550561002486464943?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8550561002486464943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8550561002486464943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8550561002486464943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8550561002486464943'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/magecrawl-on-mac-part-ii-libtcod-sdl.html' title='Magecrawl on Mac Part II (libtcod, SDL, and init code...)'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4436932526564666756</id><published>2010-04-25T11:37:00.000-07:00</published><updated>2010-04-25T11:37:21.301-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Magecrawl on Mac Part I (Announcement)</title><content type='html'>Success!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S9SLG6OApsI/AAAAAAAAAQc/wHetCy3a0fg/s1600/Screen+shot+2010-04-25+at+1.22.58+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S9SLG6OApsI/AAAAAAAAAQc/wHetCy3a0fg/s320/Screen+shot+2010-04-25+at+1.22.58+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;One libtcod had a working mac version, getting magecrawl working was trivial, thanks to the wonderful work by the &lt;a href="http://www.mono-project.com/Main_Page"&gt;mono&lt;/a&gt;&amp;nbsp;team. Other than a bitness issue that was my own stupid mistake, all it took was dropping the native libtcod mac .dylib and. so, adding a single config file, and off it ran.&lt;br /&gt;&lt;br /&gt;Getting libtcod to work on the mac was a bit more work, and a very technical breakdown of issues and solutions will follow in another post soon to come.&lt;br /&gt;&lt;br /&gt;Now back to prototyping that skill tree viewer...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4436932526564666756?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4436932526564666756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4436932526564666756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4436932526564666756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4436932526564666756'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/magecrawl-on-mac-part-i-announcement.html' title='Magecrawl on Mac Part I (Announcement)'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/S9SLG6OApsI/AAAAAAAAAQc/wHetCy3a0fg/s72-c/Screen+shot+2010-04-25+at+1.22.58+PM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3068330760897609837</id><published>2010-04-22T07:03:00.000-07:00</published><updated>2010-04-22T07:03:32.429-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><title type='text'>CMake support for mac osx</title><content type='html'>So I said I was done screwing with libtcod for awhile, but my new laptop thinks otherwise. It is now obligatory to get magecrawl running on it. And so...&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This morning I got samples_c to run under Mac OSX. There was a bunch of nonsense with sdl_main and such, but I got it working. Now I need to get the other tools working, clean up the patches, and then create libtcod-net for mac. Then I can get back to magecrawl.&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/S9BWdgGD4vI/AAAAAAAAAQU/wjrgy7uHlLc/s1600/Screen+shot+2010-04-22+at+9.00.03+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/S9BWdgGD4vI/AAAAAAAAAQU/wjrgy7uHlLc/s320/Screen+shot+2010-04-22+at+9.00.03+AM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3068330760897609837?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3068330760897609837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3068330760897609837' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3068330760897609837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3068330760897609837'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/cmake-support-for-mac-osx.html' title='CMake support for mac osx'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_HGdMxBYRQLs/S9BWdgGD4vI/AAAAAAAAAQU/wjrgy7uHlLc/s72-c/Screen+shot+2010-04-22+at+9.00.03+AM.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8999901685478780013</id><published>2010-04-19T15:03:00.000-07:00</published><updated>2010-04-19T15:03:31.473-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>Laptop l = new MacbookPro(13);</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;I wanted to write a quick post from my new laptop! I just purchased a 13-inch macbook pro and so far its pretty awesome.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After I "move in" by copying all of my media and installing all the needed applications, my first task on it will be making a cmake native libtcod for OSX, so I can get libtcod-net working, so I can get Magecrawl running. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8999901685478780013?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8999901685478780013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8999901685478780013' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8999901685478780013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8999901685478780013'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/laptop-l-new-macbookpro13.html' title='Laptop l = new MacbookPro(13);'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2500917623485652517</id><published>2010-04-17T15:58:00.000-07:00</published><updated>2010-04-17T15:58:50.808-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Introduction to magecrawl's architecture</title><content type='html'>So magecrawl is broken up into three libraries and an executable that pulls everything togeather and provides "the game". Since I have a few minute between yard work excursions, it seemed like a good idea to write a quick introduction.&lt;br /&gt;&lt;br /&gt;Utilities - This is the base library that the other three components depend upon. It provides a few common data structures that c# doesn't (Pair&lt;u,t&gt;, Point), a few extension methods on basic types, and a Preferences infrastructure for reading config files. Mostly stuff that needs to go somewhere everyone depends upon.&lt;/u,t&gt;&lt;br /&gt;&lt;br /&gt;GameEngine - This is the library that "runs" the game world. It provides an interface IGameEngine which other modules use to request data to display and input player actions. Right now, it handles everything not GUI related almost: level generation, save/load, monster AI, physics, etc. It provides interfaces like ISpell, IItem, ICharacter and such so the GUI doesn't have to depend on concrete implementation classes.&lt;br /&gt;&lt;br /&gt;GameUI - This library handles displaying everything. From dialogs like inventory and spell listings, to the map and character info, there should be no other place that any drawing code goes (Exception, the title screen goes elsewhere).&lt;br /&gt;&lt;br /&gt;Magecrawl - This is the executable that the user runs. It sets up the libtcod console and displays the "welcome window". After a game is started, it then creates a GameEngine instance and runs the game's main loop. There are multiple keyboard handlers, which switch off responsibility depending on the state of the game. They handle keyboard keystrokes, creating requests to the GUI to display various dialogs, and sending various action requests to the game engine.&lt;br /&gt;&lt;br /&gt;One area I'd like to talk about is handling "psydo-asynchronous" events. Things like monsters using ranged attacks between player's turn. By default, after the player does an action that causes time to step forward, all the monsters to act before the player gets anther turn happen consecutively, without UI updates. This keeps the action going. However, seeing ranged attacks is really nice. They way we handle this is via a callback.&lt;br /&gt;&lt;br /&gt;The main magecrawl event loop registers a few events delegates with the game engine, to be called when the player dies/wins or an event that needs to be drawn happens on a non-player turn. When the game engine runs across one of these, it calls this callback, which then draws the animation and return. It looks something like this.&lt;br /&gt;&lt;br /&gt;Main Event Loop -&amp;gt; Handle Keystroke -&amp;gt; Game Engine Do Action - &amp;gt; Game Engine Pass Time -&amp;gt; Monsters Act -&amp;gt; Physics Engine Display Ranged Attack -&amp;gt; Main Event Loop Handle Animation.&lt;br /&gt;&lt;br /&gt;After the animation is drawn, we can return back to the other monster's action, and back all the way to the handle keystroke and main event loop.&lt;br /&gt;&lt;br /&gt;This is done so there is only one place we "pump messages", in terms of the draw/flush loop. We also don't have the game engine trying to either draw updates or call Magecrawl functions, causing a circular loop.&lt;br /&gt;&lt;br /&gt;I am very happy with this design in general. The GameUI/GameEngine divide provides a strong UI/logic separation, and the Magecrawl executable is the only person running event loops. Previous attempts at writing magecrawl have floundered due to event loop or ui/logic problems.&lt;br /&gt;&lt;br /&gt;I threw a bunch of ideas down in the space of a page of text, so I'm sure i glossed over a bunch of details. Let me know if there's parts that weren't clear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2500917623485652517?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2500917623485652517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2500917623485652517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2500917623485652517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2500917623485652517'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/introduction-to-magecrawls-architecture.html' title='Introduction to magecrawl&apos;s architecture'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7141142106072073468</id><published>2010-04-16T06:45:00.000-07:00</published><updated>2010-04-16T06:45:29.543-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='iteration8'/><title type='text'>System.Reboot(Magecrawl.Iteration8);</title><content type='html'>So I don't have the link the last two months of posting to make it apparent that I haven't been working on magecrawl lately. I'm hoping that now I've finished 95% of those other jobs, with just a few maintenance tasks to complete closer to the next release. This iteration has lasted way too long already, so this morning I'm separating the &lt;a href="http://en.wikipedia.org/wiki/The_Sheep_and_the_Goats"&gt;goat features from the sheep&lt;/a&gt; ones. &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/01/plans-for-iteration-8-and-beyond.html"&gt;original goal&lt;/a&gt; for iteration 8 was "different level monsters, a skill tree for the player, and increasing  difficulty". I've booted what I consider the non-essential tasks out of this iteration and this is what I come up with:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S8hnAbKaxcI/AAAAAAAAAQE/UI4FnkMOmRA/s1600/Iteration8+Tasks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S8hnAbKaxcI/AAAAAAAAAQE/UI4FnkMOmRA/s400/Iteration8+Tasks.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Since it has been so long since my last beta of magecrawl, I'll kick out one after I get all of this done.&lt;br /&gt;&lt;br /&gt;I haven't mentioned this lately, but magecrawl is &lt;a href="http://code.google.com/p/magecrawl/source/checkout"&gt;open source&lt;/a&gt;. Feel free to download the source to take a look at how things work if you'd like. If you'd like to hack on a feature, let me know, there is plenty to do still.&lt;br /&gt;&lt;br /&gt;As you can see, a skill tree is in the queue for this release. I'm hoping to flesh out an idea what that is going to look like in a a future upcoming post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7141142106072073468?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7141142106072073468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7141142106072073468' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7141142106072073468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7141142106072073468'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/systemrebootmagecrawliteration8.html' title='System.Reboot(Magecrawl.Iteration8);'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/S8hnAbKaxcI/AAAAAAAAAQE/UI4FnkMOmRA/s72-c/Iteration8+Tasks.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6361099934505055018</id><published>2010-04-15T06:30:00.000-07:00</published><updated>2010-04-15T06:30:13.243-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>Completed C# and Lua Swig Wrappers!</title><content type='html'>It has been a busy couple days since my "I'll get the wrapper up here that night" post. A few more last minute issues, including a weird race condition with different .NET runtimes that I think I ironed out, held this up, but now it is ready. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://libtcod-net.googlecode.com/files/SWIG%20C%23%20Wrapper%20III.zip"&gt;C# Wrapper&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://libtcod-net.googlecode.com/files/SWIG%20Lua%20Wrapper%20III.zip"&gt;Lua Wrapper&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The C# wrapper is now powering magecrawl, which is a pretty significant codebase, so hopefully most of the issues there are ironed out. With Lua, the "hello world" demo works, but I don't know lua well enough to test it beyond that.&lt;br /&gt;&lt;br /&gt;Please note, that the libtcod these use is the svn of the upcoming 1.5.x release, and is therefor unstable. The API might change, it might crash, it could steal your girlfriend and watch TV while you're at work, so report bugs you find so they can ironed out early.&lt;br /&gt;&lt;br /&gt;Beyond that, I finished all the C# documentation for the new release, so when that comes out, C# will be a first class citizen. My todo list for libtcod is just about done now, so expect a new post in the next few days talking about scheduling magecrawl and "rebooting" this iteration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6361099934505055018?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6361099934505055018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6361099934505055018' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6361099934505055018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6361099934505055018'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/completed-c-and-lua-swig-wrappers.html' title='Completed C# and Lua Swig Wrappers!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2660471167957181093</id><published>2010-04-10T13:34:00.000-07:00</published><updated>2010-04-10T13:34:59.022-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>libtcod -&gt; swig -&gt; magecrawl -&gt; true</title><content type='html'>&lt;div style="text-align: left;"&gt;Today I finally got magecrawl working with the SWIGed wrappers. It was a 2800 or so line diff, but much if that is how noisy diff can get when you change only one line in a file. Much of these changes can be traced to the &lt;a href="http://doryen.eptalys.net/forum/index.php?topic=499.0"&gt;printLine changes&lt;/a&gt; that are inbound for the newest libtcod.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Beyond tracking down some bugs in libtcod (joys of living in bleeding edge svn), the changes where very mechanical. Find and replace will get users of libtcod-net 90% of the way there. For theses pains, they will receive APIs previously unwrapped (height map), new APIs as soon as they are released (the new textbox module hopefully), and much faster turnaround for new releases.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I will get together a C# and a lua demo zip later this evening, so people can tests things out if they want.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/S8Dd671fvBI/AAAAAAAAAP8/wscfjwHPCy8/s320/magecrawl-swig.png" /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;The obligatory magecrawl screenshot&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2660471167957181093?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2660471167957181093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2660471167957181093' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2660471167957181093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2660471167957181093'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/libtcod-swig-magecrawl-true.html' title='libtcod -&gt; swig -&gt; magecrawl -&gt; true'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/S8Dd671fvBI/AAAAAAAAAP8/wscfjwHPCy8/s72-c/magecrawl-swig.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8660951646865005892</id><published>2010-04-03T10:05:00.000-07:00</published><updated>2010-04-03T10:05:08.291-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>Quick status update...</title><content type='html'>I just finished getting the libtcod c# swig demo working. There are some performance places I'd like to work on at some point, but it's very reasonable (160fps vs 200fps on initial screen).&lt;br /&gt;&lt;br /&gt;I'm going to walk over the diff, and figure out which places of the API could use some renames or cleaning up. I know the print/printRect functions need some love, and the noise functions, but beyond that I think I'm in good shape.&lt;br /&gt;&lt;br /&gt;Post that, I'll port magecrawl to use the new API. I'm hoping that turns out to be straightforward. I'm guesstimating 4 hours of work. After that, I'll know that things work great, and I'll post a second version of the wrapper for public testing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8660951646865005892?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8660951646865005892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8660951646865005892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8660951646865005892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8660951646865005892'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/04/quick-status-update.html' title='Quick status update...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5328964130635185259</id><published>2010-03-31T18:49:00.000-07:00</published><updated>2010-04-01T07:12:38.898-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>swig'ed libtcod c# demo sucess...</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/S7P7PH6XXHI/AAAAAAAAAP0/79x9-hvAWRI/s1600/Swig_Sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/S7P7PH6XXHI/AAAAAAAAAP0/79x9-hvAWRI/s400/Swig_Sample.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There still are multiple modules not working right &lt;strike&gt;and a crash on exit in TCDODijkstra&lt;/strike&gt;, but I got the demo in c# ported to the new API and working!&lt;br /&gt;&lt;br /&gt;Between craziness at work and work planning a trip over the summer, my hacking time has been scare this week, but I feel like this is good progress.&lt;br /&gt;&lt;br /&gt;Update: The TCODDijkstra crash appears to be a bug in libtcod itself, as I can reproduce it in the C++ demo. I've notified one of the maintainers.&lt;br /&gt;&lt;br /&gt;Update^2: The crash was fixed in all of 15 minutes, nobody can say the libtcod maintainers aren't responsive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5328964130635185259?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5328964130635185259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5328964130635185259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5328964130635185259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5328964130635185259'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/swiged-libtcod-c-demo-sucess.html' title='swig&apos;ed libtcod c# demo sucess...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_HGdMxBYRQLs/S7P7PH6XXHI/AAAAAAAAAP0/79x9-hvAWRI/s72-c/Swig_Sample.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3254831648588095987</id><published>2010-03-27T21:40:00.000-07:00</published><updated>2010-03-27T21:40:28.946-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>Sometimes you have to use a bigger hammer...</title><content type='html'>This evening I spent awhile trying to hammer the SWIG'ed c# wrapper into something usable and less ugly. I've fixed all the "known" issues with the wrapper not wrapping some modules or functionality. The reduction in ugliness is related to the C-style enum and data type names. Things such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TCOD_BKGND_NONE&lt;/li&gt;&lt;li&gt;TCOD_key_status_t&lt;/li&gt;&lt;li&gt;TCOD_NOISE_MAX_OCTAVES&lt;/li&gt;&lt;/ul&gt;While for C users there is nothing wrong with them, users of higher level languages expect identifiers with less capital letters and underscores. After spending an hour or two trying to do it "nicely", I finally settled with adding somewhere around 200 lines like:&lt;br /&gt;&lt;br /&gt;%rename (NoiseMaxOctaves) TCOD_NOISE_MAX_OCTAVES;&lt;br /&gt;&lt;br /&gt;While a few &lt;a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29"&gt;VIM&lt;/a&gt; macros made this less painful that first glace would suggest, it still took awhile. It isn't a very elegant solution it works. &lt;br /&gt;&lt;br /&gt;Now that I can type the constants without wanting to cry, I'm working on converting the C# libtcod-net demo program to use the new API. It started with about 400 compiler errors and I still have 230 to go, so it will take a while. It also means converting magecrawl (and by extension all the users of libtcod-net) will take awhile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3254831648588095987?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3254831648588095987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3254831648588095987' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3254831648588095987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3254831648588095987'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/sometimes-you-have-to-use-bigger-hammer.html' title='Sometimes you have to use a bigger hammer...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3015804817924077410</id><published>2010-03-24T20:40:00.000-07:00</published><updated>2010-03-27T21:31:24.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>libtcod and swig - The current plan...</title><content type='html'>tbellin stepped up and figured out the swig documentation when it came to callbacks. He's tested in C# and apparently it works. I'm thrilled that somebody figured it out. :)&lt;br /&gt;&lt;br /&gt;From reading the documentation, the given language needs "director" support for callbacks to work, so some languages like lua are out of luck for now (until SWIG adds more support) unfortuntly.&lt;br /&gt;&lt;br /&gt;As I mentioned in the comments sections yesterday, here are my plans:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strike&gt;Get heightmap finished&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Fix one issue with callbacks user data. &lt;/strike&gt;&lt;/li&gt;&lt;li&gt; Port the libtcod-net demo application to the new libtcod wrapper for testing.&lt;/li&gt;&lt;li&gt;Port magecrawl to the new libtcod wrapper for more testing.&lt;/li&gt;&lt;li&gt;Release two "official" platforms&lt;/li&gt;&lt;ul&gt;&lt;li&gt;C# - If things work out, for the period of at least a release support both the new and old library. Strongly encourage people to move to the new wrapper.&lt;/li&gt;&lt;li&gt;LUA - While it'll have to not have support for callbacks (stupid swig director support), it's still "good enough".&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Ask people who are interested in other languages/platforms to work with me to bring those languages up to a good enough level.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3015804817924077410?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3015804817924077410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3015804817924077410' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3015804817924077410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3015804817924077410'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/libtcod-and-swig-current-plan.html' title='libtcod and swig - The current plan...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4920081887709856951</id><published>2010-03-23T16:55:00.000-07:00</published><updated>2010-03-23T16:55:47.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Wrapping up libtcod, swig, and cmake nonsense soon hopefully....</title><content type='html'>While I've enjoyed the libtcod, swig, and cmake work, my interest is seriously starting to wind down. Here's a status update:&lt;br /&gt;&lt;br /&gt;libtcod-java - See &lt;a href="http://www.cmake.org/pipermail/cmake/2010-March/035977.html"&gt;this&lt;/a&gt; mailing list post. Nobody has answered yet, and I have no clue how to get it working right now. This might have to be stowed.&lt;br /&gt;&lt;br /&gt;libtcod-php - Waiting to hear back from person who wanted it to see if they wanted php4 or php5. cmake apparently only support php4 naively. &lt;br /&gt;&lt;br /&gt;libtcod-ruby - Apparently there is some interest in this, but it isn't working for them. Will be trying to sort that out.&lt;br /&gt;&lt;br /&gt;libtcod-cmake-osx - Working with somebody via e-mail (slowly) in order to try to get this working.&lt;br /&gt;&lt;br /&gt;libtcod-csharp - Working with somebody via e-mail to sort out crashes and problems I'm not seeing.&lt;br /&gt;&lt;br /&gt;Bit of libtcod swig isn't wrapping - Heightmap is down to four functions not being wrapped. BSP looks like a bit of a lost cause. The SWIG documentation on function pointers and callbacks is almost unreadable. The only way I can figure to wrap it is to remove the callback, and create functions that return lists of all the nodes in the BSP in the requested order.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4920081887709856951?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4920081887709856951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4920081887709856951' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4920081887709856951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4920081887709856951'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/wrapping-up-libtcod-swig-and-cmake.html' title='Wrapping up libtcod, swig, and cmake nonsense soon hopefully....'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8659608440265817960</id><published>2010-03-21T18:01:00.000-07:00</published><updated>2010-03-21T18:01:20.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>libtcod-ruby...</title><content type='html'>Well I have something done for ruby, but it isn't up the my normal standards (aka the demo isn't done). Here is what I have:&lt;br /&gt;&lt;br /&gt;http://libtcod-net.googlecode.com/files/libtcod-ruby%20bits.zip&lt;br /&gt;&lt;br /&gt;This is a built libtcod-ruby library, for Linux. I can't understand ruby well enough to get a hello world demo working, but require "libtcod-ruby" seems to work. If one of you ruby people want to get a demo working, I'll post it.&lt;br /&gt;&lt;br /&gt;The reason that it's a Linux demo is because cmake seems to be utterly broken for finding ruby under Windows. After spending &lt;b&gt;entirely &lt;/b&gt;too long messing with it, I gave up and built it under Linux. If someone want to try to get libtcod-ruby working under Windows, let me know and I'll point you to where I've given up. &lt;br /&gt;&lt;br /&gt;Off to libtcod-php and libtcod-java, then fixing the known issues and then maybe I can go back to Magecrawl...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8659608440265817960?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8659608440265817960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8659608440265817960' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8659608440265817960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8659608440265817960'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/libtcod-ruby.html' title='libtcod-ruby...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4818985251930260274</id><published>2010-03-17T21:06:00.000-07:00</published><updated>2010-03-17T21:15:56.056-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>libtcod in LUA, any more requests?</title><content type='html'>I now have the same demo from yesterday in LUA for download.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S6Go9qQEQ9I/AAAAAAAAAPs/Dmaq4YZ284Y/s1600-h/LUADemo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S6Go9qQEQ9I/AAAAAAAAAPs/Dmaq4YZ284Y/s320/LUADemo.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://libtcod-net.googlecode.com/files/SWIG%20Lua%20Demo.zip"&gt;Download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are the list of output languages SWIG can target:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Allegro CL  &lt;/li&gt;&lt;li&gt;&lt;strike&gt;C#  &lt;/strike&gt;&lt;/li&gt;&lt;li&gt;CFFI  &lt;/li&gt;&lt;li&gt;CLISP  &lt;/li&gt;&lt;li&gt;Chicken  &lt;/li&gt;&lt;li&gt;Guile  &lt;/li&gt;&lt;li&gt;Java  &lt;/li&gt;&lt;li&gt;&lt;strike&gt;Lua&lt;/strike&gt;  &lt;/li&gt;&lt;li&gt;Modula-3  &lt;/li&gt;&lt;li&gt;Mzscheme  &lt;/li&gt;&lt;li&gt;OCAML  &lt;/li&gt;&lt;li&gt;Octave  &lt;/li&gt;&lt;li&gt;Perl  &lt;/li&gt;&lt;li&gt;PHP  &lt;/li&gt;&lt;li&gt;&lt;strike&gt;Python&lt;/strike&gt;  &lt;/li&gt;&lt;li&gt;R  &lt;/li&gt;&lt;li&gt;Ruby  &lt;/li&gt;&lt;li&gt;Tcl  &lt;/li&gt;&lt;li&gt;UFFI&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;If anyone is interested in libtcod wrapped in any of the above languages, speak up and I'll see what I can do.&lt;br /&gt;&lt;br /&gt;Otherwise, I'm going to work on fixing up the known issues with these SWIG wrappers so I can hand some/all of it off to somebody else and go back to work on Magecrawl.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4818985251930260274?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4818985251930260274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4818985251930260274' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4818985251930260274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4818985251930260274'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/libtcod-in-lua-any-more-requests.html' title='libtcod in LUA, any more requests?'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_HGdMxBYRQLs/S6Go9qQEQ9I/AAAAAAAAAPs/Dmaq4YZ284Y/s72-c/LUADemo.png' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-243034263302160065</id><published>2010-03-16T22:18:00.000-07:00</published><updated>2010-03-16T22:18:39.937-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>Prototype libtcod + swig wrappers (python &amp; C#)...</title><content type='html'>So I finished up the 95% of wrapping libtcod via swig today. The major outstanding areas not done are heightmap and bsp. Heightmap just because it passes a lot of arrays around, and bsp since it uses callbacks. I'm still not sure how I'm going to handle both of these.&lt;br /&gt;&lt;br /&gt;Since they were easy to push out (and it's midnight my time right now), I'm just doing python and c#. I hope to get java and/or lua done tomorrow.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://libtcod-net.googlecode.com/files/Swig%20Python%20Demo.zip"&gt;Python Demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://libtcod-net.googlecode.com/files/SWIG%20C%23%20Demo.zip"&gt;C# Demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Remember, these are demos. They could eat your leftovers in the fridge or cause your program to explode, so be careful. And if things do explode or don't work, let me know. These demos are at the "it compiles, ship it" quality level.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-243034263302160065?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/243034263302160065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=243034263302160065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/243034263302160065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/243034263302160065'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/prototype-libtcod-swig-wrappers-python.html' title='Prototype libtcod + swig wrappers (python &amp; C#)...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6538913274310372979</id><published>2010-03-16T07:03:00.000-07:00</published><updated>2010-03-16T07:03:10.629-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>Still more non-magecrawl work...</title><content type='html'>I keep promising myself that I'll get back to magecrawl soon, but right now this libtcod/SWIG work is keeping me busy. I've almost gotten the Console, Colors, and System classes wrapped. I find that googling for what I want to do is almost strictly better than looking it up in the documentation. &lt;br /&gt;&lt;br /&gt;I'm figuring that once I get the hang of all the operation types I need to do in the conversion, that adding additional modules to the SWIG build will be easy. We'll see how well that assumption holds...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6538913274310372979?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6538913274310372979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6538913274310372979' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6538913274310372979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6538913274310372979'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/still-more-non-magecrawl-work.html' title='Still more non-magecrawl work...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1707220070640890854</id><published>2010-03-13T11:43:00.000-08:00</published><updated>2010-03-13T11:44:30.147-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod-net'/><category scheme='http://www.blogger.com/atom/ns#' term='swig'/><title type='text'>All your libtcod wrapper are belong to us...</title><content type='html'>(Apologies in advance for the title, but it was too good to pass-up).&lt;br /&gt;&lt;br /&gt;The primary reason for my cmake work all of this/last week was so the build could &lt;b&gt;get out of my way&lt;/b&gt; and I could experiment on some idea for wrapping &lt;a href="http://doryen.eptalys.net/libtcod/"&gt;libtcod&lt;/a&gt;. While &lt;a href="http://code.google.com/p/libtcod-net/"&gt;libtcod-net&lt;/a&gt; works, and is good enough for writing magecrawl, I've seen multiple people going through the work of wrapping libtcod for each language they are interested in (python, c#, D, lisp, etc). Other people have been interested in using libtcod with java or other languages, but lack the time or skill to create their own wrapper. I'm also lazy, and if i can automate or reduce my workload, I'm all about it. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.swig.org/"&gt;SWIG&lt;/a&gt; is a program that generates the "glue" layer so higher level languages can call C/C++, doing most of the work for you. It's a powerful program, with terrible documentation. At work, I've used it enough to feel comfortable trying it on libtcod.&lt;br /&gt;&lt;br /&gt;After a morning of work, I have a proof of concept.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/S5vpRqGMhEI/AAAAAAAAAPk/m64JbppxAnk/s1600-h/CSharpPythonSwigExample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/S5vpRqGMhEI/AAAAAAAAAPk/m64JbppxAnk/s320/CSharpPythonSwigExample.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;python:&lt;br /&gt;import libtcod&lt;br /&gt;&lt;br /&gt;libtcod.TCODConsole.initRoot(80, 50, "Test - python", False, libtcod.TCOD_RENDERER_SDL)&lt;br /&gt;root = libtcod.TCODConsole.root.fget()&lt;br /&gt;&lt;br /&gt;while not libtcod.TCODConsole.isWindowClosed():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root.putChar(10, 10, 64);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root.printLeft(3, 3, libtcod.TCOD_BKGND_SET, "Hello World");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root.flush()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root.checkForKeypress()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;c#:&lt;br /&gt;&lt;br /&gt;using libtcod;&lt;br /&gt;&lt;br /&gt;namespace TestApp&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.initRoot(80, 50, "Test - C#", false, TCOD_renderer_t.TCOD_RENDERER_SDL);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.root.setForegroundColor(TCODColor.white);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!TCODConsole.isWindowClosed())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.root.printLeft(3, 3, TCOD_bkgnd_flag_t.TCOD_BKGND_SET, "Hello World");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.root.putCharEx(10, 10, '@', TCODColor.white, TCODColor.black);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCODConsole.checkForKeypress();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is &lt;b&gt;a lot&lt;/b&gt; of work to be done, but the idea appears to be sound! I'll post more when I get the proof of concept fleshed out more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1707220070640890854?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1707220070640890854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1707220070640890854' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1707220070640890854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1707220070640890854'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/all-your-libtcod-wrapper-are-belong-to.html' title='All your libtcod wrapper are belong to us...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_HGdMxBYRQLs/S5vpRqGMhEI/AAAAAAAAAPk/m64JbppxAnk/s72-c/CSharpPythonSwigExample.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2757467424710544800</id><published>2010-03-12T19:04:00.000-08:00</published><updated>2010-03-12T19:04:09.468-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Bringing cmake to libtcod - Last bits of polish</title><content type='html'>(Your regularly scheduled blog posting about c# and magecrawl will return shorting, this is the last post scheduled to deal with cmake and libtcod.)&lt;br /&gt;&lt;br /&gt;The last major issues I believe have been worked out. With the exception of osx support, which libtcod didn't have up to date in the first place, and some documentation I'm planning on writing tonight, cmake support is finished. &lt;br /&gt;&lt;br /&gt;I finished up &lt;a href="http://upx.sourceforge.net/"&gt;upx&lt;/a&gt; support last night, and spent today breaking up the build files into libtcod and sample parts, which makes everything much more clear. Overall, despite my gripes last night about its documentation, cmake is a great build system. It is vastly better in my opinion than makefiles, and the only build system is comparable in features is &lt;a href="http://en.wikipedia.org/wiki/Scons"&gt;scons&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;If you're writing a roguelike (or anything really) in C/C++, and consider cross platform important at all, I'd take a look at cmake.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2757467424710544800?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2757467424710544800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2757467424710544800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2757467424710544800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2757467424710544800'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-last-bits-of.html' title='Bringing cmake to libtcod - Last bits of polish'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7420835580790188488</id><published>2010-03-11T20:29:00.000-08:00</published><updated>2010-03-11T21:51:43.878-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Bringing cmake to libtcod - Why "use the source Luke" doesn't mean you can skip documentation..</title><content type='html'>I'm going to start this quick post off by saying that cmake doesn't have the worst &lt;a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html"&gt;documentation&lt;/a&gt; ever. I'd generally award that honor to the &lt;a href="http://www.swig.org/Doc1.3/CSharp.html"&gt;C# swig documentation&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;However, the documentation for cmake leaves much to be desired. Throughout my work, I've found most of my help with Google and other peoples submitted scripts. I'm going to try not to be cynical and assume that this is due to them selling a &lt;a href="http://www.kitware.com/products/books.html"&gt;book&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Anyway, it seems that the upx for cmake documentation just doesn't exist. &lt;strike&gt;I can find nobody on the internet using it&lt;/strike&gt;. *Edit* I found one person &lt;a href="http://www.cmake.org/pipermail/cmake/2001-November/002491.html"&gt;here&lt;/a&gt; but it isn't working for me. At this point, I'm digging into the source of FindSelfPackers trying to figure out what I need to tickle to get it working. While this is better than the situation if cmake was closed source, it saddens me nevertheless.&lt;br /&gt;&lt;br /&gt;(/endrant)&lt;br /&gt;&lt;br /&gt;As the maintainer of libtcod-net, which is only somewhat documented, I realize this same complaint could be leveled back at me. If you happen to find yourself cursing the documentation of libtcod-net, please let me know.&lt;br /&gt;&lt;br /&gt;*Edit-2* Since apparently I have a high google rating for "upx cmake" and I've found my solution, I'll post it for any future googlers. I gave up on using the built in finder, and am just using the one visible from the prompt. I'll have to variable it out to work on windows, but it's "good enough".&lt;br /&gt;&lt;br /&gt;samples_c being the name of one of the outputs:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ADD_CUSTOM_COMMAND(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; TARGET samples_c&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; POST_BUILD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; COMMAND upx samples_c&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; VERBATIM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7420835580790188488?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7420835580790188488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7420835580790188488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7420835580790188488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7420835580790188488'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-why-use.html' title='Bringing cmake to libtcod - Why &quot;use the source Luke&quot; doesn&apos;t mean you can skip documentation..'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4295402754183265431</id><published>2010-03-11T06:15:00.000-08:00</published><updated>2010-03-11T06:57:28.677-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Bringing cmake to libtcod - Almost there...</title><content type='html'>From my original list:&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strike&gt;Build the example programs&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Add back opengl support&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Test linux &lt;/strike&gt;(and mac if I can get ahold of one) &lt;strike&gt;builds&lt;/strike&gt;.&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Seperate C and CPP libraries for linux. &lt;/strike&gt;&lt;/li&gt;&lt;li&gt;&lt;strike&gt;Install build stuff to root directory&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;A &lt;a href="http://doryen.eptalys.net/forum/index.php?topic=456.msg2976#msg2976"&gt;list&lt;/a&gt;  of nice to have.&lt;/li&gt;&lt;li&gt;Documentation! &lt;strike&gt;Quickstart guide!&lt;/strike&gt;&lt;/li&gt;&lt;li&gt;Work on issues provided by and try to convince maintainers of  libtcod that cmake is better.&lt;/li&gt;&lt;/ul&gt;Ignoring the mac build, which I still don't have, I only have the "nice things to have" (upx, &lt;strike&gt;electric fence&lt;/strike&gt;), documentation, and some cleaning up to do. &lt;br /&gt;&lt;br /&gt;CMakeLists.txt is now &lt;strike&gt;160&lt;/strike&gt; 163 lines of text so far. Compared to 1209 lines of makefiles it's doing the job of, its currently 7 1/2 times shorter. It is also one place to update the new/deleted files, as opposed to 8 makefiles + a codeblocks project that exists somewhere.&lt;br /&gt;&lt;br /&gt;Assuming upx and friends don't take forever, I'm figuring one more good afternoon is all it will take to get a passable build done.&lt;br /&gt;&lt;br /&gt;Update: Scratch electric fence, it was a 3 liner over breakfast.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4295402754183265431?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4295402754183265431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4295402754183265431' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4295402754183265431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4295402754183265431'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-almost-there.html' title='Bringing cmake to libtcod - Almost there...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6552544017669002334</id><published>2010-03-10T07:00:00.000-08:00</published><updated>2010-03-10T07:00:08.533-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Bringing cmake to libtcod - And then there was Linux</title><content type='html'>Since my last post I've accomplished a few things. One of them includes:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S5ex6S8IA_I/AAAAAAAAAPc/d1NfMhsMltM/s1600-h/libtcod_sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/S5ex6S8IA_I/AAAAAAAAAPc/d1NfMhsMltM/s320/libtcod_sample.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The sample programs were ridiculously easy to move to cmake. Almost one liners in fact.&lt;br /&gt;&lt;br /&gt;Beyond that, opengl has been added back. That was pretty easy, find_package has to be the coolest macro in cmake. &lt;br /&gt;&lt;br /&gt;Linux support happened this morning. Other than some &lt;a href="http://blogs.plexibus.com/2010/01/04/bashisms-and-ubuntu/"&gt;bashisms&lt;/a&gt; in my script to generate the cmake files, all it took was a few more find_packages to use the system headers/libraries.&lt;br /&gt;&lt;br /&gt;Last thing of note was a quickstart document was written up, to get people started using cmake if they want to try it out. On libtcod's SVN head, its cmake/QuickStart.txt&lt;br /&gt;&lt;br /&gt;Still a lot to do, but I'm getting there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6552544017669002334?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6552544017669002334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6552544017669002334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6552544017669002334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6552544017669002334'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-and-then.html' title='Bringing cmake to libtcod - And then there was Linux'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/S5ex6S8IA_I/AAAAAAAAAPc/d1NfMhsMltM/s72-c/libtcod_sample.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2094714941609465589</id><published>2010-03-09T07:01:00.000-08:00</published><updated>2010-03-09T07:03:07.750-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod'/><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Bringing cmake to libtcod - First Successes</title><content type='html'>I just checked in cmake files that will build libtcod and libtcod-gui under both visual studio and msys/mingw. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S5Zg4fHlSxI/AAAAAAAAAPM/VP3Srl-kN2U/s1600-h/VCProj+First+Steps.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S5Zg4fHlSxI/AAAAAAAAAPM/VP3Srl-kN2U/s1600/VCProj+First+Steps.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="85" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/S5Zg4fHlSxI/AAAAAAAAAPM/VP3Srl-kN2U/s400/VCProj+First+Steps.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_HGdMxBYRQLs/S5Zg8jZlgXI/AAAAAAAAAPU/YH1U04zyV0k/s1600-h/MSYS+First+Steps.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_HGdMxBYRQLs/S5Zg8jZlgXI/AAAAAAAAAPU/YH1U04zyV0k/s320/MSYS+First+Steps.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I still have a laundry list of things to do left including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Build the example programs&lt;/li&gt;&lt;li&gt;Add back opengl support&lt;/li&gt;&lt;li&gt;Test linux (and mac if I can get ahold of one) builds.&lt;/li&gt;&lt;li&gt;Seperate C and CPP libraries for linux. &lt;/li&gt;&lt;li&gt;Install build stuff to root directory&lt;/li&gt;&lt;li&gt;A &lt;a href="http://doryen.eptalys.net/forum/index.php?topic=456.msg2976#msg2976"&gt;list&lt;/a&gt; of nice to have.&lt;/li&gt;&lt;li&gt;Documentation! Quickstart guide!&lt;/li&gt;&lt;li&gt;Work on issues provided by and try to convince maintainers of libtcod that cmake is better.&lt;/li&gt;&lt;/ul&gt;But I am happy with what I've accomplished so far.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2094714941609465589?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2094714941609465589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2094714941609465589' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2094714941609465589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2094714941609465589'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/bringing-cmake-to-libtcod-first.html' title='Bringing cmake to libtcod - First Successes'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/S5Zg4fHlSxI/AAAAAAAAAPM/VP3Srl-kN2U/s72-c/VCProj+First+Steps.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2811129656569691938</id><published>2010-03-08T17:08:00.000-08:00</published><updated>2010-03-08T17:08:40.564-08:00</updated><title type='text'>A truckload full of random updates...</title><content type='html'>So it's been more than a week since my last post, which is more than twice what I strive for (1.75/week). A variety of reasons are to blame for this, so I figured I'd comment on the relevant ones. &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Illness - Have to love the times of year when everyone in the office seems to get sick.&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Dragon_Age"&gt;Dragon Age&lt;/a&gt; - I just finished this game this weekend. I'm in the weird position of really really enjoying the game, but suggesting that others not buy the game and boycotting the expansion myself. The game comes with &lt;a href="http://en.wikipedia.org/wiki/Downloadable_content"&gt;DLC&lt;/a&gt; (downloadable content) that requires authentication against EAs server to use. I didn't know that when I purchased the game. That means if you download the new armor and character, you can't play single player if you don't have an internet connection. Considering the &lt;a href="http://arstechnica.com/gaming/news/2010/03/ubisoft-on-drm-snafu-servers-attacked-pirates-locked-out.ars"&gt;problems&lt;/a&gt; that this can cause, I refuse to support games that do this.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://doryen.eptalys.net/"&gt;libtcod&lt;/a&gt; - The base library that Magecrawl is built upon (via &lt;a href="http://code.google.com/p/libtcod-net/"&gt;libtcod-net&lt;/a&gt;). While working on a bit of research that I'm not ready to open the lid on, I came across the build system, which is makefiles. Since my last post was a rant, I'll spare you the feeling on make. I'm working on adding &lt;a href="http://www.cmake.org/"&gt;cmake&lt;/a&gt; support, and was making great progress before getting sick. It's my goal to finish that before continuing work on Magecrawl.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2811129656569691938?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2811129656569691938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2811129656569691938' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2811129656569691938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2811129656569691938'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/03/truckload-full-of-random-updates.html' title='A truckload full of random updates...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5093797236813870220</id><published>2010-02-27T08:55:00.000-08:00</published><updated>2010-02-27T08:58:42.284-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>The joys of software activation. (/Sarcasm)</title><content type='html'>(This post has nothing to do directly with magecrawl nor programming. Blogger doesn't apparently like pseudo-xml tags in the title or the post).&lt;br /&gt;&lt;br /&gt;So this morning I woke up hoping to get some work done on magecrawl before I had to leave for Houston for the weekend. I log into my machine to find the background is black and a popup telling me my copy of Windows isn't "genuine". I find this amusing, since I have &lt;a href="http://en.wikipedia.org/wiki/MSDN"&gt;MSDN&lt;/a&gt; at work and am pretty blasted sure I used one of those images for this machine. It's the machine I use to VPN into work when I work from home.&lt;br /&gt;&lt;br /&gt;Well, I so find the spot on "My Computer"'s properties to ask it to try to validate again, and it fails. Alright, I'm not sure why it's failing, I'll go grab&lt;b&gt; another valid product key off MSDN&lt;/b&gt; and try again. Which I proceed to do, still doesn't validate. Sigh, so I kickoff another download of the 4 gigabyte Window ISO image off of MSDN.&lt;br /&gt;&lt;br /&gt;So on Sunday when I return, instead of programming I get the fun of reinstalling Windows and all my applications. Less hacking on magecrawl time for me.&lt;br /&gt;&lt;br /&gt;(Rant)&lt;br /&gt;&lt;rant&gt;&lt;/rant&gt;&lt;br /&gt;I understand the concept that Microsoft is a business and it needs to make money to keep paying people to improve things. I didn't pirate Windows, I have a blasted valid product key. Well, up to of them 10 it seems. What is frustrating is that me, one who didn't steal anything, is being called everything but a thief.&lt;br /&gt;&lt;br /&gt;I love C#, I think it is the best programming technology out there right now. Using visual studio when programming C# is so easy that I don't even reach for gvim most of the time. But now, because Microsoft decided to audit my machine overnight without my permission, I get a black background, an annoying popup, and an afternoon of work, even though I didn't do anything wrong. If I would have used a pirated version of Windows, I bet I wouldn't be having this problem now.&lt;br /&gt;&lt;br /&gt;I'm in the laptop market sometime this year, and I was deciding between a new Dell an a new Macbook Pro. Getting a Macbook Pro and installing &lt;a href="http://monodevelop.com/"&gt;Mono Develop&lt;/a&gt; on it is starting to sound very good right about now. They might cost more, but I hear they never call your a thief.&lt;br /&gt;&lt;br /&gt;(/Rant)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5093797236813870220?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5093797236813870220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5093797236813870220' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5093797236813870220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5093797236813870220'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/joys-of-software-activation.html' title='The joys of software activation. (/Sarcasm)'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3916418542295396414</id><published>2010-02-25T18:27:00.000-08:00</published><updated>2010-02-25T18:27:43.354-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Review: Dance of Death</title><content type='html'>As is every so often when I come across a game that looks interesting, this is a review of "&lt;a href="http://www.nolithius.com/dod"&gt;Dance of Death&lt;/a&gt;", a flash game that was mentioned on &lt;a href="http://groups.google.com/group/rec.games.roguelike.development/topics"&gt;RGRD&lt;/a&gt;. It's a "tech demo" at this point. As a flash game, it's very difficult to have issues getting the game to run, point your browser at the link and go.&lt;br /&gt;&lt;br /&gt;The first thing one comes across when they start the game is in the title screen, and then the character creation screen. I like the tabbed panels with shading, which makes it somewhat obvious when one is done. One issue I came across is that one can tab over a panel without spending its points and type a name to finish. Doing this will create a massively underpowered character, and being able to do so is most likely a bug.&lt;br /&gt;&lt;br /&gt;Since this game follows the standard practice of asking for name/race/stats/skills before the game starts, please don't consider it a criticism of it in particular. Games that do this ask the new player to answer questions they most likely don't have answers to yet. If I've never played before, how do I know what stat distribution I should use. Without playing the game, I have no idea of the usefulness of various skills, and so figuring out a skill distribution is difficult. I'm planning on the future of posting an entry entry on this point, so I digress.&lt;br /&gt;&lt;br /&gt;Beyond that, the character creation does a decent job at explaining what skills do as I distributed stat and skill points, so I created a melee fighter. &lt;br /&gt;&lt;br /&gt;The game has the feel of nethack in terms of room layout and color scheme (mostly white on black). Starting off on floor 0 was a bit humorous, as all real programmers number arrays that way (but maybe it should be floor 1). Controls seemed easy and expected. There was no diagonal movement, bump to attack was obvious and expected. Bump to open doors also worked as expected.&lt;br /&gt;&lt;br /&gt;Field of view, monsters with pathfinding, and equipment all are there. Each "slot" of equipment seems to have a single item type, and I'm unsure it does anything at this point. It seems that inventory "Examine" is broken, but beside that everything works as expected.&lt;br /&gt;&lt;br /&gt;The map generator seems to generate reasonable rooms with doors and stairs. Monsters were a bit sparse for my taste.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;There is a "Skills" pane that show your skills and attributes, along with an exp pool. It appears to be just stubbed out for now, and shows some of my stats as negative, which is amusing.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;For the first "tech demo" of this game that I've heard of, consider me pretty impressed. Development can be followed at the development blog &lt;a href="http://www.nolithius.com/"&gt;here&lt;/a&gt;. I'm looking forward for further development, fleshing out what this game has to offer beyond infrastructure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3916418542295396414?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3916418542295396414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3916418542295396414' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3916418542295396414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3916418542295396414'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/review-dance-of-death.html' title='Review: Dance of Death'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5537933811708944499</id><published>2010-02-24T18:17:00.000-08:00</published><updated>2010-02-24T18:17:17.312-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>It's amazing I wrote some of this old code...and yet I don't regret it.</title><content type='html'>Another of the mini-goals of this iteration was to provide a "Welcome/Title" screen to magecrawl, allowing the player a place to enter a character name and choose between save files. As I might have mentioned before, this "attempt" at Magecrawl is not my first. I've written parts of my game before in C/C++/python before a settling on C#. My wonderful wife has heard more than one time about me throwing everything away and starting again (or wanting to). I had the title/welcome screen from a previous attempt laying around in an old svn account, so I figured I'd salvage that as a good place to start.&lt;br /&gt;&lt;br /&gt;My goodness, if I didn't know for sure I was the author, I'd want to &lt;b&gt;disown &lt;/b&gt;this code. Ignoring the horrible style of capitalization and spacing I must have once liked, I've found multiple WTF moments. See &lt;a href="http://www.osnews.com/story/19266/WTFs_m"&gt;this&lt;/a&gt;. One involved a corner cases with the color scheme that sometimes overflows into an exception. One was a half a dozen lines of code trying to reinvent Path.GetFileNameWithoutExtension(), and doing it poorly. The other memorable one was me declaring an enum to record what menu item we were pointing to, then ignoring it in a half a dozen places and comparing directly against (0,1,2). I hadn't given the enum a numerical set of values, so it just "happened" to work. &lt;br /&gt;&lt;br /&gt;There is a proverb in &lt;a href="http://en.wikipedia.org/wiki/Go_%28game%29"&gt;Go&lt;/a&gt; that says, "&lt;a href="http://senseis.xmp.net/?LoseYourFirst50GamesAsQuicklyAsPossible"&gt;Lose  your first 50 Games as quickly as possible&lt;/a&gt;". The idea is that in the  beginning, you don't know what you are doing, so don't overthink your  moves. After 50 games, you can begin to see what looks like a good move  and why people play as they do.&lt;br /&gt;&lt;br /&gt;I'm starting to think the same idea might be valid for programming a roguelike as well. Experience has taught me, and while I wouldn't suggest throwing all your work away over and over again (like I did), just getting out there and coding will make you a better coder. While I haven't entered a &lt;a href="http://roguebasin.roguelikedevelopment.org/index.php?title=7DRL"&gt;7 Day Roguelike context&lt;/a&gt; myself, it sounds like something I'd suggest and should do myself in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5537933811708944499?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5537933811708944499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5537933811708944499' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5537933811708944499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5537933811708944499'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/its-amazing-i-wrote-some-of-this-old.html' title='It&apos;s amazing I wrote some of this old code...and yet I don&apos;t regret it.'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-2967914189378043657</id><published>2010-02-21T20:41:00.000-08:00</published><updated>2010-02-21T20:42:52.306-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Lightning Bolts, Fireballs, and Blasts of Winter - New spells types</title><content type='html'>This weekend I did get a day to hack on Magecrawl some more, this time with user visible features. I added new spell types and targeting feedback to help you aim and you cast primal arcane might upon your foes.&lt;br /&gt;&lt;br /&gt;The first type of spell isn't technically new. Lightning bolts (or any type of possibly bouncing line blasts) were in the tech demo. However, the aiming "halo" makes aiming them much easier.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_HGdMxBYRQLs/S4IGmQOJqVI/AAAAAAAAAPE/0aQ5fBr22GM/s1600-h/LightningBoltsTargetting.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_HGdMxBYRQLs/S4IGmQOJqVI/AAAAAAAAAPE/0aQ5fBr22GM/s320/LightningBoltsTargetting.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;"Cones" are easier seen than explained:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S4IGivQnoKI/AAAAAAAAAO0/sTd9FIdZzSo/s1600/ConeTargetting.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_HGdMxBYRQLs/S4IGivQnoKI/AAAAAAAAAO0/sTd9FIdZzSo/s320/ConeTargetting.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And what self respecting mage wouldn't have a fireball spell up their sleeve. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; color: black; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_HGdMxBYRQLs/S4IGivQnoKI/AAAAAAAAAO0/sTd9FIdZzSo/s1600-h/ConeTargetting.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_HGdMxBYRQLs/S4IGkrSSfBI/AAAAAAAAAO8/RHigMV6BWSM/s1600-h/Fireball+Targetting.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_HGdMxBYRQLs/S4IGkrSSfBI/AAAAAAAAAO8/RHigMV6BWSM/s320/Fireball+Targetting.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-2967914189378043657?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/2967914189378043657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=2967914189378043657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2967914189378043657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/2967914189378043657'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/lightning-bolts-fireballs-and-blasts-of.html' title='Lightning Bolts, Fireballs, and Blasts of Winter - New spells types'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HGdMxBYRQLs/S4IGmQOJqVI/AAAAAAAAAPE/0aQ5fBr22GM/s72-c/LightningBoltsTargetting.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-8204218548110914881</id><published>2010-02-18T21:59:00.000-08:00</published><updated>2010-02-18T21:59:10.522-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>The evils of duplication and DRY...</title><content type='html'>For those who've taken formal software engineering education or have programmed as a career, this post might something you've already heard of. However, I found myself coming back to this principle again while working on some code, and I figured it deserved a post nevertheless.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/DRY"&gt;DRY&lt;/a&gt;: "Don't repeat yourself". Originally formulated in &lt;a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1266557444&amp;amp;sr=8-1"&gt;Pragmatic Programmer&lt;/a&gt; (a great book I read as an intern), this guideline for software development is simple and to the point. The idea is that you should never have two places that contain duplicate representations of any given fact. &lt;br /&gt;&lt;br /&gt;The most obvious implication of this is that you shouldn't copy code. If two places need a given chunk of functionality, abstract it to a base class, static method, helper class, etc. At work, I've heard this copying known as the "editor inheritance" pattern, the "editor" being your text editor. &lt;br /&gt;&lt;br /&gt;Even if you don't copy paste your way into this situation, it is easy to run into in other ways. In magecrawl, the two ways to invoke a spell-like affect is via the "Cast Spell" screen and selecting an inventory item and selecting the use verb. I found that keyboard handler for both these screens were 99% identical. In the beginning, spells and spell like affects had no targeting possibilities, they always targeted the player. As I added targeting, I added it to both places not realizing the duplication. This became a problem when I wanted to add a new targeting type later on and nearly missed one of the two copies.&lt;br /&gt;&lt;br /&gt;I find that when I find these areas, the best thing to do is address it either "right now" if your in development, or as soon as the next release occurs if your stabilizing for a release. I shelve whatever changes I was working on, and figure out how to remove the duplication. In my case above, I created a base class that contained the common code and had both classes inherit it. I then tested it thoroughly and submitted it before working on new features. Your refactoring hat and your new feature hat shouldn't be on at the same time, you look silly when you try. :)&lt;br /&gt;&lt;br /&gt;The more advanced implications of DRY involve not repeating yourself in more than just near identical code. The book mentioned above handles some of those cases, and maybe I'll come back to them in some future post (when it isn't nearly midnight as well).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-8204218548110914881?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/8204218548110914881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=8204218548110914881' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8204218548110914881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/8204218548110914881'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/evils-of-duplication-and-dry.html' title='The evils of duplication and DRY...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-3172537022515876546</id><published>2010-02-18T19:11:00.000-08:00</published><updated>2010-02-18T19:11:24.412-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Taking damage, how to represent health and armor in Magecrawl</title><content type='html'>Since I've got some downtime tonight and don't have access to my programming computer, I figured it'd be a good time to write down my thoughts on health and armor. But before that, I must ask that you read this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/CriticalExistenceFailure"&gt;TVTropes - Critical Existance Failure&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is one of the things I'd like to not do. Nearly every roguelike has a system that boils down to this. In Crawl and Nethack, and nearly every game in between, there is no difference between 100/100hp and 1/100hp. While convenient in its simplicity, it bugs me. On the other extreme end are games that track damage to every single limb, with slow healing that while makes the game "tatical", it also makes many unplayable in my opinion.&lt;br /&gt;&lt;br /&gt;Beyond the "one hp issue", there are other issues that need working out. Another is the randomness of combat in current Magecrawl. Armor has a chance to reduce the damage taken, and when added to the evade percentage, the player can go many rounds without taking damage and then suddenly loose half their hitpoints in a round to a "lucky" double strike.&lt;br /&gt;&lt;br /&gt;I haven't fleshed out all the repercussions of this idea, but here's what I'm thinking. The health of the player is divided into three parts over two bars:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Health - The lower end of the first bar. These are hitpoints that don't naturally regenerate over time. Only magical healing or long rest could heal these. They represent actual wounds, broken bones, and the such.&lt;/li&gt;&lt;li&gt;Stamina - The upper end of the first bar. These are the hitpoints that regenerate outside of battle. The outside of battle part is to prevent &lt;a href="http://roguebasin.roguelikedevelopment.org/index.php?title=Cheating"&gt;Pillar Dancing&lt;/a&gt; (which beyond &lt;a href="http://nethack.wikia.com/wiki/Elbereth"&gt;Elbereth&lt;/a&gt; is one of the cheesiest tactics in my opinion). Better armor will increase this amount (almost with some type of damage reduction and/or increased MP cost for spells). These represent ones ability to stay out of true mortal harm for some part of combat.&lt;/li&gt;&lt;li&gt;Shields (for lack of a better name) - This would be the second bar, only shown when you have an affect that provides it. In most RPGs, spells like "&lt;a href="http://www.d20srd.org/srd/spells/mageArmor.htm"&gt;Mage Armor&lt;/a&gt;" act the same as regular armor. I like the idea of it being forcing back damage due to your arcane will alone. When a spell that provides protection is active, this bar would be populated with a set of temporary hitpoints that take (some? all?) of the damage before stamina/health is taken from. It's length would be based upon spell proficiency, intelligence/willpower. I like the idea of it sapping from your mp during and after battle to recharge itself, giving it different flavor than stamina. I'm not sure how to get around Pillar Dancing if I do that however, unless it only does that when you don't move.&lt;/li&gt;&lt;/ul&gt;Beyond this, there has to be some penalty to taking some damage, beyond chance of death. I like the idea of stamina damage either slowing down your CT (longer time before turns), increasing MP cost of spells, or both. Health damage should be more crippling, such as slower movement, penalty to MP regeneration, and such.&lt;br /&gt;&lt;br /&gt;I'm trying to balance this with keeping the game fun. I'm hoping in this iteration to get some implementation of this system in and see how it plays. Any thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-3172537022515876546?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/3172537022515876546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=3172537022515876546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3172537022515876546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/3172537022515876546'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/taking-damage-how-to-represent-health.html' title='Taking damage, how to represent health and armor in Magecrawl'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-5849470546681844559</id><published>2010-02-18T07:02:00.000-08:00</published><updated>2010-02-18T07:02:24.171-08:00</updated><title type='text'>Getting bogged down a bit...</title><content type='html'>This week I've been getting bogged down and not finding much time to work on magecrawl. Some reasons for that include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Dragon_Age"&gt;Dragon Age&lt;/a&gt; - which for the linear story-driven RPG genre is an amazing game.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Olympics_2010"&gt;Winter Olympics&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Plants_vs._Zombies"&gt;Plant vs Zombie&lt;/a&gt; - humorous and well polished tower defense game.&lt;/li&gt;&lt;li&gt;Illness, my wife wasn't feeling well this last week and I've been fighting a bug as well.&lt;/li&gt;&lt;/ul&gt;Beyond that, it looks like the next bits I'll work on in magecrawl will include more fleshing out of magic and equipment. The magic work will add "Fireball" like exploding spells, "Cone of Cold" like spells, and the like. In equipment, I'm looking to handle hp in a more unique way, add shields, and one/two handed weapons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-5849470546681844559?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/5849470546681844559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=5849470546681844559' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5849470546681844559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/5849470546681844559'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/getting-bogged-down-bit.html' title='Getting bogged down a bit...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-441553307565433131</id><published>2010-02-14T21:14:00.000-08:00</published><updated>2010-02-14T21:14:03.885-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><category scheme='http://www.blogger.com/atom/ns#' term='Map Generator'/><title type='text'>Frustration with "stitch" map generator...</title><content type='html'>As I continue work on iteration 8 when I get a chance, I'm becoming somewhat frustrated with my "stitch" map generator. To understand my frustration, here is the 10000ft view of how it works.&lt;br /&gt;&lt;br /&gt;A graph of "nodes" is created, using probabilities from a map. That graph is dropped one node at a time onto a large "map", with the nodes next to each other in the graph next to each other. "Dropping" a node involved looking up one of multiple templates from a text file of that type, and placing it so the seams line up. If a node can't be dropped, we add it to a list of nodes we can drop later if we run into a room that doesn't have an output assigned. There is come complicated logic to prevent us from dropping a long group of halls and then being unable to place the endpoint room from leaving the hall. Once we have the graph generated into rooms, the map is "trimmed" so it isn't larger than it needs to be, checked for connectivity, and in/out stairs are placed.&lt;br /&gt;&lt;br /&gt;The flaw in the system that keeps biting me over and over again is the separation between the "graph" and the actual map. It makes some things that you'd think were easy, such as dropping doors between rooms difficult. The latest thing I was trying to fix was the fact that the map looked like a spreading tree (since it was). Once you went down a hallway, you'd never reach any of the rooms in any of the other hallways. My idea was to patch this by finding empty "seams" in rooms and trying to draw hallways between them if possible. After burning an hour, I'm frustrated since by the time I've reached the hallway placement stage, I've lost all the information on the map structure and which nodes I'm working on.&lt;br /&gt;&lt;br /&gt;I've booted the feature to iteration 9, and in that I'll decide if I want to refactor this map generation to something easier to work with or rewrite it new. Does anyone have any references to map generators that produce great looking maps with hallways, rooms, and such?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-441553307565433131?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/441553307565433131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=441553307565433131' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/441553307565433131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/441553307565433131'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/frustration-with-stitch-map-generator.html' title='Frustration with &quot;stitch&quot; map generator...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-4215082241332048332</id><published>2010-02-09T18:04:00.000-08:00</published><updated>2010-02-09T18:04:41.150-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Magecrawl'/><title type='text'>Targetting, bump to attack, and player's preferences...</title><content type='html'>Some of the feedback I received during the last tech demo includes a few complaints that when they'd hit 'a' to attack, the screen centering on the first available target was disorienting. While I personally didn't have this issue (or else I'd have coded it differently), I could see where they were coming from. Since I'm handling "low hanging fruit" early in this iteration (or procrastinating, depending on your point of view), this seemed like an easy thing to handle.&lt;br /&gt;&lt;br /&gt;I've covered this issue with two different fixes. The first being the inclusion of "bump to attack". This is a common feature in roguelikes, where moving into the same space as an enemy invokes a melee attack. I personally don't care for it. I've lost more than one character in games without "run in direction" when I held down an arrow key for a half a second too long and melee'd myself into oblivion.&lt;br /&gt;&lt;br /&gt;Magecrawl also has weapons with "reach" such as the spears, and bump to attack can prevent people from noticing their longer reach. In addition, some weapons either can't attack certain directions, or attack at lower strength; the attack key shows overlays making both these facts obvious, while bump to attack doesn't. Despite this, it is a convenient option, so I added it as a preference one can turn on.&lt;br /&gt;&lt;br /&gt;The second fix is a preference to disable all "auto targeting". When you request an action that requires targeting, magecrawl will try to pick an intelligent initial targeting position. This preference just skips all this code, and all targetting starts at the player's position.&lt;br /&gt;&lt;br /&gt;I'd like to spend a minute talking about preferences. Magecrawl isn't even a full game yet, and in addition to keyboard settings for every key, magecrawl has more than 15 preferences so far. A few are debugging settings, but most are documented in Preferences.xml. Each of these brings different behavior to magecrawl in some manner, which in theory requires additional testing and maintenance. The trick is to find a balance of providing great defaults, so people don't have to touch the preferences, and enough knobs that people can change the settings that are important to them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-4215082241332048332?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/4215082241332048332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=4215082241332048332' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4215082241332048332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/4215082241332048332'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/targetting-bump-to-attack-and-players.html' title='Targetting, bump to attack, and player&apos;s preferences...'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-6093542003285207301</id><published>2010-02-08T18:09:00.000-08:00</published><updated>2010-02-08T18:09:20.561-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod-net'/><title type='text'>libtcod-net 1.5.0rc1-2 released (fixes reported TCODRandom issue)</title><content type='html'>The issue reported &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/libtcod-net-150rc1-seems-to-have-issue.html"&gt;here&lt;/a&gt; has been debugged and fixed. The short answer for those not interested in the details is that I was using an API in libtcod wrong and that API was doing the wrong thing and corrupting its internal state. Get the newest &lt;a href="http://code.google.com/p/libtcod-net/"&gt;libtcod-net&lt;/a&gt; here.&lt;br /&gt;&lt;br /&gt;For those who are more technically minded, here's the story.&lt;br /&gt;&lt;br /&gt;In between libtcod 1.5.0b2 and 1.5.0rc1, the C API changed for creating TCOD_Random's. Previously, one could call TCOD_random_new(), however in this release they added two different RNG implementations. This function now take a paramater. The way to get the "default" RNG is to call TCOD_random_get_instance, which I did happily. I also added a new TCODRandom constructor that took the enum for those who cared, but that's beside the point. &lt;br /&gt;&lt;br /&gt;This worked, and seemed to be all I needed to do to fix libcod-net TCODRandom for the new API. However, there was an underlying issue. Sometimes in magecrawl, monsters and players would get into long stretchs (4000+ turns) of continual misses.&lt;br /&gt;&lt;br /&gt;After some detective work, the issue was found. TCODRandom, like all libtcod-net wrappers that handle unmanaged resources, implement &lt;a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx"&gt;IDisposable&lt;/a&gt;. The idea is that you, or the runtime, will call Dispose() on it to free the allocated memory. The issue is that the new api had a note that you weren't supposed to call TCOD_random_delete on the default RNG. When you did this, you free'ed the memory for the global instance, but not null it out. Due to the implementation of the RNG, it'd happily use the garbage memory giving random answer most of the time. Some times however, some of the garbage pointed to a segment of zero'ed out memory, and I'd see the long stretch of zero's.&lt;br /&gt;&lt;br /&gt;The solution was twofold. I updated libtcod-net to follow the API's rules and not delete the default RNG if that was how we implemented it. jice updated libtcod to not internally corrupt itself if you happened to do this. The joys of maintaining libtcod-net is that sometimes you get to track down memory corruption issues, even if you're written in c#. That is the fun of interfacing with unmanaged code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-6093542003285207301?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/6093542003285207301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=6093542003285207301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6093542003285207301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/6093542003285207301'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/libtcod-net-150rc1-2-released-fixes.html' title='libtcod-net 1.5.0rc1-2 released (fixes reported TCODRandom issue)'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-7136502064654847670</id><published>2010-02-07T20:53:00.000-08:00</published><updated>2010-02-08T18:09:46.750-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod-net'/><title type='text'>libtcod-net 1.5.0rc1 seems to have an issue with TCODRandom, beware.</title><content type='html'>Update: See &lt;a href="http://iferrorthrownewbrick.blogspot.com/2010/02/libtcod-net-150rc1-2-released-fixes.html"&gt;this &lt;/a&gt;for a solution. &lt;br /&gt;&lt;br /&gt;I've spent half of today debugging this issue. It appears that there is an issue I'm hitting in magecrawl where a TCODRandom gets stuck in a state where it returns 0's for every GetRandomInt call. I'm working with the maintainers of libtcod, but it appears the issue is one underlying libtcod itself.&lt;br /&gt;&lt;span class="hb"&gt;&lt;span class="g2" email="dominikmarczuk@gmail.com"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="hb"&gt;&lt;span class="g2" email="dominikmarczuk@gmail.com"&gt;The workaround is to use the constructor that takes an enum and pass is the MersenneTwister value.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="hb"&gt;&lt;span class="g2" email="dominikmarczuk@gmail.com"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="hb"&gt;&lt;span class="g2" email="dominikmarczuk@gmail.com"&gt;I'll update more when we find out more. I just didn't want anyone else to try to debug into their code for a few hours looking for sensor ghosts.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-7136502064654847670?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/7136502064654847670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=7136502064654847670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7136502064654847670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/7136502064654847670'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/libtcod-net-150rc1-seems-to-have-issue.html' title='libtcod-net 1.5.0rc1 seems to have an issue with TCODRandom, beware.'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9191282505396518907.post-1708365060347603842</id><published>2010-02-07T12:30:00.000-08:00</published><updated>2010-02-07T12:30:05.815-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libtcod-net'/><title type='text'>libtcod-net 1.5.0rc1 released!</title><content type='html'>libtcod-net 1.5.0rc1 has been released (same day as base library libtcod itself may I add :) ).&lt;br /&gt;&lt;br /&gt;The major changes include TCODPathFinding being removed. It's been split up into TCODAStrPathFinding and TCODDijkstraPathFinding. This is obviously an API break, but one that can be replaced with a simple find a replace. Beyond that:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TCODSystem::GetCurrentFontSize&lt;/li&gt;&lt;li&gt;New random number generator type and new default (ComplementaryMultiplyWithCarry)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;New functions - GetGaussianFloat, GetGaussianInt, Save&lt;/li&gt;&lt;li&gt;Removed functions - GetIntFromByteArray&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;ResetCreditsAnimation, which fixes an outstanding bug in Magecrawl.&lt;/li&gt;&lt;/ul&gt;Get it while it's hot. Thanks jice and team for another awesome release to build upon.&lt;br /&gt;&lt;br /&gt;http://code.google.com/p/libtcod-net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9191282505396518907-1708365060347603842?l=iferrorthrownewbrick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iferrorthrownewbrick.blogspot.com/feeds/1708365060347603842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9191282505396518907&amp;postID=1708365060347603842' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1708365060347603842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9191282505396518907/posts/default/1708365060347603842'/><link rel='alternate' type='text/html' href='http://iferrorthrownewbrick.blogspot.com/2010/02/libtcod-net-150rc1-released.html' title='libtcod-net 1.5.0rc1 released!'/><author><name>donblas</name><uri>http://www.blogger.com/profile/01580886845150965790</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
