<?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: Hex maps creation and rollover</title>
	<atom:link href="http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:12:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Alx</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-584297</link>
		<dc:creator>Alx</dc:creator>
		<pubDate>Mon, 31 May 2010 09:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-584297</guid>
		<description>for (x=0; x&lt;grid_x_size; x++) {
	for (y=0; y&lt;grid_y_size; y++) {
		hexagon_x_position = hexagon_width*x+(y%2)*hexagon_width/2;
		hexagon_y_position = hexagon_height*y/4*3;
		hexagon_number = x+y*grid_x_size;
		hexagon_movieclip = attachMovie(&quot;hhexagon&quot;, &quot;hhexagon_&quot;+hexagon_number, hexagon_number, {_x:hexagon_x_position, _y:hexagon_y_position});
		hexagon_movieclip.gotoAndStop(1);
		hexagon_movieclip.txt.text = hexagon_number;
	}
}
This cicle do the work. It is creating a virtual tile params, like hexagon X and Y positions, number of tile on the map, and attach movieclip from library with a tile image/animation, assigning to it all virtual params. Only thing i&#039;m couldn&#039;t tell surelly is does &quot;hexagon_movieclip&quot; array, object, or just a temporal variable with movieclip pointer. Since it&#039;s not appear in further code, i&#039;m suggest it&#039;s just temporal.</description>
		<content:encoded><![CDATA[<p>for (x=0; x&lt;grid_x_size; x++) {<br />
	for (y=0; y&lt;grid_y_size; y++) {<br />
		hexagon_x_position = hexagon_width*x+(y%2)*hexagon_width/2;<br />
		hexagon_y_position = hexagon_height*y/4*3;<br />
		hexagon_number = x+y*grid_x_size;<br />
		hexagon_movieclip = attachMovie(&quot;hhexagon&quot;, &quot;hhexagon_&quot;+hexagon_number, hexagon_number, {_x:hexagon_x_position, _y:hexagon_y_position});<br />
		hexagon_movieclip.gotoAndStop(1);<br />
		hexagon_movieclip.txt.text = hexagon_number;<br />
	}<br />
}<br />
This cicle do the work. It is creating a virtual tile params, like hexagon X and Y positions, number of tile on the map, and attach movieclip from library with a tile image/animation, assigning to it all virtual params. Only thing i&#039;m couldn&#039;t tell surelly is does &quot;hexagon_movieclip&quot; array, object, or just a temporal variable with movieclip pointer. Since it&#039;s not appear in further code, i&#039;m suggest it&#039;s just temporal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alx</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-584264</link>
		<dc:creator>Alx</dc:creator>
		<pubDate>Mon, 31 May 2010 06:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-584264</guid>
		<description>&gt;&gt;if(delta_sector_y&lt;(hexagon_height/2-delta_sector_x*gradient))
Could you, please, tell why we divide hexagon height by two here, don&#039;t use it next and divide by 4 at last two conditions? I&#039;m spend a night to understand it, and could not. :(</description>
		<content:encoded><![CDATA[<p>&gt;&gt;if(delta_sector_y&lt;(hexagon_height/2-delta_sector_x*gradient))<br />
Could you, please, tell why we divide hexagon height by two here, don&#039;t use it next and divide by 4 at last two conditions? I&#039;m spend a night to understand it, and could not. :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: theo</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-564740</link>
		<dc:creator>theo</dc:creator>
		<pubDate>Tue, 06 Apr 2010 13:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-564740</guid>
		<description>Where are the hexagons defined?
I don&#039;t understand where in the script they are drawn.</description>
		<content:encoded><![CDATA[<p>Where are the hexagons defined?<br />
I don&#8217;t understand where in the script they are drawn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finding adjacent cells in an hex map : Emanuele Feronato - italian geek and PROgrammer</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-123938</link>
		<dc:creator>Finding adjacent cells in an hex map : Emanuele Feronato - italian geek and PROgrammer</dc:creator>
		<pubDate>Wed, 23 Apr 2008 17:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-123938</guid>
		<description>[...] This tutorial continues Hex maps creation and rollover. [...]</description>
		<content:encoded><![CDATA[<p>[...] This tutorial continues Hex maps creation and rollover. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prankard</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-123456</link>
		<dc:creator>Prankard</dc:creator>
		<pubDate>Wed, 23 Apr 2008 01:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-123456</guid>
		<description>Not sure how on earth to contact you.
I&#039;ve converted this to AS3 code quickly (I like AS3), if you want me to email it to you I&#039;ve left my email here so you can contact.

Some nice code, I&#039;d like to interoperate it into a game in the future for a turn based strategy game.</description>
		<content:encoded><![CDATA[<p>Not sure how on earth to contact you.<br />
I&#8217;ve converted this to AS3 code quickly (I like AS3), if you want me to email it to you I&#8217;ve left my email here so you can contact.</p>
<p>Some nice code, I&#8217;d like to interoperate it into a game in the future for a turn based strategy game.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slasher145</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-121766</link>
		<dc:creator>Slasher145</dc:creator>
		<pubDate>Sun, 20 Apr 2008 22:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-121766</guid>
		<description>Really good, could be used for a few things.</description>
		<content:encoded><![CDATA[<p>Really good, could be used for a few things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JDog</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-121553</link>
		<dc:creator>JDog</dc:creator>
		<pubDate>Sun, 20 Apr 2008 14:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-121553</guid>
		<description>Thats cool, you should do a Hexic clone with this !</description>
		<content:encoded><![CDATA[<p>Thats cool, you should do a Hexic clone with this !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-121552</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Sun, 20 Apr 2008 14:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-121552</guid>
		<description>What kind of game are you going to make with this? It&#039;s really cool.</description>
		<content:encoded><![CDATA[<p>What kind of game are you going to make with this? It&#8217;s really cool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: styxtwo</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-121518</link>
		<dc:creator>styxtwo</dc:creator>
		<pubDate>Sun, 20 Apr 2008 13:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-121518</guid>
		<description>very cool, im going to use this for &quot;level selection&quot;</description>
		<content:encoded><![CDATA[<p>very cool, im going to use this for &#8220;level selection&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ptz</title>
		<link>http://www.emanueleferonato.com/2008/04/20/hex-maps-creation-and-rollover/#comment-121500</link>
		<dc:creator>ptz</dc:creator>
		<pubDate>Sun, 20 Apr 2008 13:09:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=257#comment-121500</guid>
		<description>nice! just a step from HOMM fight ;p</description>
		<content:encoded><![CDATA[<p>nice! just a step from HOMM fight ;p</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 5/11 queries in 0.019 seconds using disk: basic

Served from: www.emanueleferonato.com @ 2012-02-10 22:46:58 -->
