<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Eat/Play/Hate</title>
	<atom:link href="http://eatplayhate.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://eatplayhate.wordpress.com</link>
	<description>The ramblings of a crazed mind</description>
	<lastBuildDate>Tue, 16 Aug 2011 13:27:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='eatplayhate.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Eat/Play/Hate</title>
		<link>http://eatplayhate.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://eatplayhate.wordpress.com/osd.xml" title="Eat/Play/Hate" />
	<atom:link rel='hub' href='http://eatplayhate.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Vindication</title>
		<link>http://eatplayhate.wordpress.com/2011/06/07/vindication/</link>
		<comments>http://eatplayhate.wordpress.com/2011/06/07/vindication/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:39:05 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[da2]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[Dragon Age 2]]></category>
		<category><![CDATA[vindication]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=688</guid>
		<description><![CDATA[Oh and before I forget &#8211; it has been a while since I&#8217;ve posted, after all. But, can you say &#8220;I told you so?&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=688&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" title="DA 2 Metacritic" src="http://i.imgur.com/1eO1I.jpg" alt="Looks like Laidlaw failed!" width="669" height="1053" /></p>
<p>Oh and before I forget &#8211; it has been a while since I&#8217;ve posted, after all. But, can you say &#8220;I told you so?&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/688/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=688&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/06/07/vindication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://i.imgur.com/1eO1I.jpg" medium="image">
			<media:title type="html">DA 2 Metacritic</media:title>
		</media:content>
	</item>
		<item>
		<title>WWDC Keynote!</title>
		<link>http://eatplayhate.wordpress.com/2011/06/07/wwdc-keynote/</link>
		<comments>http://eatplayhate.wordpress.com/2011/06/07/wwdc-keynote/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:16:16 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Macs]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bromance]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[keynote]]></category>
		<category><![CDATA[macs]]></category>
		<category><![CDATA[steve jobs]]></category>
		<category><![CDATA[wwdc]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=678</guid>
		<description><![CDATA[Just a quick one this morning &#8211; the keynote is in about 4 hours and I am so jetlagged it isn&#8217;t funny. I have no idea what time I even think it is. So yesterday, I got my WWDC badge, and was reminded by the Macbook user behind the counter that there are to be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=678&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://eatplayhate.files.wordpress.com/2010/07/steve-jobs.jpg"><img class="alignright size-medium wp-image-151" title="steve-jobs" src="http://eatplayhate.files.wordpress.com/2010/07/steve-jobs.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a>Just a quick one this morning &#8211; the keynote is in about 4 hours and I am so jetlagged it isn&#8217;t funny. I have no idea what time <em>I even think it is</em>. So yesterday, I got my WWDC badge, and was reminded by the Macbook user behind the counter that there are to be absolutely no photos or blog coverage about anything except the keynote. Including the lobby! Harsh, hey, especially as everything in the lobby (that I could see) was:</p>
<ol>
<li>Visible from outside</li>
<li>Already announced</li>
</ol>
<div>Actually, there was one thing that was odd; they had disinfectant dispensers on the counter at regular intervals. Random! Hopefully that isn&#8217;t a breach of Apple NDA. Anyway, I&#8217;m now sitting here drinking possibly the most expensive coffee I have ever had (room service, the Clift hotel doesn&#8217;t believe in providing you with emergency caffeine), trying to decide who in Apple greenlighted the jumper you get. It&#8217;s seriously the most weird thing I&#8217;ve ever attempted to wear. (Again, hopefully not breaking NDAs) it&#8217;s made entirely of stretchy, thin, artificial material which manages to be swelteringly hot and very clingy. I think I&#8217;ll give it a miss.</div>
<p></p>
<div>So, assuming they don&#8217;t kick me out for not having a Macbook, I&#8217;ll be tweeting (twittering?) live updates on my delicious account, <a href="http://twitter.com/eatplayhate">Eat/Play/Hate</a>. Meanwhile, E3 is on. Bah.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/678/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=678&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/06/07/wwdc-keynote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/07/steve-jobs.jpg?w=300" medium="image">
			<media:title type="html">steve-jobs</media:title>
		</media:content>
	</item>
		<item>
		<title>WWDC!</title>
		<link>http://eatplayhate.wordpress.com/2011/06/07/wwdc/</link>
		<comments>http://eatplayhate.wordpress.com/2011/06/07/wwdc/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:04:30 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Macs]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[aeroplanes]]></category>
		<category><![CDATA[air new zealand]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bromance]]></category>
		<category><![CDATA[hate]]></category>
		<category><![CDATA[macs]]></category>
		<category><![CDATA[steve jobs]]></category>
		<category><![CDATA[wwdc]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=672</guid>
		<description><![CDATA[So. I&#8217;m sitting on a plane (not while I post this, I might add &#8211; even if someone had the presence of mind to set up a wifi hotspot over the entire Pacific ocean I&#8217;m limited by the fact that radio waves make planes fall out of the sky), heading towards possibly the most daunting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=672&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://eatplayhate.files.wordpress.com/2011/06/wwdc.jpg"><img class="alignright size-medium wp-image-674" title="wwdc" src="http://eatplayhate.files.wordpress.com/2011/06/wwdc.jpg?w=223&#038;h=300" alt="" width="223" height="300" /></a>So. I&#8217;m sitting on a plane (not while I post this, I might add &#8211; even if someone had the presence of mind to set up a wifi hotspot over the <em>entire</em> Pacific ocean I&#8217;m limited by the fact that radio waves make planes fall out of the sky), heading towards possibly the most daunting experience I could imagine. I am going to the Apple &#8220;World Wide Developer Conference&#8221;. Apparently I didn&#8217;t have enough of a reason to go to E3 (disappointing!), so work has packed me up and sent me off to keep abreast of the developments in the Cult of Jobs. This post serves to document the man I was &#8211; just incase they manage to get their claws into me during the biggest brainwashing event of the year. I&#8217;ve already left myself a video message which hopefully will point me in the right direction should I suddenly get the urge to wear turtlenecks and tight, tight jeans.</p>
<p><span id="more-672"></span></p>
<p>I have to say, I was much more excited about going to GDC. I still am enough of a kid to get excited at the prospect of flying on a plane. I mean, how couldn&#8217;t you? You get to eat some weird food on a tray, people will rub swabs all over you to have a machine tell you that you smell of explosives, and you get to be put in extremely close proximity to someone who you don&#8217;t know and almost certainly won&#8217;t like for <em>hours and hours</em>. This particular trip does have some bonuses, however &#8211; as it&#8217;s not just for education but is actually &#8220;work&#8221;, I get to fly premium enonomy (the games industry hasn&#8217;t been able to afford business class since the GFC), something which I have been pining for since work first sent me to the US. From the almost reasonable legroom to the Champagne (well, sparkling wine &#8211; it&#8217;s not first class after all) you get when you board. You know, they actually even <em>know your name</em>.</p>
<p>But, I am getting waaay ahead of myself. The story starts in the gate lounge of Melbourne Airport. I had only an hour and a half ago hugged my partner goodbye (she was asleep, any more than that is probably illegal), and already I had begun to notice an almost unreasonable number of Apple Macbooks. Actually, any number of Macbooks is unreasonable &#8211; it&#8217;s a depressing reminder of just how gullible we are as a species. Not to mention that everyone with a Macbook (at least, at that time), had a certain&#8230; well, look about them. Maybe we could describe it as some form of ur-hipster. All of them had obviously spent at least an hour and a half on their hair and probably would describe themselves as &#8220;bi-curious&#8221;. After a while, one of them said to another group (I wonder what the collective noun for Mac users is? I&#8217;ll go with &#8220;bromance&#8221;) of them: &#8220;are you guys going to WWDC too?&#8221; The question dripped with &#8211; well, something that should never have gone past passport control. I sensed a general rumbling while everyone turned to the speaker, at which point, the entire bromance replied in the affirmative. One of the ringleaders quipped &#8220;you can always spot a cocoa developer!&#8221; Yes. Yes you can.</p>
<p>It hasn&#8217;t been premium all the way (I did have to mix with the proletariat, <em>quel horreur</em> as David Gaider would say) &#8211; and in my quest to discover the best airline (and to avoid Los Angeles airport, which is possibly the only major transit hub owned and operated by Satan himself), I&#8217;ve gone the roundabout route of going via New zealand. Via Air New Zealand, in fact. To be honest, I was expecting better (Singapore Airlines is still the king), but it&#8217;s at least better than Qantas, where they actively seek to harm you during your flight. I&#8217;ll be writing up some delicious reviews in the future, as I think they firmly sit in the &#8220;hate&#8221; section of my blog title. But that is for another time. Now, it is time for me to crash in this rather nice hotel, and steel myself for the coming week.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/672/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/672/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/672/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=672&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/06/07/wwdc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2011/06/wwdc.jpg?w=223" medium="image">
			<media:title type="html">wwdc</media:title>
		</media:content>
	</item>
		<item>
		<title>Can I just say&#8230;</title>
		<link>http://eatplayhate.wordpress.com/2011/01/02/can-i-just-say/</link>
		<comments>http://eatplayhate.wordpress.com/2011/01/02/can-i-just-say/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 17:10:24 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[bethany]]></category>
		<category><![CDATA[Dragon Age]]></category>
		<category><![CDATA[Dragon Age 2]]></category>
		<category><![CDATA[sister]]></category>
		<category><![CDATA[women]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=663</guid>
		<description><![CDATA[I was looking at my blog stats just then, and it seems that the top searches that point people here are: bethany dragon age 2 what should pulled pork look like i bought dragon age when it came out they ripped me off dragon age women dragon age sister 80286 memory addresses Amazing.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=663&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_664" class="wp-caption alignright" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2011/01/dragon-age-leliana-model-real-life.jpg"><img class="size-medium wp-image-664" title="dragon-age-leliana-model-real-life" src="http://eatplayhate.files.wordpress.com/2011/01/dragon-age-leliana-model-real-life.jpg?w=300&#038;h=217" alt="" width="300" height="217" /></a><p class="wp-caption-text">&quot;Dragon Age Women&quot;. GIS even returned a Maxim shot. Saucy.</p></div><br />
I was looking at my blog stats just then, and it seems that the top searches that point people here are:</p>
<ul>
<li>bethany dragon age 2</li>
<li>what should pulled pork look like</li>
<li>i bought dragon age when it came out they ripped me off</li>
<li>dragon age women</li>
<li>dragon age sister</li>
<li>80286 memory addresses</li>
</ul>
<p>Amazing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/663/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/663/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=663&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/01/02/can-i-just-say/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2011/01/dragon-age-leliana-model-real-life.jpg?w=300" medium="image">
			<media:title type="html">dragon-age-leliana-model-real-life</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmers, virtual functions and interviews</title>
		<link>http://eatplayhate.wordpress.com/2011/01/01/programmers-virtual-functions-and-interviews/</link>
		<comments>http://eatplayhate.wordpress.com/2011/01/01/programmers-virtual-functions-and-interviews/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 10:23:56 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[CPlusPlus]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cplusplus]]></category>
		<category><![CDATA[disassembly]]></category>
		<category><![CDATA[inlining]]></category>
		<category><![CDATA[JIT]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[virtual functions]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=626</guid>
		<description><![CDATA[Programmers! Who needs them anyway? Well, it turns out that we in the games industry can sometimes find a use for them. One of my duties (perhaps surprisingly, especially to those who have met me) is to interview prospective games programmers and cast off any aspersions they have to the job. In my experience, applicants [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=626&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_627" class="wp-caption alignright" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2011/01/programmer-coder.jpg"><img class="size-medium wp-image-627" title="programmer-coder" src="http://eatplayhate.files.wordpress.com/2011/01/programmer-coder.jpg?w=300&#038;h=187" alt="" width="300" height="187" /></a><p class="wp-caption-text">Google image search can be quite unexpected sometimes.</p></div>
<h3>Programmers!</h3>
<p>Who needs them anyway? Well, it turns out that we in the games industry can sometimes find a use for them. One of my duties (perhaps surprisingly, especially to those who have met me) is to interview prospective games programmers and cast off any aspersions they have to the job.</p>
<p>In my experience, applicants tend to come in one of the following flavours:</p>
<ul>
<li><strong>computer science students</strong> (making up about 90%) can&#8217;t program their way out of a singly-linked cardboard box. They have just graduated university (or sometimes, inexplicably, have been working as a programmer for several years). They have once heard of the term &#8220;algorithm&#8221;, and almost all of them have come out of a Computer Science course with <em>obscene</em> marks (furthering my belief that CS courses in uni are taught predominantly by lunatics);</li>
<li><strong>software engineers</strong>, people for whom boost and the STL are the second coming of Jesus, people who seriously believe that someone has a use for a <em>hash_multidequeue</em>. They are mercifully rare and generally don&#8217;t last long because the games industry doesn&#8217;t fit their ideas of a well run system;</li>
<li>finally, we have the <strong>dungeon masters</strong>, people who dissolve caramel sweets into orange juice &#8211; while lecturing their senior programmers about the length of the integer ALU on the Motorola 68060, and how we should really be &#8220;thinking more about pipelining&#8221;. While the first group of applicants invariably becomes a group that doesn&#8217;t understand how much better <em>other programmers</em> are, this group becomes the set which doesn&#8217;t understand how much worse they <em>personally</em> are. Obviously I am part of this group.</li>
</ul>
<p>Occasionally, you get a hire-able person from of any of the three above, or, even more rarely, you find someone actually worth their salt (yes, we still pay people with salt in the games industry, times are hard). However, I am not here to talk about any of them &#8211; that was one of my tangents. I am here to talk about the people who read <a href="http://gamedev.net">Gamedev</a> or <a href="http://gamasutra.com">Gamasutra</a>, and believe everything in it &#8211; to the point where they repeat tired old maxims that have been perpetuated by the generation of programmers that refuses to use C++ because &#8220;all that OO stuff makes it slow&#8221;.</p>
<p>So, we lurch inexorably towards the point of this post. Virtual functions. I have told all of my team to get over it and use them where it makes sense (which is often quite a common occurrence), but I keep hearing people in interviews telling me that virtual functions are slow. So, like the scientist I am, I decided to find out once and for all what the deal truly is.</p>
<p><span id="more-626"></span>Let&#8217;s get down to business: why are virtual functions slow? Apart from the obvious &#8220;they aren&#8217;t&#8221;, theoretically they are slow because instead of the compiler emitting something like this:</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2</div>
</td>
<td class="code" valign="top">
<div>
<pre><strong>mov</strong> ecx, object_address
<strong>call</strong> some_address</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The compiler has to generate code to find out what function to call:</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2<br />
3<br />
4</div>
</td>
<td class="code" valign="top">
<div>
<pre><strong>mov</strong> ecx, object_address
<strong>mov</strong> eax, [ecx]
<strong>mov</strong> eax, [eax + vtable_index]
<strong>call</strong> eax</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The instructions themselves are not particularly expensive, the &#8220;slow&#8221; part (at least, according to received knowledge) is the potential cache miss caused by locating the real function address from the vtable (stored in the first few bytes of the object). Now, back in the days of the 486, this could be a problem &#8211; the extra size of the vtable, the slowness of memory access and the small CPU cache added up to a measurable performance impact. But what about now? My <em>phone</em> has about 100x the power of the first PC I ever owned (and I&#8217;m not including the ancient BBC Micro I inherited) &#8211; surely things have changed.</p>
<p>So, I constructed a test, I made a base class, a derived class, and two functions &#8211; one virtual, one not. The functions do some trivial maths on an argument and access a member variable (we have to do some <em>actual work</em> or the optimizer will simply remove the whole thing). The functions all follow this pattern:</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2<br />
3<br />
4</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#0000ff;">int</span> Test(<span style="color:#0000ff;">int</span> i)
{
    <span style="color:#0000ff;">return</span> m_Test * (i - 1);
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>I am using MSVC 2010 in stock release mode (minus link-time code generation, you&#8217;ll see why eventually). The functions are being timed by the high performance counter (RDTSC with multicore fixes via <a href="http://msdn.microsoft.com/en-us/library/ms644904(v=vs.85).aspx">QueryPerformanceCounter</a>) and the operation is being run 10,000,000 times. Here are the results:</p>
<ul>
<li>Virtual function: 0.063s</li>
<li>Normal function: 0.018s</li>
</ul>
<p><em>Holy balls!</em> The virtual function is <strong>3x</strong> slower! Because it&#8217;s impossible for me to be wrong, I looked at the generated assembly code to find out what was really going on.</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2<br />
3<br />
4<br />
5<br />
6</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#008000;">// Virtual function</span>
<strong>mov</strong>	edx, DWORD PTR [edi]
<strong>mov</strong>	eax, DWORD PTR [edx]
<strong>push</strong>	esi
<strong>mov</strong>	ecx, edi
<strong>call</strong>	eax</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#008000;">// Normal function</span>
<strong>add</strong>	DWORD PTR _value$[ebp], eax
<strong>add</strong>	DWORD PTR $T68661[ebp], edx
<strong>add</strong>	DWORD PTR $T68662[ebp], esi
<strong>add</strong>	DWORD PTR $T68663[ebp], edi
<strong>add</strong>	edx, ecx
<strong>add</strong>	eax, ecx
<strong>add</strong>	esi, ecx
<strong>add</strong>	edi, ecx</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>While the first bit of code looks is a function call, the second one has been inlined to buggery. Inlining is an optimization method which basically copies and pastes the function body into the caller&#8217;s assembly, avoiding the (apparently costly) assembly <strong>call</strong> operation and the function prologue and epilogue (which usually consists of a few stack <strong>push</strong> and <strong>pop</strong> instructions).</p>
<p>I modified the code to add a control function call (the Win32 API call <a href="http://msdn.microsoft.com/en-us/library/ms724408(v=vs.85).aspx">GetTickCount</a>), and a non-virtual call to a function which was defined in another module (rather than just the header). By putting code in another module, we&#8217;re denying the compiler the opportunity to inline the code (at least, when link-time code generation is turned off). I&#8217;ve left the virtual function in the header, because it is clearly not being inlined. These were the results:</p>
<table class="reviewscores">
<thead>
<tr>
<td class="gentableheader">Method Type</td>
<td class="gentableheader">Time (seconds)</td>
</tr>
</thead>
<tbody>
<tr>
<td>Control</td>
<td class="gentablescore">0.075</td>
</tr>
<tr>
<td>Virtual Function</td>
<td class="gentablescore">0.063</td>
</tr>
<tr>
<td>Normal Function</td>
<td class="gentablescore">0.018</td>
</tr>
<tr>
<td>Non-inlined Normal Function</td>
<td class="gentablescore">0.047</td>
</tr>
</tbody>
</table>
<p>Suddenly, the gap has changed to a mere 20%. Still significant, but a lot better than 70%. But&#8230; there&#8217;s more. In this case, the function is being called via a member variable of the testing function&#8217;s class. The virtual method call is, as far as I am concerned, not strictly required &#8211; the type of the object is <strong>concrete</strong> at the calling site, but the optimizer doesn&#8217;t appear to realize this. However, things change if we call the method through a <em>local</em> variable rather than a member variable. The optimizer, recognizing that the type is known, inlines the function &#8211; somehow making it even<em> faster</em> than the normal inlined function at <strong>0.005</strong>s (3x faster than the normal inlined function). The asm is totally different (no idea why, optimizers are unpredictable), which explains the discrepancy.</p>
<p>As is often the problem with benchmarks, they don&#8217;t represent real world situation. Recognizing this, I&#8217;ve changed the function payload (and the control) to look more like a real function rather than a getter, making them like this:</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers">
<div>1<br />
2<br />
3<br />
4</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#0000ff;">int</span> Test(<span style="color:#0000ff;">int</span> i)
{
    <span style="color:#0000ff;">return</span> m_Test * (i - 1) * GetTickCount();
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>So, how does this fare?</p>
<table class="reviewscores">
<thead>
<tr>
<td class="gentableheader">Method Type</td>
<td class="gentableheader">Time (seconds)</td>
</tr>
</thead>
<tbody>
<tr>
<td>Control</td>
<td class="gentablescore">0.088</td>
</tr>
<tr>
<td>Virtual Function</td>
<td class="gentablescore">0.095</td>
</tr>
<tr>
<td>Normal Function</td>
<td class="gentablescore">0.077</td>
</tr>
<tr>
<td>Non-inlined Normal Function</td>
<td class="gentablescore">0.095</td>
</tr>
<tr>
<td>Concrete Virtual (inlined)</td>
<td class="gentablescore">0.077</td>
</tr>
</tbody>
</table>
<p>What a surprise. Suddenly the whole virtual/nonvirtual thing gets blown out of the water. It turns out, unsurprisingly, that when you have a function that actually does work (or, for example, calls another function), the virtual call overhead just melts away into the background. I admit, virtual calls cost slightly more than nonvirtual calls, especially if the function itself is very cheap. But more importantly, inlining is really awesome and the compiler should do it all the time; and unfortunately, the optimizer isn&#8217;t that great at recognizing when a type is concrete.</p>
<p>There are a few extra considerations about inlining. First, LTCG isn&#8217;t a silver bullet. My non-inlined function didn&#8217;t get inlined when I turned on link-time code generation, until I moved the definition into the same module as the call site. Second, library calls defined in headers and .lib files don&#8217;t get inlined properly &#8211; infact, the only function that seemed to be inlined when I moved the definitions to a static library was the concrete virtual one (which makes no sense, especially since the library didn&#8217;t even export the other functions).</p>
<p>But it doesn&#8217;t end there! What about C#? It&#8217;s always been my belief that C# is what happens when someone who actually has a vague idea of what they&#8217;re doing decides to write a programming language. Remembering one of the oddities of C# (that all method calls are compiled down to the <strong>MSIL</strong> instruction <em>callvirt</em>) I repeated the tests, expecting it to do pretty well. It turns out that the JIT optimizer, while formidable, is even less effective at recognizing concrete types &#8211; all virtual functions were called through a vcall, even for locally defined objects. Interestingly, if the function is not marked virtual (or it is a struct member), the JIT compiler <em>will</em> inline it. And it will do an amazing job, too &#8211; it can inline any method from any class &#8211; even one in a <em>different DLL</em>!</p>
<p>Time for a verdict: virtual calls are marginally slower than nonvirtual calls, but any real performance difference probably comes from inlining rather than the virtual call overhead. Conclusion: <strong>get over it and stop mentioning it in interviews.</strong> Alright, I&#8217;ll put in a caveat &#8211; x86 (and x64) are both very forgiving architectures, and vcalls cost more on more rubbish platforms &#8211; but, they&#8217;re necessary constructs for well designed code, and you can take them from my cold, dead hands.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=626&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/01/01/programmers-virtual-functions-and-interviews/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2011/01/programmer-coder.jpg?w=300" medium="image">
			<media:title type="html">programmer-coder</media:title>
		</media:content>
	</item>
		<item>
		<title>Dragon Age: Origins DLC &#8211; Leliana&#8217;s Song</title>
		<link>http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/</link>
		<comments>http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 07:09:06 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Game Reviews]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[DLC]]></category>
		<category><![CDATA[Dragon Age]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[hate]]></category>
		<category><![CDATA[leliana]]></category>
		<category><![CDATA[leliana's song]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[RPG]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=593</guid>
		<description><![CDATA[Where can you find a vague sense of dissatisfaction, three hours less life than you started with, and a whole two weeks of implied raping, for the low, low price of $7? In retrospect, there are actually quite a few answers to that question, although the correct one is the Dragon Age: Origins DLC, Leliana&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=593&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot1.jpg"><img class="aligncenter size-full wp-image-612" title="DLC2-Hot" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot1.jpg?w=680&#038;h=383" alt="" width="680" height="383" /></a></p>
<p>Where can you find a vague sense of dissatisfaction, three hours less life than you started with, and a whole two weeks of implied raping, for the low, low price of $7? In retrospect, there are actually quite a few answers to that question, although the <em>correct</em> one is the Dragon Age: Origins DLC, <em>Leliana&#8217;s Song</em>.  It&#8217;s set a few years before the events of DA: O, and chronicles Leliana&#8217;s fall from grace &#8211; the role of an Orlesian &#8220;bard&#8221; (criminal), her mentor&#8217;s betrayal, and her subsequent induction into (or should I say, &#8220;indoctrination by&#8221;) the Chantry.</p>
<blockquote><p>Assume the role of Leliana, a young bard involved in a criminal ring that deals in political secrets. Accompanying her mentor Marjolaine on a high-risk mission, Leliana soon finds herself entangled in a game of intrigue that she cannot escape with just her beauty, charm, or stealth. The only way out of this game is to kill or be killed.</p></blockquote>
<div id="attachment_597" class="wp-caption alignleft" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc2-castle.jpg"><img class="size-medium wp-image-597" title="DLC2-Castle" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-castle.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">If this were DA2, those pumpkins would be ~animu-styled~ and on fire.</p></div>
<p>The story &#8220;opens&#8221; with you performing minor acts of vandalism and violence for your mentor, Marjolaine, in the market district of Denerim. Knocking out and humiliating a captain of the City Watch, bashing up a nobleman, stealing from a few merchants, etc. It was a little slow paced and slightly underwhelming &#8211; like a Neverwinter Nights community module. It did, however, have some goals beyond &#8220;kill this person&#8221;; it even had a small amount of actual writing.</p>
<p>I have to say, this was the best part of the module &#8211; it even looked like it had a branching &#8220;plot&#8221; (insomuch as there was a plot at all). As part of your brief, you&#8217;re meant to cause trouble, such as planting stolen goods on unconscious noblemen and making it look like one of your targets is an apostate. There are lots of possible combinations, but, sadly, after an hour of experimenting, I can save everyone the effort and tell you that there is only one option which does anything &#8211; to place every single incriminating item on the captain of the watch.</p>
<p>You see, this kind of half-assery is what infests DLC as a whole. The last real expansion of note for an RPG was the sublime Shivering Isles for Oblivion. Which was released, wait for it, four years ago. DLC is a plague on gaming in much the same way as consoles, and the newly christened wankery of <em>casual gamers</em>. After all, they disabled friendly fire from Dragon Age 2 for the console &#8220;gamers&#8221; (I use the term loosely), but they removed the <em>option</em> for friendly fire from the UI just in case it confused the casual player mouthbreathers (seriously, Bioware were concerned they might accidentally turn it on and smash their Xbox in a fit).</p>
<div id="attachment_606" class="wp-caption alignright" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc2-littledragon.jpg"><img class="size-medium wp-image-606" title="DLC2-LittleDragon" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-littledragon.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">This is the kind of party I wish I were invited to. The kind with <em>murder</em>.</p></div>
<p>Anyway, the plot continues with a break in (to a castle map recycled from DA: O), another break in (to the same map &#8211; you wouldn&#8217;t want to blow the budget), a predictable betrayal followed by a harrowing suggestion that your protagonist spent 2 weeks chained in a dungeon &#8220;satisfying the guards&#8221; (complete with <a href="http://eatplayhate.files.wordpress.com/2010/09/dlc2-disturbing.jpg">disturbing imagery</a>). The last half an hour of the module allows you to escape, take out bloody revenge on your mentor and captor, and finish it off with a short detour into religion-induced insanity (don&#8217;t get too excited, it&#8217;s just a disembodied voice and a trip to a church).</p>
<p>I wanted to like this, I really did. Compared to the <a href="http://eatplayhate.wordpress.com/2010/09/02/dragon-age-origins-dlc-the-darkspawn-chronicles/">Darkspawn Chronicles</a>, Leliana&#8217;s Song is like a perfectly pitched epic fantasy adventure. Unfortunately, so too is a baked potato. It suffers from the usual problems with DLC; bad pacing, no real investment in the characters, and the unmistakable  stench of &#8220;afterthought-ness&#8221;. It was quite strange to play, actually &#8211; it felt disturbingly similar to the innumerable, interchangeable NWN modules from 2003. Nothing really stood out as being good or particularly bad, it just started, happened, and ended. To be honest, the dungeon scene was probably the highlight of the whole thing because I at least remember it clearly.</p>
<p>Bioware may be making money hand over fist with stuff like this, but seriously, they need to try a lot harder if they want to keep their real fans.</p>
<div class="reviewscores">
<table>
<tbody>
<tr>
<td class="scorecat2" colspan="2">Gameplay</td>
</tr>
<tr>
<td class="scoreinfo2">A small slice of Dragon Age: Origins. It has a few small but vaguely interesting ideas (poorly executed, but what can you expect of the Bioware <em>ca.</em> 2010?)</td>
<td class="score2">6/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Art Direction</td>
</tr>
<tr>
<td class="scoreinfo2">Some new models! Someone actually had to modify the market district level a little bit! The new stuff isn&#8217;t bad, it&#8217;s just infrequent.</td>
<td class="score2">5/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Story and Writing</td>
</tr>
<tr>
<td class="scoreinfo2">Predictable and hammy, but not mind-meltingly terrible. I did try to look for the advertised <em>intrigue</em>, but I couldn&#8217;t find it.</td>
<td class="score2">5/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Sound and Music</td>
</tr>
<tr>
<td class="scoreinfo2">I have to give it credit here because they added some new songs to the game &#8211; not only that, but the music was both fitting and quite enjoyable. All the characters are voice-acted with Leliana&#8217;s actress reprising her role.</td>
<td class="score2">7/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Longevity</td>
</tr>
<tr>
<td class="scoreinfo2">I didn&#8217;t actually get bored of it while playing until the very end, where they decide to pad it out with some pointless wilderness. It has a replayability factor of approximately zero, however.</td>
<td class="score2">5/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Technical</td>
</tr>
<tr>
<td class="scoreinfo2">I encountered a single scripting bug, nothing that made me too angry.</td>
<td class="score2">6/10</td>
</tr>
<tr>
<td class="scoreheader" colspan="2">VERDICT:</td>
</tr>
<tr>
<td class="scoreinfo" colspan="2">
<div class="bigscore">40%</div>
<p>If anything, this module sums up the new Bioware &#8211; shallow, mediocre and unimaginative. I can&#8217;t even recommend it to serious DA: O enthusiasts because it&#8217;s just unimpressive. It costs about $7 in Bioware points, and gives you about 3 hours of playing time.</p>
<p>Links: <a href="http://dragonage.bioware.com/dao/lelianas_song/">Bioware DLC Information</a></td>
</tr>
</tbody>
</table>
</div>

<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-alttitle/' title='DLC2-AltTitle'><img width="150" height="84" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-alttitle.jpg?w=150&#038;h=84" class="attachment-thumbnail" alt="DLC2-AltTitle" title="DLC2-AltTitle" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-bridge/' title='DLC2-Bridge'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-bridge.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Bridge" title="DLC2-Bridge" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-captain/' title='DLC2-Captain'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-captain.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Captain" title="DLC2-Captain" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-castle/' title='DLC2-Castle'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-castle.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Castle" title="DLC2-Castle" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-cfight/' title='DLC2-CFight'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-cfight.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-CFight" title="DLC2-CFight" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-chantry/' title='DLC2-Chantry'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-chantry.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Chantry" title="DLC2-Chantry" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-disturbing/' title='DLC2-Disturbing'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-disturbing.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Disturbing" title="DLC2-Disturbing" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-fight/' title='DLC2-Fight'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-fight.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Fight" title="DLC2-Fight" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-gang/' title='DLC2-Gang'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-gang.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Gang" title="DLC2-Gang" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-hideout/' title='DLC2-Hideout'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hideout.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Hideout" title="DLC2-Hideout" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-hot2/' title='DLC2-Hot2'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot2.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Hot2" title="DLC2-Hot2" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-littledragon/' title='DLC2-LittleDragon'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-littledragon.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-LittleDragon" title="DLC2-LittleDragon" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-tent/' title='DLC2-Tent'><img width="150" height="112" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-tent.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="DLC2-Tent" title="DLC2-Tent" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-title/' title='DLC2-Title'><img width="150" height="84" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-title.jpg?w=150&#038;h=84" class="attachment-thumbnail" alt="DLC2-Title" title="DLC2-Title" /></a>
<a href='http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/dlc2-hot/' title='DLC2-Hot'><img width="150" height="84" src="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot1.jpg?w=150&#038;h=84" class="attachment-thumbnail" alt="DLC2-Hot" title="DLC2-Hot" /></a>

<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/593/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=593&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2011/01/01/dragon-age-origins-dlc-lelianas-song/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot1.jpg" medium="image">
			<media:title type="html">DLC2-Hot</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-castle.jpg?w=300" medium="image">
			<media:title type="html">DLC2-Castle</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-littledragon.jpg?w=300" medium="image">
			<media:title type="html">DLC2-LittleDragon</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-alttitle.jpg?w=150" medium="image">
			<media:title type="html">DLC2-AltTitle</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-bridge.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Bridge</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-captain.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Captain</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-castle.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Castle</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-cfight.jpg?w=150" medium="image">
			<media:title type="html">DLC2-CFight</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-chantry.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Chantry</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-disturbing.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Disturbing</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-fight.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Fight</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-gang.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Gang</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hideout.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Hideout</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot2.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Hot2</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-littledragon.jpg?w=150" medium="image">
			<media:title type="html">DLC2-LittleDragon</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-tent.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Tent</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-title.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Title</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc2-hot1.jpg?w=150" medium="image">
			<media:title type="html">DLC2-Hot</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Management from the Ground Up 2: Bitmap Allocator</title>
		<link>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-2-foundations/</link>
		<comments>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-2-foundations/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 09:49:11 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[CPlusPlus]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[buddy allocator]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cplusplus]]></category>
		<category><![CDATA[memory management]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=552</guid>
		<description><![CDATA[This is the second post of my series about memory management. The previous post was a basic introduction, covering how the operating system views memory. In this, and the next, post, we&#8217;re going to dive straight into the C++ code, and implement two very simplistic allocators. These two allocators are not useful for any form [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=552&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is the second post of my series about memory management. The <a href="http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-1-introduction/">previous post</a> was a basic introduction, covering how the operating system views memory. In this, and the next, post, we&#8217;re going to dive straight into the C++ code, and implement two very simplistic allocators. These two allocators are not useful for any form of production code, but they will (hopefully) provide a basic foundation for future, more advanced allocators.</p>
<p>We will look at a very trivial fixed size allocator &#8211; a bitmap allocator &#8211; and, following that (in the next post), we will look at a more flexible system.</p>
<p><span id="more-552"></span></p>
<h3>2.1 Bitmap Allocator</h3>
<p>A bitmap allocator is a trivial memory allocator algorithm, which, at its core, uses a structure called a <em>bitmap</em> to provide the book-keeping information. Fundamentally, a bitmap allocator has two regions of memory (that may be part of the same contiguous block), a <em>management</em> region &#8211; the bitmap &#8211; and the <em>arena</em>, a catch-all term for &#8220;usable memory&#8221;. The two regions are related by a <em>mapping</em> (or <em>magnification</em>) <em>factor</em> &#8211; each discrete element in the bitmap (often a single bit, hence the term), maps to some number of bytes in the arena. The bitmap itself is a contiguous array of these elements, which is like a scaled down version of the arena, only instead of storing the user data, it simply stores whether each section of the arena is used or not.<br />
<a href="http://eatplayhate.files.wordpress.com/2010/09/bitmap.png"><img class="aligncenter size-full wp-image-553" title="bitmap" src="http://eatplayhate.files.wordpress.com/2010/09/bitmap.png?w=680&#038;h=285" alt="" width="680" height="285" /></a></p>
<h5>Key features:</h5>
<ul>
<li>Book-keeping and user memory are separate, which protects against the internal memory manager state being corrupted;</li>
<li>Allocation and deletion only requires that entries in the bitmap be <em>marked</em> as being used or free;</li>
<li>Smallest allocation size is one page;</li>
<li>Arena cannot be resized (without a large amount of work);</li>
<li>Very few calls to the underlying operating system &#8211; once to set up the arena, once to set up the management area (these may be stored in contiguous memory if required);</li>
<li>Trivial implementation has expensive allocation, cheap freeing.</li>
</ul>
<h5>Structure</h5>
<p><a href="http://eatplayhate.files.wordpress.com/2010/09/bitmapallocator-structure.png"><img class="aligncenter size-full wp-image-557" title="BitmapAllocator-Structure" src="http://eatplayhate.files.wordpress.com/2010/09/bitmapallocator-structure.png?w=640&#038;h=234" alt="" width="640" height="234" /></a></p>
<p>The bitmap allocator is extremely simple to implement. It needs to maintain a pointer to the bitmap, as well as a pointer to the arena. In the simplest design, it needs only two more fields &#8211; the number of blocks it owns, and the size of each block. For simplicity, we will be using a bitmap where each element is of size <em>unsigned char</em>. The bitmap must contain slightly more information than <em>used</em> and <em>free</em>, we will need an additional state for <em>boundary</em>, a state indicating that it is the start of an allocated block.</p>
<h5>Initialization</h5>
<p>Initialization is very simple; it requires calculating the number of blocks given a specified arena size and factor, allocating the two regions, and setting all the entries in the bitmap to <em>free</em>. Our memory system will sit on top of the CRT <strong>malloc</strong> function.</p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers" valign="top">
<div>1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22</div>
</td>
<td class="code" valign="top">
<div>
<pre>BitmapAllocator::BitmapAllocator(<span style="color:#0000ff;">int</span> factor, <span style="color:#0000ff;">int</span> arenasize)
{
	<span style="color:#008000;">// Calculate the number of blocks for a given arena size and allocate</span>
	<span style="color:#008000;">// We will round down when determining the number of blocks</span>
	m_Factor = factor;
	m_Blocks = (arenasize / m_Factor);

	<strong>assert</strong>(m_Blocks &gt; 0);

	m_Arena = malloc(m_Blocks * m_Factor);
	m_Bitmap = (<span style="color:#0000ff;">unsigned char</span>*)malloc(m_Blocks);

	<span style="color:#008000;">// Set all blocks to free</span>
	<span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt; m_Blocks; i++)
	{
		m_Bitmap[i] = FreeBlock;
	}
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The code above is, for the sake of simplicity, missing any form of sanity checks for the arena/factor size, but some things to remember:</p>
<ul>
<li>Smaller factor sizes mean additional book-keeping (unusable memory). E.g., a factor of 4 means for each 4 bytes of usable memory, a byte of memory must be dedicated to book-keeping.</li>
<li>Larger factor sizes mean more wasted memory.</li>
<li>It is sensible to require that the factor size is a power of two, or a multiple of a power of two. In order to ensure happy calling code, it is good to assume that any memory request over 16 bytes should be aligned to a 16 byte address; something that can be done by requiring that the factor is a multiple of 16.</li>
</ul>
<h5>Shutdown</h5>
<p>Shutdown is a trivial matter of <strong>free</strong>ing the two memory blocks we have requested from the CRT.</p>
<h5>Allocation</h5>
<p>To allocate a block, we must:</p>
<ol>
<li>Calculate the number of blocks required (rounding up)</li>
<li>Iterate over the bitmap, looking for a series of (at least the requested amount of) contiguous free blocks (in this case, using a linear probe like a naive string search)</li>
<li>Translate the bitmap address into an arena address</li>
<li>Mark the blocks we have allocated as used in the bitmap, marking the first block as a <em>boundary</em> block</li>
</ol>
<p><a href="http://eatplayhate.files.wordpress.com/2010/09/bitmap-alloc.png"><img class="aligncenter size-full wp-image-578" title="Bitmap-alloc" src="http://eatplayhate.files.wordpress.com/2010/09/bitmap-alloc.png?w=680&#038;h=361" alt="" width="680" height="361" /></a></p>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers" valign="top">
<div>1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
26<br />
27<br />
28<br />
29<br />
30<br />
31<br />
32<br />
33<br />
34<br />
35<br />
36<br />
37<br />
38<br />
39<br />
40<br />
41<br />
42<br />
43<br />
44<br />
45</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#0000ff;">void</span>* BitmapAllocator::Allocate(<span style="color:#0000ff;">unsigned int</span> size)
{
	<span style="color:#0000ff;">if</span> (size == 0)
	{
		<span style="color:#008000;">// See note</span>
		<span style="color:#0000ff;">return</span> NULL;
	}

	<span style="color:#008000;">// Calculate the number of blocks required (rounding up)</span>
	<span style="color:#0000ff;">unsigned int</span> requiredblocks = size / m_Factor + ((size % m_Factor) &gt; 0 ? 1 : 0);

	<span style="color:#008000;">// Linear probe</span>
	<span style="color:#0000ff;">unsigned int</span> location = 0;
	<span style="color:#0000ff;">while</span> (location &lt;= m_Blocks - requiredblocks)
	{
		<span style="color:#008000;">// Count the number of available blocks</span>
		<span style="color:#0000ff;">unsigned int</span> available = 0;
		<span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">unsigned int</span> i = 0; i &lt; requiredblocks; i++)
		{
			<span style="color:#0000ff;">if</span> (m_Bitmap[i + location] != FreeBlock)
				<span style="color:#0000ff;">break</span>;
			available++;
		}

		<span style="color:#0000ff;">if</span> (available == requiredblocks)
		{
			<span style="color:#0000ff;">void</span>* pointer = (<span style="color:#0000ff;">unsigned char</span>*)m_Arena + m_Factor * location;

			<span style="color:#008000;">// Mark the blocks as used</span>
			m_Bitmap[location++] = BoundaryBlock;
			<span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 1; i &lt; requiredblocks; i++)
				m_Bitmap[location++] = UsedBlock;
			<span style="color:#0000ff;">return</span> pointer;
		}
		<span style="color:#0000ff;">else</span>
			location = location + available + 1;
	}

	<span style="color:#008000;">// Allocation failed, return NULL</span>
	<span style="color:#0000ff;">return</span> NULL;
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The <em>see note</em> part of the code above is because, strictly speaking, the standard requires that a zero byte allocation returns a unique memory address. In this case, we will flaunt the standard and simply return <strong>null</strong>.</p>
<h5>Freeing</h5>
<p>Freeing memory in a bitmap allocator is also very simple, we must:</p>
<ol>
<li>Check for a null pointer</li>
<li>Convert a non-null pointer to a block entry</li>
<li>Begin marking blocks as <em>free</em>, the first block should be a boundary block.</li>
<li>Iterate forwards over the blocks in the bitmap until another boundary block is encountered, then stop.</li>
</ol>
<div class="codeblock-container" style="overflow:auto;white-space:nowrap;">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="line-numbers" valign="top">
<div>1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
26<br />
27</div>
</td>
<td class="code" valign="top">
<div>
<pre><span style="color:#0000ff;">void</span> BitmapAllocator::Free(<span style="color:#0000ff;">void</span>* pointer)
{
	<span style="color:#0000ff;">if</span> (pointer == NULL)
		<span style="color:#0000ff;">return</span>;

	<span style="color:#008000;">// Convert pointer to block index</span>
	<span style="color:#0000ff;">unsigned int</span> arenaptr = (<span style="color:#0000ff;">unsigned int</span>)((<span style="color:#0000ff;">unsigned char</span>*)pointer - (<span style="color:#0000ff;">unsigned char</span>*)m_Arena);
	<span style="color:#0000ff;">unsigned int</span> block = arenaptr / m_Factor;

	<span style="color:#008000;">// Check for validity</span>
	assert(block &lt; m_Blocks);

	<span style="color:#008000;">// Ensure this is the start of the allocation</span>
	assert(arenaptr % m_Factor == 0);
	assert(m_Bitmap[block] == BoundaryBlock);

	<span style="color:#008000;">// Mark blocks as free</span>
	m_Bitmap[block++] = FreeBlock;
	<span style="color:#0000ff;">while</span> (block &lt; m_Blocks &amp;&amp; m_Bitmap[block] == UsedBlock)
	{
		m_Bitmap[block++] = FreeBlock;
	}
}</pre>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p><a href="http://eatplayhate.files.wordpress.com/2010/09/bitmap-general.png"><img class="aligncenter size-full wp-image-580" title="Bitmap-general" src="http://eatplayhate.files.wordpress.com/2010/09/bitmap-general.png?w=640&#038;h=355" alt="" width="640" height="355" /></a></p>
<h3>2.2 Where to now?</h3>
<p>The bitmap allocator is an incredibly simple allocator. It has very little state information, and is the simplest form of allocator to implement. It is very fast at releasing memory, and a more serious version of the algorithm can speed up the allocation code enormously (using, for example, a free list, or by storing information about contiguous free counts in the bitmap). Unfortunately, it requires a large block of book-keeping memory to function, which remains constant. In addition, by its very design, it is inherently wasteful for small allocations (given that the size of an allocation is always a multiple of the block factor).</p>
<p>Nevertheless, in about 100 lines of code, we have come up with a workable memory manager. It doesn&#8217;t support resizing of the arena, and it doesn&#8217;t provide a particularly usable or scalable system for an actual application, but, it is a good contrast to the next allocator we will look at; which has a very different design. Once we have covered these two designs, we will look at more advanced algorithms to improve them, working towards a fully featured memory system.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/552/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=552&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-2-foundations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/bitmap.png" medium="image">
			<media:title type="html">bitmap</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/bitmapallocator-structure.png" medium="image">
			<media:title type="html">BitmapAllocator-Structure</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/bitmap-alloc.png" medium="image">
			<media:title type="html">Bitmap-alloc</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/bitmap-general.png" medium="image">
			<media:title type="html">Bitmap-general</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Management from the Ground Up 1: Introduction</title>
		<link>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-1-introduction/</link>
		<comments>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-1-introduction/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 05:17:09 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[CPlusPlus]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bitmap allocator]]></category>
		<category><![CDATA[buddy list]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cplusplus]]></category>
		<category><![CDATA[malloc]]></category>
		<category><![CDATA[memory management]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[virtual address space]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=532</guid>
		<description><![CDATA[Welcome to my first post in a series about memory management in C++ (specifically, in games). In this, I will discuss how memory allocation works, why custom allocators are used in many programs, and what goals a custom allocator should fulfill. In the course of this series, I hope to cover several designs of allocators, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=532&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_534" class="wp-caption alignright" style="width: 160px"><a href="http://eatplayhate.files.wordpress.com/2010/09/programming.jpg"><img class="size-thumbnail wp-image-534" title="PROGRAMMING" src="http://eatplayhate.files.wordpress.com/2010/09/programming.jpg?w=150&#038;h=121" alt="" width="150" height="121" /></a><p class="wp-caption-text">This is, according to Google Image Search, a picture of PROGRAMMING.</p></div>
<p>Welcome to my first post in a series about memory management in C++ (specifically, in games). In this, I will discuss how memory allocation works, why custom allocators are used in many programs, and what goals a custom allocator should fulfill.</p>
<p>In the course of this series, I hope to cover several designs of allocators, show some benchmarks, and explain the pitfalls of writing your own allocation system from start to finish. There is a lot to cover, and I&#8217;m going to be assuming a reasonable level of C++ competency.</p>
<p>Ready to dive in?</p>
<p><span id="more-532"></span></p>
<h3>1.1 Memory Primer</h3>
<p>For the sake of completeness, we will start with a quick primer on how memory allocations actually work. Most people should know that memory on their computer is vaguely determined by the amount of RAM &#8211; random access memory &#8211; that they have. RAM is only one part of a fairly complicated system that manages and maintains the memory used by applications on a computer.</p>
<p>At the highest layer, the layer seen by your application, the whole of the address space (which we will call the <em>wilderness</em>) is apparently empty, save for objects on the stack, such as local variables, and memory allocated to objects in the executable, such as the actual machine code as well as any compile-time constants. Your application can request additional memory from the operating system, which, if able to provide it, will return a pointer to an area that was previously part of the wilderness. This <em>allocated memory</em> can then be used by the application. If the application attempts to use memory that it does not own, the application will receive an <em>access violation</em> (or, if you&#8217;re a crazy Unix person, a <em>segmentation fault</em>).</p>
<p style="text-align:left;">That this system works in that way is an advance we owe to the original <a href="http://en.wikipedia.org/wiki/Intel_80286">Intel 80286</a> (although it was vastly improved and made workable in the 386), and it is called <em>protected mode</em>. Protected mode is a hardware-supported system of disallowing individual programs from being aware of other running processes (at least, not without using specific interprocess APIs). In a protected mode operating system, each process gets its own &#8220;version&#8221; of the entire <em>address space</em> (all locations describable by a pointer). Needless to say, the ability to stop applications from writing into each others&#8217; memory space is a fundamental requirement of making a multitasking operating system.</p>
<p><a href="http://eatplayhate.files.wordpress.com/2010/09/memlayers1.png"><img class="aligncenter size-full wp-image-539" title="Memlayers" src="http://eatplayhate.files.wordpress.com/2010/09/memlayers1.png?w=680&#038;h=506" alt="" width="680" height="506" /></a></p>
<p style="text-align:left;">So, what happens when we request memory? Our call to <em>new</em> (or <em>malloc</em>, which is generally what new defers to anyway) will, barring any kind of user-side heap management (which does happen, I&#8217;ll go into that later), hit the operating system&#8217;s memory manager. The OS, being a privileged program, runs in a special mode, called <em>ring 0. </em>Protected mode systems have multiple <em>privilege rings</em> that code can execute in. In most modern operating systems, the kernel runs entirely in ring 0, while the applications run entirely in ring 2 (ring 1, designed for device drivers, is almost unused). A ring 0 application has a different view of the address space to a ring 2 application &#8211; it is able to access or &#8220;see&#8221; all the allocations made by other applications, which makes the OS&#8217; address space significantly more cluttered. In addition to all the running applications, some of the address space is used by hardware &#8211; such as the entire block of video card RAM (indeed, these hardware reserved sections are the reason that 32 bit operating systems, while <em>able</em> to address 4 gigabytes of RAM, can only use less than that).</p>
<p style="text-align:left;">The kernel&#8217;s view of the address space is the entire map of all available, or addressable, memory on the system. Every 32 bit OS is able to address 4 gigabytes of <em>stuff</em>, whether it be normal memory, video RAM, sound cards (remember <strong>A220</strong> I5 D3?), hardware interrupt managers, thread stacks, memory mapped files, you name it. Operating systems tended to carve up this area further, reserving, say, 2 gigabytes of that space to &#8220;kernel&#8221; memory (basically, memory used by the OS, drivers and hardware addresses), and allowing all the applications to use the remainder. A memory allocation request causes the operating system to look for a block of contiguous unused space in the virtual address table, mark it as belonging to the application, and return the pointer to it. If there was not a large enough unused block in the kernel&#8217;s view of the memory space, the allocation failed (which should demonstrate just why a 64 bit OS is essential).</p>
<p style="text-align:left;">The operating system is able to make additional use of this address space by not requiring that it exactly matches the RAM amount &#8211; it is able to take infrequently used blocks of memory and put them on the hard drive (in the <em>page file</em>), freeing up space in RAM, which is many orders of magnitude faster. Note that it doesn&#8217;t ever remove this memory from the virtual address space &#8211; it simply can change what is backing it. When a program requests to access that memory again, the OS can transparently reshuffle the memory, loading in data from the HDD to RAM, where the CPU can use it.</p>
<p style="text-align:left;"><a href="http://eatplayhate.files.wordpress.com/2010/09/backing1.png"><img class="aligncenter size-full wp-image-549" title="Backing" src="http://eatplayhate.files.wordpress.com/2010/09/backing1.png?w=500&#038;h=383" alt="" width="500" height="383" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;">The last thing to explain about this whole system is the concept of <em>pages</em>. Memory is managed in discrete chunks &#8211; pages &#8211; the smallest block of data that the OS&#8217; virtual memory manager cares about. For most operating systems, the page size is usually around 4kb. Each page is treated separately - they can be moved in and out of the page file and RAM independently (even if part of the same allocation), and there is no requirement that contiguous virtual pages are contiguous in RAM (indeed, they often aren&#8217;t). Pages vastly simplify memory management from the OS perspective &#8211; everything is the same size, there is no requirement that you have to have a large free block in physical RAM. Finally, when memory is freed (or the application is terminated), the OS marks the used pages as &#8220;free&#8221; and the cycle continues.</p>
<h3>1.2 The Problem with Malloc</h3>
<p>So, now that you understand the underlying systems going on with the OS level, what about <em>malloc</em>. Why, for example, would we even want to replace it?</p>
<p>From my description of the underlying system above, two things should be fairly obvious &#8211; one, that allocating memory requires a fair amount of operating system interaction, and two, that some other system must be being used for application memory management, given that the OS only cares about objects the size of a page (or some multiple thereof).</p>
<p>Enter the next part of the equation &#8211; malloc&#8217;s user-side (i.e., non-OS) memory management. Malloc, when a memory request arrives, will do one of two things. It will attempt to fulfill the request by providing a pointer to memory your program already owns (&#8220;here&#8217;s one I prepared earlier&#8221;), or, failing that, will perform the expensive task of requesting memory from the operating system. Depending on the exact implementation of malloc, it may request a significantly larger size than required, allowing it to then manage the larger, user space, block itself, or it may simply return the smallest multiple of pages &#8211; something which has a lower probability of failing &#8211; VM addresses must be contiguous.</p>
<p>Malloc will then carve up the space the OS has given it, annotate it with its own book-keeping data, and return the requested amount back to the application. When a free request comes in, it will update its book-keeping data, and potentially relinquish the memory back to the operating system.</p>
<p>Fundamentally, by providing a custom memory manager, we are changing the behaviour of this user-side system. We can&#8217;t speed up the memory management code that the operating system uses &#8211; we, instead, can use knowledge about our application to improve the performance of the memory system. For instance, we may know that our application will allocate and release memory in quick succession &#8211; we can immediately improve malloc (which is optimized for the <strong><em>general case</em></strong>) by not relinquishing the memory back to the OS. We may know that our application will only ever allocate tiny objects, and we can write a management system that is optimized for that case.</p>
<p>But that&#8217;s not all&#8230;</p>
<h3>1.3 Widen the Scope</h3>
<p>By using a custom allocator, we suddenly are no longer in the dark with the memory behaviour of our application. We can provide many more useful systems beyond performance tweaking, such as:</p>
<ul>
<li>Memory use tracking (or size/count histograms);</li>
<li>Leak detection;</li>
<li>Buffer overrun/underrun detection;</li>
<li>Debugging info such as call stacks, allocation names, etc;</li>
<li>Higher-level constructs and systems such as hedges and arenas, as well memory optimized for particular algorithms.</li>
</ul>
<p>Now, there are third party solutions to all of these. I am a believer in reinventing the wheel, however; mainly because I think it is very useful to learn algorithms for yourself, and also because I get angry when I have to use anyone else&#8217;s code &#8211; the mark of a true programmer =)</p>
<p>In the next article, I will go through two very simple memory allocation algorithms &#8211; specifically, two that are both unfortunately useless, but provide a basis to build upon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/532/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/532/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=532&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2010/09/04/memory-management-from-the-ground-up-1-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/programming.jpg?w=150" medium="image">
			<media:title type="html">PROGRAMMING</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/memlayers1.png" medium="image">
			<media:title type="html">Memlayers</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/backing1.png" medium="image">
			<media:title type="html">Backing</media:title>
		</media:content>
	</item>
		<item>
		<title>Dragon Age: Origins DLC &#8211; The Darkspawn Chronicles</title>
		<link>http://eatplayhate.wordpress.com/2010/09/02/dragon-age-origins-dlc-the-darkspawn-chronicles/</link>
		<comments>http://eatplayhate.wordpress.com/2010/09/02/dragon-age-origins-dlc-the-darkspawn-chronicles/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 14:01:47 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Game Reviews]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[angst]]></category>
		<category><![CDATA[darkspawn chronicles]]></category>
		<category><![CDATA[DLC]]></category>
		<category><![CDATA[Dragon Age]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=523</guid>
		<description><![CDATA[The Darkspawn Chronicles is the first real DLC module that Bioware released &#8211; I find it difficult to really acknowledge the existence of Return to Ostagar and Warden&#8217;s Keep given how insultingly bad they were, and will be leaving them for last. DC takes place in a bizarro alternate universe where the Warden Commander (i.e., [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=523&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc1-splash.jpg"><img class="aligncenter size-full wp-image-524" title="DLC1-Splash" src="http://eatplayhate.files.wordpress.com/2010/09/dlc1-splash.jpg?w=680&#038;h=383" alt="" width="680" height="383" /></a></p>
<p>The Darkspawn Chronicles is the first <em>real</em> DLC module that Bioware released &#8211; I find it difficult to really acknowledge the existence of <em>Return to Ostagar</em> and <em>Warden&#8217;s Keep</em> given how insultingly bad they were, and will be leaving them for last. DC takes place in a bizarro alternate universe where the Warden Commander (i.e., you in the main game) died or perhaps never made it through the joining. Alistair has been crowned king, and has somehow managed to, in between feeling sorry for himself and lusting after Morrigan, accomplish all that your character would have in the normal game. You play a Hurlock Vanguard, who, for all intents and purposes, is just a sword and shield warrior in heavy plate armour. Your task is to lead the assault on Denerim and ensure victory for the Darkspawn.</p>
<blockquote><p>You now fight as the Darkspawn! The city of Denerim, jewel of Ferelden, girds itself for war. As a hurlock vanguard, you alone hold the power to make thralls of your fellow darkspawn and drive them into the heat of battle. Heed the archdemon&#8217;s call Denerim must burn!</p>
<p style="text-align:right;"><strong>- Official Blurb</strong></p>
</blockquote>
<div id="attachment_525" class="wp-caption alignleft" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc1-happyfamily.jpg"><img class="size-medium wp-image-525" title="DLC1-HappyFamily" src="http://eatplayhate.files.wordpress.com/2010/09/dlc1-happyfamily.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">My happy Darkspawn family, me, &quot;Crush Face&quot;, &quot;Ghargh&quot; and &quot;the Irritating One&quot;</p></div>
<p>Now, anyone with two brain cells to rub together should be pretty put off by this concept immediately &#8211; not only are they stripping all the non hack-and-slash mechanics by making the quest star a bunch of <em>literally</em> brainless, mute monsters, but they&#8217;re also replacing the (broken and badly balanced) player skill tree with the super limited monster skills of the Darkspawn. This entire module has no progression, no characterization, and no role playing at all. It&#8217;s a poorly implemented strategy game, more than anything else.</p>
<p>The game sets you up at the city gates with your Hurlock Vanguard. You have to punch through the defenders (led by notable characters from the game), and complete several minor quests for the Archdemon. These quests are all very simple, such as &#8220;kill the gate guards&#8221;, &#8220;kill the nobleman&#8221;, and, to mix it up a bit, &#8220;murder 10 innocent civilians&#8221;. It&#8217;s made slightly irritating by having constantly respawning mobs of enemies, but because Bioware have, over subsequent patches, progressively lowered Dragon Age&#8217;s difficulty from &#8220;respectable&#8221; to &#8220;console gamer friendly&#8221;, they prove to be little more than an annoyance.</p>
<p>Throughout your murderous rampage, you can &#8220;recruit&#8221; other (constantly respawning) Darkspawn minions using your <em>enthrall</em> power, which adds them to your party. While the Vanguard is basically a level 10 warrior with useless skills, the thrall Darkspawn are all effectively level 10 gelatinous cubes with no skills whatsoever, except their signature attacks. They are unable to use any items (even healing items), and upon dying, they get removed from your party.</p>
<div id="attachment_526" class="wp-caption alignright" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc1-crush.jpg"><img class="size-medium wp-image-526" title="DLC1-Crush" src="http://eatplayhate.files.wordpress.com/2010/09/dlc1-crush.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">I wish I had a capture of my ogre repeatedly punching Oghren in the face. That was the best moment of the entire game.</p></div>
<p>Fair enough, I suppose. It seems that I can&#8217;t really pick which I prefer &#8211; the thrall Darkspawn feel totally under-developed as classes (no surprises there), while the Vanguard is a vanilla human warrior with no discernible character or personality beyond a <em>bitchin</em> helmet. Each of the thralls has a different set of four or five skills, but the important thing to remember is that Ogres crush faces, and Shrieks are the cheatiest bastards ever, attacking about 2x faster than anything else. I pretty much completed the latter half of the game controlling the single Shriek in my party while telling the rest of my group to hold position at the gates.</p>
<p>You fight through the main Denerim districts, murdering the innocents in the market district (including Wade!), setting fire to the Elven Alienage tree (serves it right), and facing a preposterous number of respawning bastards in the palace district. While this is going on, you encounter members of the Origins party strategically placed (Oghren was in the market tavern &#8211; and before you get excited, no, you couldn&#8217;t go inside &#8211; but I made sure to kill him as brutally as possible) in the city. They must all be defeated. Especially Oghren. I can&#8217;t believe they brought him back for Awakening.</p>
<div id="attachment_527" class="wp-caption alignleft" style="width: 310px"><a href="http://eatplayhate.files.wordpress.com/2010/09/dlc1-finalstand.jpg"><img class="size-medium wp-image-527" title="DLC1-FinalStand" src="http://eatplayhate.files.wordpress.com/2010/09/dlc1-finalstand.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">The final stand. See the fear in their eyes.</p></div>
<p>It ends with the showdown on the top of Fort Drakon, only you play as one of the Darkspawn mobs that comes in to help the Archdemon. There, you must defeat Morrigan, Alistair, Leliana, and &#8220;Barkspawn&#8221; the war-hound (I am so glad they chose that name to become canon). Naturally, if you have a Shriek or Ogre (or, better, both) you should have no difficulty crushing their puny human bodies and ensuring that the Archdemon reins supreme.</p>
<p>So. Overall? Well, I suppose in terms of sheer time to money ratio, it wasn&#8217;t bad. Sadly the whole affair was half-baked. It involved no (obviously) new assets, and, frankly, could have been thrown together by a junior using the toolset without any issues. The levels are all reused from the final battles of the main game, there is <em>no</em> dialogue at all, no meaningful choices, and really, no effort from Bioware.</p>
<div class="reviewscores">
<table>
<tbody>
<tr>
<td class="scorecat2" colspan="2">Gameplay</td>
</tr>
<tr>
<td class="scoreinfo2">Same mechanics as Dragon Age: Origins, only without the &#8220;RPG&#8221; bit. I guess they were practicing for DA2.</td>
<td class="score2">4/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Art Direction</td>
</tr>
<tr>
<td class="scoreinfo2">Nothing new here at all.</td>
<td class="score2">N/A</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Story and Writing</td>
</tr>
<tr>
<td class="scoreinfo2">No.</td>
<td class="score2">0/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Sound and Music</td>
</tr>
<tr>
<td class="scoreinfo2">Reused from DA: O.</td>
<td class="score2">N/A</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Longevity</td>
</tr>
<tr>
<td class="scoreinfo2">I got bored with the DLC about 20% of the way through, so I&#8217;d say there isn&#8217;t much.</td>
<td class="score2">-2/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Technical</td>
</tr>
<tr>
<td class="scoreinfo2">I had to restart two areas because of buggy quest triggers. FPS was weirdly terrible.</td>
<td class="score2">2/10</td>
</tr>
<tr>
<td class="scoreheader" colspan="2">VERDICT:</td>
</tr>
<tr>
<td class="scoreinfo" colspan="2">
<div class="bigscore">23%</div>
<p>An absolute rip off. The whole idea was doomed to failure from the outset &#8211; you can&#8217;t just plug in the underdeveloped antagonists as the stars of an expansion module. The module was disappointing, but at least I was prepared for it. The whole sordid experience lasts for about 2 hours, and costs $5 worth of magical Bioware points.</p>
<p>Links: <a href="http://dragonage.bioware.com/dao/dschronicles/">Bioware DLC Information</a></td>
</tr>
</tbody>
</table>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/523/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=523&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2010/09/02/dragon-age-origins-dlc-the-darkspawn-chronicles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc1-splash.jpg" medium="image">
			<media:title type="html">DLC1-Splash</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc1-happyfamily.jpg?w=300" medium="image">
			<media:title type="html">DLC1-HappyFamily</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc1-crush.jpg?w=300" medium="image">
			<media:title type="html">DLC1-Crush</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/09/dlc1-finalstand.jpg?w=300" medium="image">
			<media:title type="html">DLC1-FinalStand</media:title>
		</media:content>
	</item>
		<item>
		<title>Energy Drink Review: Monster X-presso: &#8220;HAMMER&#8221;</title>
		<link>http://eatplayhate.wordpress.com/2010/08/31/energy-drink-review-monster-x-presso-hammer/</link>
		<comments>http://eatplayhate.wordpress.com/2010/08/31/energy-drink-review-monster-x-presso-hammer/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 16:10:23 +0000</pubDate>
		<dc:creator>eatplayhate</dc:creator>
				<category><![CDATA[Food Reviews]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[energy drink]]></category>
		<category><![CDATA[hammer]]></category>
		<category><![CDATA[monster]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[x-presso]]></category>

		<guid isPermaLink="false">http://eatplayhate.wordpress.com/?p=511</guid>
		<description><![CDATA[Okay, yes, I promised a Dragon Age DLC review today, but firstly, the DLC is so appalling that trying to wade through it is a lot like actual work, second, the DLC authorization/downloading stuff is as buggy as all hell, and third, it&#8217;s my damn blog and I can do what I like. I will, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=511&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_515" class="wp-caption alignright" style="width: 235px"><a href="http://eatplayhate.files.wordpress.com/2010/08/hammer-can.jpg"><img class="size-medium wp-image-515" title="OLYMPUS DIGITAL CAMERA" src="http://eatplayhate.files.wordpress.com/2010/08/hammer-can.jpg?w=225&#038;h=300" alt="" width="225" height="300" /></a><p class="wp-caption-text">Monster X-Presso: HAMMER</p></div>
<p>Okay, yes, I promised a Dragon Age DLC review today, but firstly, the DLC is so appalling that trying to wade through it is a lot like actual work, second, the DLC authorization/downloading stuff is as buggy as all hell, and <em>third</em>, it&#8217;s my damn blog and I can do what I like. I will, however, be reviewing an energy drink instead.</p>
<p>Monster is a fairly popular energy drink over in the states, but here it&#8217;s only really just started to appear. I&#8217;m not sure if we have got a reformulated version of the drink (or just a renamed version), but the &#8220;normal&#8221; Monster drink we get here has the dubious honour of tasting uncannily like dust &#8211; somehow it even manages to match the texture of it too. Think of it as being kind of like a liquid version of what you try not to inhale when you&#8217;re emptying a vacuum cleaner, only caffeinated. I generally avoid it, but today, I saw something exciting. A new Monster flavour &#8211; indeed, a new Monster <em>concept</em>.</p>
<p>Enter the preposterously named Monster X-presso: <strong>HAMMER </strong>(I believe the actual flavour is called &#8220;<strong>HAMMER</strong>&#8220;, while the drink itself is &#8220;monster x-presso&#8221;), the first &#8220;coffee&#8221; &#8220;flavoured&#8221; energy drink beverage to hit the shelves down under. Now, coffee in cans is nothing new to us here, we do, after all, live quite close to Japan, and those crazy chaps seem to have created an export economy based on cars, hello kitty, tentacle rape and coffee-inspired drinks. I think that coffee in a can should intrinsically be setting off some alarm bells with any sane person &#8211; especially given that they tend to contain milk and sugar, and, last I checked, milk wasn&#8217;t shelf stable. A quick examination of the can confirms that <strong>HAMMER</strong> also contains skim milk &#8220;concentrate&#8221; and cream (why not just use normal milk &#8220;concentrate&#8221;?), so, at the very least, I&#8217;m assuming it&#8217;s been heat-treated to buggery (or maybe irradiated) to give it a whopping 2 year unrefrigerated shelf life. This fact may start to explain the taste.</p>
<div id="attachment_512" class="wp-caption alignleft" style="width: 235px"><a href="http://eatplayhate.files.wordpress.com/2010/08/hammer-glass.jpg"><img class="size-medium wp-image-512" title="Hammer" src="http://eatplayhate.files.wordpress.com/2010/08/hammer-glass.jpg?w=225&#038;h=300" alt="" width="225" height="300" /></a><p class="wp-caption-text">Hammer, home of the FOAM ZONE</p></div>
<p>But let&#8217;s rewind just a bit &#8211; I <em>have</em> (in moments of desperation) actually drank some of those suspicious cans of coffee from my local mysterious asian grocery store (you know the ones). They tend to be weirdly unlike what you wish they were, but some of them are passably drinkable. However, none of them released a noticeable fizz when being cracked open, unlike <strong>THE HAMMER</strong>. Actually, I was so shocked by it that I re-inspected the can, discovering an <a href="http://eatplayhate.files.wordpress.com/2010/08/hammer-foamzone.jpg">intriguing label</a> (or is it, more accurately, a map?) as I did so. Well, don&#8217;t be fooled &#8211; despite the promises, my <em>foam zone</em> was a paltry centimetre high (maybe my<strong> Hammer</strong> was underpressurized), and there was no &#8220;creamy espresso&#8221;. In fact, what there was barely deserves to be called a &#8220;drink&#8221;.</p>
<p>Many energy drinks have an <em>interesting</em> taste &#8211; kind of like what you might imagine our space-faring descendants would be forced to drink in the deep darkness between stars to stop them from growing extra limbs or turning into gelatinous cubes, but this was different. This was, quite simply, a bit rubbish. It wasn&#8217;t even the kind of rubbish taste that you hope for; the kind where you can throw the glass down in disgust and cry out for a truffle to clear your palette. No, instead, it was <em>okay</em> &#8211; by far the biggest problem came from the sweetness level, which had been dialed up to <em>11</em>.</p>
<p>In terms of nutritional content, it&#8217;s pretty lacking. It&#8217;s partly artificially sweetened, so, ml for ml it has about 50% less sugar than juice, it has about the same amount of caffeine as a regular cup of coffee (without the pesky taste), and it has a whole <em>gram</em> of taurine (which, I have no doubt, will pretty much pass straight through you).</p>
<div class="reviewscores">
<table>
<tbody>
<tr>
<td class="scorecat2" colspan="2">Appearance</td>
</tr>
<tr>
<td class="scoreinfo2">Looks like alarmingly weak coffee (or perhaps milky tea). Has a strange, short-lived head or &#8220;<em>foam zone&#8221;</em> as I have been told.</td>
<td class="score2">3/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Taste</td>
</tr>
<tr>
<td class="scoreinfo2">Like a milky, rubbish coffee prepared with ten-thousand year old coffee grounds by an Englishman. Only they have decided to make it impossibly, sickeningly sweet.</td>
<td class="score2">2/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Smell</td>
</tr>
<tr>
<td class="scoreinfo2">Canned coffee. Which is to say, weird.</td>
<td class="score2">3/10</td>
</tr>
<tr>
<td class="scorecat2" colspan="2">Potency</td>
</tr>
<tr>
<td class="scoreinfo2">Pretty much the same as a cup of coffee. Only it tastes infinitely worse.</td>
<td class="score2">3/10</td>
</tr>
<tr>
<td class="scoreheader" colspan="2">VERDICT:</td>
</tr>
<tr>
<td class="scoreinfo" colspan="2">
<div class="bigscore">28%</div>
<p>I&#8217;m glad that the family of coffee-based energy drinks has appeared in Australia, but I do wish the first showing was a bit stronger. The drink tastes alright, but is far, far too sweet, and way too weak with the coffee flavour. Roll on the next version!</td>
</tr>
</tbody>
</table>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eatplayhate.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eatplayhate.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eatplayhate.wordpress.com/511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eatplayhate.wordpress.com&amp;blog=14682991&amp;post=511&amp;subd=eatplayhate&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://eatplayhate.wordpress.com/2010/08/31/energy-drink-review-monster-x-presso-hammer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/873c782b59c3e803f8920ba55cd4a7b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eatplayhate</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/08/hammer-can.jpg?w=225" medium="image">
			<media:title type="html">OLYMPUS DIGITAL CAMERA</media:title>
		</media:content>

		<media:content url="http://eatplayhate.files.wordpress.com/2010/08/hammer-glass.jpg?w=225" medium="image">
			<media:title type="html">Hammer</media:title>
		</media:content>
	</item>
	</channel>
</rss>
