<?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: Settlers 2, Pathfinding and Writing Code for Fun!</title>
	<atom:link href="http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/</link>
	<description>Ninja Coding Monkey goes Canada</description>
	<lastBuildDate>Fri, 01 Jul 2011 11:20:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-13324</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Wed, 17 Nov 2010 03:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-13324</guid>
		<description>Hey SirVer, 
yah, in retrospect this wasn&#039;t a very smart approach. But it was never meant to be productive code. It is a toy project, just to play with it.

I remember looking briefly at widelands, but I didn&#039;t dive too deep. But I wish I had time to do that... 

How do you do the weighing of edges in A*? Does it include the height difference between start and end?</description>
		<content:encoded><![CDATA[<p>Hey SirVer,<br />
yah, in retrospect this wasn&#8217;t a very smart approach. But it was never meant to be productive code. It is a toy project, just to play with it.</p>
<p>I remember looking briefly at widelands, but I didn&#8217;t dive too deep. But I wish I had time to do that&#8230; </p>
<p>How do you do the weighing of edges in A*? Does it include the height difference between start and end?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SirVer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-13316</link>
		<dc:creator>SirVer</dc:creator>
		<pubDate>Tue, 16 Nov 2010 13:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-13316</guid>
		<description>Dude, you got it all wrong :). Settlers 2 is using triangles; of course they also form hexagonal tiling fields, but the basic routing works on the edges of triangles. Path finding becomes easier then again. 

If you like to check out actual code, have a look at the widelands project (of which I am a member) or the s25rttr project. Widelands uses a caching variant of A* for path finding.</description>
		<content:encoded><![CDATA[<p>Dude, you got it all wrong <img src='http://www.jakusys.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Settlers 2 is using triangles; of course they also form hexagonal tiling fields, but the basic routing works on the edges of triangles. Path finding becomes easier then again. </p>
<p>If you like to check out actual code, have a look at the widelands project (of which I am a member) or the s25rttr project. Widelands uses a caching variant of A* for path finding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-12581</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Wed, 13 Oct 2010 01:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-12581</guid>
		<description>hey kegogrog,

your approach seems to be a way better approach than mine. Hasn&#039;t even occurred to me to use triangles. Gonna try that for the next time. :)</description>
		<content:encoded><![CDATA[<p>hey kegogrog,</p>
<p>your approach seems to be a way better approach than mine. Hasn&#8217;t even occurred to me to use triangles. Gonna try that for the next time. <img src='http://www.jakusys.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kegogrog</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-12449</link>
		<dc:creator>kegogrog</dc:creator>
		<pubDate>Sun, 03 Oct 2010 07:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-12449</guid>
		<description>I have to disagree a bit. Though in my try for a settler like map I aimed for hexagons too, I came to the conclusion that you can do it better with just triangles (I mean, 6 triangles are a hex). And for the pathfinding: I&#039;m pretty sure, movement is just calculated for triangles edges. Split up your hexes, block some vertices and A* is king. Regards</description>
		<content:encoded><![CDATA[<p>I have to disagree a bit. Though in my try for a settler like map I aimed for hexagons too, I came to the conclusion that you can do it better with just triangles (I mean, 6 triangles are a hex). And for the pathfinding: I&#8217;m pretty sure, movement is just calculated for triangles edges. Split up your hexes, block some vertices and A* is king. Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isobar North America &#187; Settlers 2, Pathfinding and Writing Code for Fun!</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-11109</link>
		<dc:creator>Isobar North America &#187; Settlers 2, Pathfinding and Writing Code for Fun!</dc:creator>
		<pubDate>Wed, 19 May 2010 15:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-11109</guid>
		<description>[...] post originally appeared on my personal blog: http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/  The Settlers 2, Pathfinding and Writing Code for Fun! by Isobar North America, unless otherwise [...]</description>
		<content:encoded><![CDATA[<p>[...] post originally appeared on my personal blog: <a href="http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/" rel="nofollow">http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/</a>  The Settlers 2, Pathfinding and Writing Code for Fun! by Isobar North America, unless otherwise [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-9403</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Fri, 19 Feb 2010 10:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-9403</guid>
		<description>I like the challenge. How are you going to render and paint? Using canvas?

I thought about the routing as well, after all it was the idea that made me start this project (unfortunately I don&#039;t have time to commit right now). IMHO it boils down to building a minimum spanning tree through the graph. Using this, you can identify a good path; however if, as you say, flags fill up, routing gets trickier. This could be solved by using the number of items on the flags as additional cost?</description>
		<content:encoded><![CDATA[<p>I like the challenge. How are you going to render and paint? Using canvas?</p>
<p>I thought about the routing as well, after all it was the idea that made me start this project (unfortunately I don&#8217;t have time to commit right now). IMHO it boils down to building a minimum spanning tree through the graph. Using this, you can identify a good path; however if, as you say, flags fill up, routing gets trickier. This could be solved by using the number of items on the flags as additional cost?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey Sneddon</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-9399</link>
		<dc:creator>Geoffrey Sneddon</dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:33:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-9399</guid>
		<description>Yeah, it seems like a fun, somewhat insane challenge. However, now I remember what it was, it wasn&#039;t height that was causing issues (as as you say, changing the effective distance is trivial), but rather the issue of actually routing items: you don&#039;t want a pure path-finding algorithm, but also you want to do something magic (I&#039;m not entirely sure about the S2 behaviour) based upon the number of items at each flag. Getting &lt;em&gt;that&lt;/em&gt; right is going to be needed to try and get a decent implementation, and working out what the behaviour has to be is certainly going to be non-trivial.</description>
		<content:encoded><![CDATA[<p>Yeah, it seems like a fun, somewhat insane challenge. However, now I remember what it was, it wasn&#8217;t height that was causing issues (as as you say, changing the effective distance is trivial), but rather the issue of actually routing items: you don&#8217;t want a pure path-finding algorithm, but also you want to do something magic (I&#8217;m not entirely sure about the S2 behaviour) based upon the number of items at each flag. Getting <em>that</em> right is going to be needed to try and get a decent implementation, and working out what the behaviour has to be is certainly going to be non-trivial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-9391</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Thu, 18 Feb 2010 18:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-9391</guid>
		<description>Hey Geoffrey, 
wow, you wanna implement Settlers in JavaScript? Seems like one hell of a task. 

The steepness would be rather easy to incorporate i guess. There&#039;s a function that estimates the &#039;cost&#039; of a path segment that is being used by the algorithm. Right now I&#039;m using uniform cost for every segment, but changing it to return something based on the height difference wouldn&#039;t be hard. 

Cheers,
Jakob</description>
		<content:encoded><![CDATA[<p>Hey Geoffrey,<br />
wow, you wanna implement Settlers in JavaScript? Seems like one hell of a task. </p>
<p>The steepness would be rather easy to incorporate i guess. There&#8217;s a function that estimates the &#8216;cost&#8217; of a path segment that is being used by the algorithm. Right now I&#8217;m using uniform cost for every segment, but changing it to return something based on the height difference wouldn&#8217;t be hard. </p>
<p>Cheers,<br />
Jakob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey Sneddon</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-9390</link>
		<dc:creator>Geoffrey Sneddon</dc:creator>
		<pubDate>Thu, 18 Feb 2010 18:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-9390</guid>
		<description>Having been thinking about trying to make a Settlers 2 clone using Javascript, I wondered upon this… and the first thing that struck me when looking at your post is the time it took you to do this when you didn&#039;t even take into account steepness, which the original does when computing distance (but there again, I guess you can calculate the normalized distance once per road, and recompute as needed).</description>
		<content:encoded><![CDATA[<p>Having been thinking about trying to make a Settlers 2 clone using Javascript, I wondered upon this… and the first thing that struck me when looking at your post is the time it took you to do this when you didn&#8217;t even take into account steepness, which the original does when computing distance (but there again, I guess you can calculate the normalized distance once per road, and recompute as needed).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/03/settlers-2-pathfinding-and-writing-code-for-fun/comment-page-1/#comment-3825</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Mon, 18 May 2009 16:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=879#comment-3825</guid>
		<description>Hey Adam,
I thought about using OpenGL too, but eventually you want to render out bitmap tiles instead of simple lines. But I guess OpenGL is a good choice for that too. Do you have a source repository?

Cheers,
Jakob</description>
		<content:encoded><![CDATA[<p>Hey Adam,<br />
I thought about using OpenGL too, but eventually you want to render out bitmap tiles instead of simple lines. But I guess OpenGL is a good choice for that too. Do you have a source repository?</p>
<p>Cheers,<br />
Jakob</p>
]]></content:encoded>
	</item>
</channel>
</rss>

