<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Fluent Game Design With Fluent Interfaces</title>
	<atom:link href="http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/</link>
	<description>Pragmatic Thoughts On Game Development</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Anton</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-16540</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Tue, 26 Apr 2011 14:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-16540</guid>
		<description>I&#039;m kind of surprised that there has been no mention of Linq in the article and in the comments. The article is really talking about organizing your logic in sets, thus the UnitLists can easily be IEnumerables and thus Linq operations can be used instead of explicitly calling the Where methods.

Voila! Cleaner code and making the most out of your investment to C#. =)</description>
		<content:encoded><![CDATA[<p>I&#8217;m kind of surprised that there has been no mention of Linq in the article and in the comments. The article is really talking about organizing your logic in sets, thus the UnitLists can easily be IEnumerables and thus Linq operations can be used instead of explicitly calling the Where methods.</p>
<p>Voila! Cleaner code and making the most out of your investment to C#. =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-828</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 16 Feb 2010 12:12:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-828</guid>
		<description>Fascinating as this method is, I think I still prefer the simpler (To code, although monolithic):

ApplyDamage(5, 2, Team_Enemy, Type_Tank);

Which is easier to work with these days due to function signature tool tips.

OR

DamageApply d;
d.SetDamage(5);
d.SetRange(2);
d.SetAffectedResctriction(Enemy);
d.SetAffectedResctriction(Tank);
d.Apply();</description>
		<content:encoded><![CDATA[<p>Fascinating as this method is, I think I still prefer the simpler (To code, although monolithic):</p>
<p>ApplyDamage(5, 2, Team_Enemy, Type_Tank);</p>
<p>Which is easier to work with these days due to function signature tool tips.</p>
<p>OR</p>
<p>DamageApply d;<br />
d.SetDamage(5);<br />
d.SetRange(2);<br />
d.SetAffectedResctriction(Enemy);<br />
d.SetAffectedResctriction(Tank);<br />
d.Apply();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a0a</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-827</link>
		<dc:creator>a0a</dc:creator>
		<pubDate>Fri, 12 Feb 2010 13:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-827</guid>
		<description>Take a look at inference engines. Basically they are rule based system that contain rules that you have to specify as you wrote here, save some syntax differences.

The thing is that our game designers ARE writing such rules, and are successful in doing so. Slightly subtle is that they are not communicating with the engine directly, which is probably why it works so well for us.</description>
		<content:encoded><![CDATA[<p>Take a look at inference engines. Basically they are rule based system that contain rules that you have to specify as you wrote here, save some syntax differences.</p>
<p>The thing is that our game designers ARE writing such rules, and are successful in doing so. Slightly subtle is that they are not communicating with the engine directly, which is probably why it works so well for us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-826</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sat, 06 Feb 2010 09:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-826</guid>
		<description>The standard example should read:

foreach (var unit in player.UnitsWithinRange(2)) {
    if (unit.IsType(Enemy) &amp;&amp; unit.IsType(Tank)) {
       unit.Damage(5);
    }
}</description>
		<content:encoded><![CDATA[<p>The standard example should read:</p>
<p>foreach (var unit in player.UnitsWithinRange(2)) {<br />
    if (unit.IsType(Enemy) &amp;&amp; unit.IsType(Tank)) {<br />
       unit.Damage(5);<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doolwind</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-825</link>
		<dc:creator>Doolwind</dc:creator>
		<pubDate>Wed, 03 Feb 2010 22:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-825</guid>
		<description>Bill-

A couple of people have said the same thing to me.  I can see that it brings confusion, I&#039;ll update my example to better fit :)</description>
		<content:encoded><![CDATA[<p>Bill-</p>
<p>A couple of people have said the same thing to me.  I can see that it brings confusion, I&#8217;ll update my example to better fit <img src='http://www.doolwind.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-824</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Wed, 03 Feb 2010 22:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-824</guid>
		<description>I find myself doing this kind of thing too...

But something about having And(...) and Where(...) performing the same function irks me. Those two words represent different ideas and the idea of being able to use them interchangeably (lines do get deleted, and random ones cut/copied and pasted from place to place).

Maybe something like this reads just as well, and hopefully is less error-prone:

player.UnitsWithRange(2)
  .OnlyWhere(UnitType.Enemy)
  .OnlyWhere(UnitType.Tank))
  .DoDamage(5);</description>
		<content:encoded><![CDATA[<p>I find myself doing this kind of thing too&#8230;</p>
<p>But something about having And(&#8230;) and Where(&#8230;) performing the same function irks me. Those two words represent different ideas and the idea of being able to use them interchangeably (lines do get deleted, and random ones cut/copied and pasted from place to place).</p>
<p>Maybe something like this reads just as well, and hopefully is less error-prone:</p>
<p>player.UnitsWithRange(2)<br />
  .OnlyWhere(UnitType.Enemy)<br />
  .OnlyWhere(UnitType.Tank))<br />
  .DoDamage(5);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KStaff</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-823</link>
		<dc:creator>KStaff</dc:creator>
		<pubDate>Wed, 03 Feb 2010 14:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-823</guid>
		<description>While these two examples are the same functionally, I was wondering what effect the fluent example has on complexity. I realize it&#039;s unlikely to have a large enough number of conditions to cause a huge difference, but won&#039;t the extra loop add some unnecessary variables to the stack? If the code has a large number of these calls, could that eventually effect the game&#039;s efficiency? Otherwise I think this is a really interesting concept.</description>
		<content:encoded><![CDATA[<p>While these two examples are the same functionally, I was wondering what effect the fluent example has on complexity. I realize it&#8217;s unlikely to have a large enough number of conditions to cause a huge difference, but won&#8217;t the extra loop add some unnecessary variables to the stack? If the code has a large number of these calls, could that eventually effect the game&#8217;s efficiency? Otherwise I think this is a really interesting concept.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doolwind</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-822</link>
		<dc:creator>Doolwind</dc:creator>
		<pubDate>Wed, 03 Feb 2010 12:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-822</guid>
		<description>Arowx-

I completely agree.  I had written up a little on DSL&#039;s (Domain Specific Languages) but decided to leave it out so the article didn&#039;t get too long.  I might throw my thoughts in to the post tomorrow.</description>
		<content:encoded><![CDATA[<p>Arowx-</p>
<p>I completely agree.  I had written up a little on DSL&#8217;s (Domain Specific Languages) but decided to leave it out so the article didn&#8217;t get too long.  I might throw my thoughts in to the post tomorrow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arowx</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-821</link>
		<dc:creator>Arowx</dc:creator>
		<pubDate>Wed, 03 Feb 2010 12:52:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-821</guid>
		<description>Its startting to look like a bit like SQL, would the next step be to create a language expressly for this purpose:

Select UnitsWithinRange 2 of player
Where isTank
Then DoDamage 5</description>
		<content:encoded><![CDATA[<p>Its startting to look like a bit like SQL, would the next step be to create a language expressly for this purpose:</p>
<p>Select UnitsWithinRange 2 of player<br />
Where isTank<br />
Then DoDamage 5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doolwind</title>
		<link>http://www.doolwind.com/blog/fluent-game-design-with-fluent-interfaces/comment-page-1/#comment-820</link>
		<dc:creator>Doolwind</dc:creator>
		<pubDate>Wed, 03 Feb 2010 12:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=419#comment-820</guid>
		<description>Markus-

I&#039;m glad you&#039;ve raised some concerns about the &quot;safety&quot; of these interfaces over traditional interfaces.  I saw it as being a much better solution, so long as good though is put in to the initial design.  I definitely think a defensive stance needs to be taken to make sure this doesn&#039;t cause more issues than it solves.</description>
		<content:encoded><![CDATA[<p>Markus-</p>
<p>I&#8217;m glad you&#8217;ve raised some concerns about the &#8220;safety&#8221; of these interfaces over traditional interfaces.  I saw it as being a much better solution, so long as good though is put in to the initial design.  I definitely think a defensive stance needs to be taken to make sure this doesn&#8217;t cause more issues than it solves.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

