<?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"
	>
<channel>
	<title>Comments on: Asteroids 2.03: New Asteroid Shapes</title>
	<atom:link href="http://flashforlearning.com/2005/04/asteroids-203-new-asteroid-shapes/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashforlearning.com/2005/04/asteroids-203-new-asteroid-shapes/</link>
	<description>Knowledge Management &#62; Learning Strategy &#62; E-Learning &#62; Flash</description>
	<pubDate>Wed, 07 Jan 2009 04:07:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Aaron</title>
		<link>http://flashforlearning.com/2005/04/asteroids-203-new-asteroid-shapes/#comment-4</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://beta.aaron21.com/?p=8#comment-4</guid>
		<description>Thanks a lot for the tip, Grant!  

I *knew* there had to be an easier way than what I was originally trying to do, and while my currently displayed solution works, there's not a lot of differentiation  in the appearance of the asteroids.

I attended your presentation at FlashForward 2005, and while it's been a long while since I picked up Flash, you reminded me why I started playing with it back in 1996, which is why I'm revisiting old projects with AS2 now.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the tip, Grant!  </p>
<p>I <em>knew</em> there had to be an easier way than what I was originally trying to do, and while my currently displayed solution works, there&#8217;s not a lot of differentiation  in the appearance of the asteroids.</p>
<p>I attended your presentation at FlashForward 2005, and while it&#8217;s been a long while since I picked up Flash, you reminded me why I started playing with it back in 1996, which is why I&#8217;m revisiting old projects with AS2 now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Skinner</title>
		<link>http://flashforlearning.com/2005/04/asteroids-203-new-asteroid-shapes/#comment-5</link>
		<dc:creator>Grant Skinner</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://beta.aaron21.com/?p=8#comment-5</guid>
		<description>Noticed your trackback ping, and thought I might be able to help. Probably the best algorithm for generating random asteroids is to rotate around a central point, drawing lines a random distance away from the center at random increments. Difficult to explain using English, but easy to code:
&lt;br /&gt;&lt;br /&gt;
var radius:Number = 30;&lt;br /&gt;
lineStyle(0,0xFFFFFF,100);&lt;br /&gt;
beginFill(0,50);&lt;br /&gt;
moveTo(0,radius);&lt;br /&gt;
var rotation:Number = 0;&lt;br /&gt;
while (rotation &#60; Math.PI*2-1/2) {&lt;br /&gt;
&#160;&#160;&#160;rotation += 1/4+random(100)/500;&lt;br /&gt;
&#160;&#160;&#160;var z:Number = radius+random(radius/2);&lt;br /&gt;
&#160;&#160;&#160;lineTo(Math.sin(rotation)*z,Math.cos(rotation)*z);&lt;br /&gt;
}&lt;br /&gt;
lineTo(0,radius);&lt;br /&gt;
&lt;br /&gt;
I used this logic to create my simple asteroids game:  &lt;a href="http://www.gskinner.com/blog/archives/2005/02/tiny_addictive.html" rel="nofollow"&gt;http://www.gskinner.com/blog/archives/2005/02/tiny_addictive.html&lt;/a&gt;
</description>
		<content:encoded><![CDATA[<p>Noticed your trackback ping, and thought I might be able to help. Probably the best algorithm for generating random asteroids is to rotate around a central point, drawing lines a random distance away from the center at random increments. Difficult to explain using English, but easy to code:</p>
<p>var radius:Number = 30;<br />
lineStyle(0,0xFFFFFF,100);<br />
beginFill(0,50);<br />
moveTo(0,radius);<br />
var rotation:Number = 0;<br />
while (rotation &lt; Math.PI<em>2-1/2) {<br />
&nbsp;&nbsp;&nbsp;rotation += 1/4+random(100)/500;<br />
&nbsp;&nbsp;&nbsp;var z:Number = radius+random(radius/2);<br />
&nbsp;&nbsp;&nbsp;lineTo(Math.sin(rotation)</em>z,Math.cos(rotation)*z);<br />
}<br />
lineTo(0,radius);</p>
<p>I used this logic to create my simple asteroids game:  <a href="http://www.gskinner.com/blog/archives/2005/02/tiny_addictive.html" rel="nofollow">http://www.gskinner.com/blog/archives/2005/02/tiny_addictive.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
