<?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>Ashley Etchell &#187; space trading game</title>
	<atom:link href="http://ash.etchell.co.uk/tag/space-trading-game/feed/" rel="self" type="application/rss+xml" />
	<link>http://ash.etchell.co.uk</link>
	<description>Its all a bit random</description>
	<lastBuildDate>Mon, 05 Jul 2010 16:02:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>More 3D ship renders</title>
		<link>http://ash.etchell.co.uk/2009/09/29/more-3d-ship-renders/</link>
		<comments>http://ash.etchell.co.uk/2009/09/29/more-3d-ship-renders/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 22:24:25 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[3D spaceship]]></category>
		<category><![CDATA[space trading game]]></category>
		<category><![CDATA[top down 2d game]]></category>

		<guid isPermaLink="false">http://ash.etchell.co.uk/?p=68</guid>
		<description><![CDATA[Its all quite exciting.. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>Its all quite exciting..<br />
<div id="attachment_69" class="wp-caption aligncenter" style="width: 459px"><img src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/3d-rendar2.jpg" alt="Top down view" title="3d--render2" width="449" height="281" class="size-full wp-image-69" /><p class="wp-caption-text">Top down view</p></div></p>
<div id="attachment_70" class="wp-caption aligncenter" style="width: 459px"><img src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/3d-rendar3.jpg" alt="Cant wait to see this when its finished" title="3d--render3" width="449" height="199" class="size-full wp-image-70" /><p class="wp-caption-text">Cant wait to see this when its finished</p></div>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://ash.etchell.co.uk/2009/09/29/more-3d-ship-renders/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://ash.etchell.co.uk/2009/09/29/more-3d-ship-renders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3D ship Render</title>
		<link>http://ash.etchell.co.uk/2009/09/27/3d-ship-render/</link>
		<comments>http://ash.etchell.co.uk/2009/09/27/3d-ship-render/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 21:25:28 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[3D spaceship]]></category>
		<category><![CDATA[space trading game]]></category>
		<category><![CDATA[top down 2d game]]></category>

		<guid isPermaLink="false">http://ash.etchell.co.uk/?p=62</guid>
		<description><![CDATA[A Friend of mine who has a talent for 3D work is doing a model of one of the ships in Far Trader. I can&#8217;t wait to see the finished thing. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_63" class="wp-caption aligncenter" style="width: 459px"><img src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/3d-rendar1.jpg" alt="The start of the Far Trader mkII ship" title="3d--rendar1" width="449" height="281" class="size-full wp-image-63" /><p class="wp-caption-text">The start of the Far Trader mkII ship</p></div>A <a href="http://www.flash-fx.net">Friend of mine</a> who has a talent for 3D work is doing a model of one of the ships in Far Trader. I can&#8217;t wait to see the finished thing.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://ash.etchell.co.uk/2009/09/27/3d-ship-render/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://ash.etchell.co.uk/2009/09/27/3d-ship-render/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Maker Radar system</title>
		<link>http://ash.etchell.co.uk/2009/09/26/game-maker-radar-system/</link>
		<comments>http://ash.etchell.co.uk/2009/09/26/game-maker-radar-system/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 00:27:55 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Game Maker tutorials]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[game maker radar system]]></category>
		<category><![CDATA[GML]]></category>
		<category><![CDATA[space trading game]]></category>
		<category><![CDATA[top down 2d game]]></category>

		<guid isPermaLink="false">http://ash.etchell.co.uk/?p=54</guid>
		<description><![CDATA[I noticed someone had arrived at this site by searching for  &#8217;Game Maker radar code&#8217;.  The radar system I am using in this game might not be what everyone wants, but here it is anyway.  The premise goes something like &#8230; <a href="http://ash.etchell.co.uk/2009/09/26/game-maker-radar-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I noticed someone had arrived at this site by searching for  &#8217;Game Maker radar code&#8217;.  The radar system I am using in this game might not be what everyone wants, but here it is anyway.</p>
<p><strong> The premise goes something like this:</strong></p>
<p>1. The player object in Far Trader creates a background image that is attached to the player object itself which gives an illusion of a rad projection.<br />
2. Each AI ship instance spawns a radar contact object in its Create Event with the x and y value of the player. This will make a radar contact sprite for each and every spaceship object in the room appear at the players location.</p>
<div id="attachment_55" class="wp-caption aligncenter" style="width: 459px"><img class="size-full wp-image-55" title="Example of radar system" src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/radar-example.gif" alt="Example of radar system" width="449" height="300" /><p class="wp-caption-text">Example of radar system</p></div>
<p><strong>The code looks like:</strong></p>
<p>Each AI ship instance has in its <strong>Create Event</strong><br />
<code><br />
scannerRange=2000; // distance in pixels that objects can be detected<br />
radarContact=instance_create(obj_player.x,obj_player.y,obj_ship_contact);<br />
</code></p>
<p>Then in the AI ship instances&#8217;s <strong>End Step</strong> <strong>Event</strong> add:</p>
<p><code>dist = point_distance(x,y,obj_player.x,obj_player.y);<br />
if(dist &gt; scannerRange) {<br />
// hide the sprite<br />
radarContact.image_alpha = 0.0;<br />
} else {<br />
// set sprite alpha as a % of dist from scannerRange<br />
alpha = 100 - ((dist / scannerRange) * 100) ;<br />
radarContact.image_alpha=alpha / 100 ;<br />
}<br />
if(dist &lt; scannerRange) {<br />
if(dist &lt; 390) {<br />
radarBlip=dist;<br />
} else {<br />
radarBlip=390;<br />
}<br />
pDirection=point_direction(x,y,obj_player.x,obj_player.y);<br />
radarContact.x = obj_player.x - lengthdir_x(radarBlip , pDirection);<br />
radarContact.y = obj_player.y - lengthdir_y(radarBlip , pDirection);<br />
}</code></p>
<p>The above code will pull the radar contact instance away from the player object back to its creator instance, up to a maximum of 390 pixels. The 390 pixel limit is to match the background image attached to the player object, it can be any distance you desire, as long as its visible on the screen! All radar contacts that are greater than scannerRange pixels away have there alpha set to 0.0, which means they are not visible. Once the contact is in scannerRange, the code will set its alpha value to a % of the distance, to give an impression of range, the further away the contact, the more transparent the contact object.</p>
<p>The above is just an example of how I implemented the radar, code. In my game I actually have the code in a script, so that its easy to apply do a number of different object types. I hope someone finds it of use.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://ash.etchell.co.uk/2009/09/26/game-maker-radar-system/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://ash.etchell.co.uk/2009/09/26/game-maker-radar-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Far Trader &#8211; Docking and HUD</title>
		<link>http://ash.etchell.co.uk/2009/09/25/far-trader-docking-and-hud/</link>
		<comments>http://ash.etchell.co.uk/2009/09/25/far-trader-docking-and-hud/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 23:48:28 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[game maker]]></category>
		<category><![CDATA[space trading game]]></category>
		<category><![CDATA[top down 2d game]]></category>

		<guid isPermaLink="false">http://ash.etchell.co.uk/?p=47</guid>
		<description><![CDATA[This week has been all about getting docking working. As trading will be the focus of the game, a system for docking at places to trade is pretty much essential. Along side the docking process comes the HUD. For now, &#8230; <a href="http://ash.etchell.co.uk/2009/09/25/far-trader-docking-and-hud/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week has been all about getting docking working. As trading will be the focus of the game, a system for docking at places to trade is pretty much essential. Along side the docking process comes the HUD. For now, the HUD shows some basic information such as ship hull damage, fuel level, throttle indicator, speed, grid reference etc. I have also created a radar system that centres around the player object. This radar gives a nice accurate system for showing where you are in relation to other objects in the room (hat tip to <a href="http://www.birdinsky.com">3030 Deathwar</a> for that idea).</p>
<p>Additionally, I have created a test system for changing the players ship. Object inheritance and changing is possible in Game Maker, but not something that I have found easy (until I finally started to read the GM Manual!), so now you can switch between 2 different ships that have different stats on the fly.</p>
<p>Docking has been a complicated affair as im still learning GML, but It has forced me to restructure a lot of the code in the process, producing a more organised application structure.</p>
<p>Wont say any more at the moment, but heres some screen grabs:</p>
<div class="mceTemp mceIEcenter">
<div id="attachment_48" class="wp-caption aligncenter" style="width: 459px"><img class="size-full wp-image-48" title="Docking" src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/ft-docking.gif" alt="the HUD display with docking ring active" width="449" height="236" /><p class="wp-caption-text">the HUD display with docking ring active</p></div>
</div>
<div id="attachment_49" class="wp-caption aligncenter" style="width: 459px"><img class="size-full wp-image-49" title="more ships" src="http://ash.etchell.co.uk/wp-content/uploads/2009/09/ft-more-ships.gif" alt="More ship sprites" width="449" height="142" /><p class="wp-caption-text">More ship sprites</p></div>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://ash.etchell.co.uk/2009/09/25/far-trader-docking-and-hud/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://ash.etchell.co.uk/2009/09/25/far-trader-docking-and-hud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
