<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sharp World &#187; asteroid</title>
	<atom:link href="http://sharpmix.net/blog/tag/asteroid/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharpmix.net/blog</link>
	<description>It&#039;s about C# and video games !</description>
	<lastBuildDate>Fri, 18 Sep 2009 15:43:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Asteroid</title>
		<link>http://sharpmix.net/blog/2009/09/17/asteroid-game/</link>
		<comments>http://sharpmix.net/blog/2009/09/17/asteroid-game/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:46:25 +0000</pubDate>
		<dc:creator>Abdallah Fdal</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video games]]></category>
		<category><![CDATA[asteroid]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://s219861678.onlinehome.fr/blog/?p=127</guid>
		<description><![CDATA[For making an asteroid game,
I found it hard at first but it&#8217;s quite easy.

One of Newton&#8217;s law : In the absence of a net external force, a body either is at rest or moves with constant velocity.
We are evolving in space so the last phrase part is our algorithm.
But you might have encountered some problems [...]]]></description>
			<content:encoded><![CDATA[<p>For making an asteroid game,</p>
<p>I found it hard at first but it&#8217;s quite easy.</p>
<p><a href="http://sharpmix.net/blog/wp-content/uploads/2009/09/Asteroid.jpg"><img src="http://sharpmix.net/blog/wp-content/uploads/2009/09/Asteroid-300x225.jpg" alt="Asteroid" title="Asteroid" width="300" height="225" class="aligncenter size-medium wp-image-337" /></a></p>
<p><a href="http://en.wikipedia.org/wiki/Newton%27s_laws_of_motion">One of Newton&#8217;s law</a> : <em>In the absence of a net external force, a body either is at rest or moves with constant velocity.</em></p>
<p>We are evolving in space so the last phrase part is our algorithm.</p>
<p>But you might have encountered some problems if you are very new to games programming, like how do I make all these things move ?</p>
<p>It&#8217;s simple,</p>
<ul>
<li>When you change the direction of your ship, you need to keep a reference of the angle your ship is pointing at.</li>
<li>With this angle, using trigonometry you will get a vector which is what you need.</li>
</ul>
<p>And math magics will do the rest !</p>
<p>There are a couple of other issues you need to handle like,</p>
<ul>
<li>Limiting velocity of your ship or soon it will go very fast,</li>
<li>Wrap your angle,</li>
<li>Screen dimensions,</li>
<li>etc &#8230;</li>
</ul>
<p>You will soon find out that the core of games is quite short, but the polishing is very long.</p>
<p>Here is the source for controlling the ship : <a href='http://sharpmix.net/blog/wp-content/uploads/2009/09/Asteroid.zip'>Asteroid</a></p>
<p>In the next article, I will show you how to implement weapons, monsters and rocks &#8230; that in turn involves a couple of other things &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://sharpmix.net/blog/2009/09/17/asteroid-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
