<?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 for Red Clover Blog</title>
	<atom:link href="http://redclovergames.com/blog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://redclovergames.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 29 Mar 2012 08:36:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>Comment on Wizard Apprentice by Jim</title>
		<link>http://redclovergames.com/blog/?page_id=538&#038;cpage=1#comment-2805</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Thu, 29 Mar 2012 08:36:59 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?page_id=538#comment-2805</guid>
		<description>I agree with Alex - a big POOF at the end would fit nicely :)

Fun game.


First key = go into middle cell, and look right (you can&#039;t use telekinesis until you find your wizards hat (so E when close enough).</description>
		<content:encoded><![CDATA[<p>I agree with Alex &#8211; a big POOF at the end would fit nicely <img src='http://redclovergames.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Fun game.</p>
<p>First key = go into middle cell, and look right (you can&#8217;t use telekinesis until you find your wizards hat (so E when close enough).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hexagon of Hexagons by Lampis</title>
		<link>http://redclovergames.com/blog/?p=305&#038;cpage=1#comment-2747</link>
		<dc:creator>Lampis</dc:creator>
		<pubDate>Mon, 30 Jan 2012 15:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=305#comment-2747</guid>
		<description>Great clarification, thanks again. :)</description>
		<content:encoded><![CDATA[<p>Great clarification, thanks again. <img src='http://redclovergames.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HexTactics: Prototype Build 1 by Josh</title>
		<link>http://redclovergames.com/blog/?p=563&#038;cpage=1#comment-2746</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Mon, 30 Jan 2012 13:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=563#comment-2746</guid>
		<description>I did use the free version of A* from Aron Granberg... incredible A* toolkit if you ask me.  Maybe I can work up a tutorial to explain how I used it... but if you want to dabble, my approach was to add an empty game object to every tile called &quot;NavPoint&quot; in the center of the tile.  I created a new Tag in Unity called &quot;NavPointTag&quot; and set the Tag of the NavPoint object to &quot;NavPointTag&quot;.  Then, using his getting started docs (http://www.arongranberg.com/astar/docs/getstarted.php), created an A* object and used a ListGraph, set the Tag to &quot;NavPointTag&quot;, set the max range to an appropriate size and clicked Scan.  This generated a perfect path graph for a hexagonal map.  Then I use a Seeker object (http://www.arongranberg.com/astar/docs/calling-pathfinding.php) to find nodes given a starting location (the current unit) and the ending location (the tile that the user clicked on).

Now, regarding the mouse tile selection.  My technique is similar to this (http://answers.unity3d.com/questions/134412/selecting-and-unselecting-objects-with-raycast.html), but I&#039;m sure there are other ways to manage it. Each tile has a MeshCollider attached to it, so I use a Physics.RayCast from the camera through the mouse cursor and if the object I clicked on is a Hex Tile (by looking at a component on the raycast hit object), then I&#039;ve selected a tile!</description>
		<content:encoded><![CDATA[<p>I did use the free version of A* from Aron Granberg&#8230; incredible A* toolkit if you ask me.  Maybe I can work up a tutorial to explain how I used it&#8230; but if you want to dabble, my approach was to add an empty game object to every tile called &#8220;NavPoint&#8221; in the center of the tile.  I created a new Tag in Unity called &#8220;NavPointTag&#8221; and set the Tag of the NavPoint object to &#8220;NavPointTag&#8221;.  Then, using his getting started docs (<a href="http://www.arongranberg.com/astar/docs/getstarted.php" rel="nofollow">http://www.arongranberg.com/astar/docs/getstarted.php</a>), created an A* object and used a ListGraph, set the Tag to &#8220;NavPointTag&#8221;, set the max range to an appropriate size and clicked Scan.  This generated a perfect path graph for a hexagonal map.  Then I use a Seeker object (<a href="http://www.arongranberg.com/astar/docs/calling-pathfinding.php" rel="nofollow">http://www.arongranberg.com/astar/docs/calling-pathfinding.php</a>) to find nodes given a starting location (the current unit) and the ending location (the tile that the user clicked on).</p>
<p>Now, regarding the mouse tile selection.  My technique is similar to this (<a href="http://answers.unity3d.com/questions/134412/selecting-and-unselecting-objects-with-raycast.html" rel="nofollow">http://answers.unity3d.com/questions/134412/selecting-and-unselecting-objects-with-raycast.html</a>), but I&#8217;m sure there are other ways to manage it. Each tile has a MeshCollider attached to it, so I use a Physics.RayCast from the camera through the mouse cursor and if the object I clicked on is a Hex Tile (by looking at a component on the raycast hit object), then I&#8217;ve selected a tile!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hexagon of Hexagons by Josh</title>
		<link>http://redclovergames.com/blog/?p=305&#038;cpage=1#comment-2745</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Mon, 30 Jan 2012 13:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=305#comment-2745</guid>
		<description>Hi Lampis!  Glad some of the code is helpful to someone!

Both of the code samples should give you the same result.  The difference is whether or not the tiles are parented to another game object or not.  In my case, I am setting each tile as a child of a single grid object (so I could for example shift the grid object around and all tiles move with it), so I represent the tile&#039;s coordinates in terms of &lt;b&gt;local&lt;/b&gt; coordinates instead of &lt;b&gt;world&lt;/b&gt; coordinates.

In your code, by passing the position vector directly into the Instantiate function, you are declaring the &lt;b&gt;world&lt;/b&gt; coordinates for the tile, not relative to any parent.

Here are some links that might help:
http://unity3d.com/support/documentation/ScriptReference/Transform-localPosition.html
http://answers.unity3d.com/questions/40439/whats-the-difference-between-transformlocalpositio.html

Keep at it!  And send me links when you have something to share. :)</description>
		<content:encoded><![CDATA[<p>Hi Lampis!  Glad some of the code is helpful to someone!</p>
<p>Both of the code samples should give you the same result.  The difference is whether or not the tiles are parented to another game object or not.  In my case, I am setting each tile as a child of a single grid object (so I could for example shift the grid object around and all tiles move with it), so I represent the tile&#8217;s coordinates in terms of <b>local</b> coordinates instead of <b>world</b> coordinates.</p>
<p>In your code, by passing the position vector directly into the Instantiate function, you are declaring the <b>world</b> coordinates for the tile, not relative to any parent.</p>
<p>Here are some links that might help:<br />
<a href="http://unity3d.com/support/documentation/ScriptReference/Transform-localPosition.html" rel="nofollow">http://unity3d.com/support/documentation/ScriptReference/Transform-localPosition.html</a><br />
<a href="http://answers.unity3d.com/questions/40439/whats-the-difference-between-transformlocalpositio.html" rel="nofollow">http://answers.unity3d.com/questions/40439/whats-the-difference-between-transformlocalpositio.html</a></p>
<p>Keep at it!  And send me links when you have something to share. <img src='http://redclovergames.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HexTactics: Prototype Build 1 by Lampis</title>
		<link>http://redclovergames.com/blog/?p=563&#038;cpage=1#comment-2742</link>
		<dc:creator>Lampis</dc:creator>
		<pubDate>Sun, 29 Jan 2012 23:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=563#comment-2742</guid>
		<description>By the way, any chance to post some code and explain how to select with the mouse the hex you want?</description>
		<content:encoded><![CDATA[<p>By the way, any chance to post some code and explain how to select with the mouse the hex you want?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HexTactics: Prototype Build 1 by Lampis</title>
		<link>http://redclovergames.com/blog/?p=563&#038;cpage=1#comment-2741</link>
		<dc:creator>Lampis</dc:creator>
		<pubDate>Sun, 29 Jan 2012 22:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=563#comment-2741</guid>
		<description>Great work as usual. Can you tell me more about A*, did you use the free version of Aron Granberg?</description>
		<content:encoded><![CDATA[<p>Great work as usual. Can you tell me more about A*, did you use the free version of Aron Granberg?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hexagon of Hexagons by Lampis</title>
		<link>http://redclovergames.com/blog/?p=305&#038;cpage=1#comment-2740</link>
		<dc:creator>Lampis</dc:creator>
		<pubDate>Sun, 29 Jan 2012 22:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?p=305#comment-2740</guid>
		<description>Your work with Hexes is an inspiration for me, as Im trying to make a hex turn based strategy game. Thank you for posting this.
I have a question about your code.
Instead of:
                    GameObject tile = (GameObject)Instantiate(HexTilePrefab, Vector3.zero, Quaternion.identity);
                    tile.transform.parent = gameObject.transform;
                    tile.transform.localPosition = new Vector3(x * spaceBetweenTilesHorizontal + (y &amp; 1) * inradius, 0, y * spaceBetweenTilesVertical);

I have 

GameObject tile = (GameObject)Instantiate(HexTilePrefab, new Vector3(x * spaceBetweenTilesHorizontal + (y &amp; 1) * inradius, 0, y * spaceBetweenTilesVertical);, Quaternion.identity);

which gives me the same effect. Is there a reason to use these transform and localPosition code? 
Sorry for my ignorance, I&#039;m new to Unity.</description>
		<content:encoded><![CDATA[<p>Your work with Hexes is an inspiration for me, as Im trying to make a hex turn based strategy game. Thank you for posting this.<br />
I have a question about your code.<br />
Instead of:<br />
                    GameObject tile = (GameObject)Instantiate(HexTilePrefab, Vector3.zero, Quaternion.identity);<br />
                    tile.transform.parent = gameObject.transform;<br />
                    tile.transform.localPosition = new Vector3(x * spaceBetweenTilesHorizontal + (y &amp; 1) * inradius, 0, y * spaceBetweenTilesVertical);</p>
<p>I have </p>
<p>GameObject tile = (GameObject)Instantiate(HexTilePrefab, new Vector3(x * spaceBetweenTilesHorizontal + (y &amp; 1) * inradius, 0, y * spaceBetweenTilesVertical);, Quaternion.identity);</p>
<p>which gives me the same effect. Is there a reason to use these transform and localPosition code?<br />
Sorry for my ignorance, I&#8217;m new to Unity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Wizard Apprentice by Kyle</title>
		<link>http://redclovergames.com/blog/?page_id=538&#038;cpage=1#comment-2683</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Wed, 21 Dec 2011 02:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?page_id=538#comment-2683</guid>
		<description>I love it, and I think this can be expanded so much!  I want to see more of this game! The controls were a tad bit hard to line up, but other then that, loved it</description>
		<content:encoded><![CDATA[<p>I love it, and I think this can be expanded so much!  I want to see more of this game! The controls were a tad bit hard to line up, but other then that, loved it</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Wizard Apprentice by Cameron</title>
		<link>http://redclovergames.com/blog/?page_id=538&#038;cpage=1#comment-2681</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Mon, 19 Dec 2011 15:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?page_id=538#comment-2681</guid>
		<description>We need help finding the first key, too!  :o)</description>
		<content:encoded><![CDATA[<p>We need help finding the first key, too!  <img src='http://redclovergames.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Wizard Apprentice by Alex</title>
		<link>http://redclovergames.com/blog/?page_id=538&#038;cpage=1#comment-2679</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 19 Dec 2011 03:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://redclovergames.com/blog/?page_id=538#comment-2679</guid>
		<description>Haha!  That was great!  I totally didn&#039;t expect to have to think! =D  I wish he exploded in a cartoon cloud at the end =D</description>
		<content:encoded><![CDATA[<p>Haha!  That was great!  I totally didn&#8217;t expect to have to think! =D  I wish he exploded in a cartoon cloud at the end =D</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://stats.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

