<?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: Distractions Deluxe</title>
	<atom:link href="http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/</link>
	<description>A tri-annual 48 hour solo game development competition.</description>
	<pubDate>Tue, 14 Oct 2008 05:58:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: rchilton1980</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-2736</link>
		<dc:creator>rchilton1980</dc:creator>
		<pubDate>Tue, 15 Jul 2008 18:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-2736</guid>
		<description>If I understood it correctly, I think this problem has a closed form solution using the quadratic formula. 

Here is an approach for solving the constant acceleration case. http://board.flashkit.com/board/showthread.php?t=754442
(View post #20)

And here are a few remarks about reducing it to the constant velocity case.
http://board.flashkit.com/board/showthread.php?t=771117
(Check post #6)

PS: Sorry to resurrect this old post but didn't see a satisfactory explanation listed here. Love your SFXR program!</description>
		<content:encoded><![CDATA[<p>If I understood it correctly, I think this problem has a closed form solution using the quadratic formula. </p>
<p>Here is an approach for solving the constant acceleration case. <a href="http://board.flashkit.com/board/showthread.php?t=754442" rel="nofollow">http://board.flashkit.com/board/showthread.php?t=754442</a><br />
(View post #20)</p>
<p>And here are a few remarks about reducing it to the constant velocity case.<br />
<a href="http://board.flashkit.com/board/showthread.php?t=771117" rel="nofollow">http://board.flashkit.com/board/showthread.php?t=771117</a><br />
(Check post #6)</p>
<p>PS: Sorry to resurrect this old post but didn&#8217;t see a satisfactory explanation listed here. Love your SFXR program!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RB[0]</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1148</link>
		<dc:creator>RB[0]</dc:creator>
		<pubDate>Sat, 19 Apr 2008 21:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1148</guid>
		<description>LOL :)
Ok, sorry then :)

Off in lala land over here - which is why I'm not competing - so I guess I missed you didn't want that particular solution :/

Good luck the rest of the compo ;)</description>
		<content:encoded><![CDATA[<p>LOL <img src='http://www.ludumdare.com/compo/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Ok, sorry then <img src='http://www.ludumdare.com/compo/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Off in lala land over here - which is why I&#8217;m not competing - so I guess I missed you didn&#8217;t want that particular solution :/</p>
<p>Good luck the rest of the compo <img src='http://www.ludumdare.com/compo/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DrPetter</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1147</link>
		<dc:creator>DrPetter</dc:creator>
		<pubDate>Sat, 19 Apr 2008 21:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1147</guid>
		<description>Yeah, that would be the iterative solution. Easy to understand and implement, usually fast enough to use as well (particularly if coded well and using binary search or even better methods using local slope etc) BUT the point was to find an analytical/exact solution, just for the "fun" of it :P
(I generally prefer iterative as it's more like making my computer do the thinking and me getting on with more interesting stuff, also I like to stop at a point where I still fully understand what's going on)</description>
		<content:encoded><![CDATA[<p>Yeah, that would be the iterative solution. Easy to understand and implement, usually fast enough to use as well (particularly if coded well and using binary search or even better methods using local slope etc) BUT the point was to find an analytical/exact solution, just for the &#8220;fun&#8221; of it <img src='http://www.ludumdare.com/compo/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
(I generally prefer iterative as it&#8217;s more like making my computer do the thinking and me getting on with more interesting stuff, also I like to stop at a point where I still fully understand what&#8217;s going on)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RB[0]</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1146</link>
		<dc:creator>RB[0]</dc:creator>
		<pubDate>Sat, 19 Apr 2008 21:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1146</guid>
		<description>well  depending on how fast you want it - you could brute-force it.

ie: (pseudo code code, ---- = tab ;) )

tpos = target.pos
mpos = turret.pos

time = 1

Lpos = target.pos + target.vel * time
bpos = turret.pos + angle_to_target * time

while not bpos == Lpos:
----if bpos is too far - overshot:
--------time -= how_far_overshot
----if bpos is too short - undershot:
--------time += how_far_undershot
----recalculate Lpos and bpos


If that makes any sense...
Basically, test where the target will be in 1 sec,
find how close to the target your shot would be in 1 sec - moving towards the new target pos.
Then adjust the time until you find a collision...

But depending on how much you are doing this it could be kinda slow...</description>
		<content:encoded><![CDATA[<p>well  depending on how fast you want it - you could brute-force it.</p>
<p>ie: (pseudo code code, &#8212;- = tab <img src='http://www.ludumdare.com/compo/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>tpos = target.pos<br />
mpos = turret.pos</p>
<p>time = 1</p>
<p>Lpos = target.pos + target.vel * time<br />
bpos = turret.pos + angle_to_target * time</p>
<p>while not bpos == Lpos:<br />
&#8212;-if bpos is too far - overshot:<br />
&#8212;&#8212;&#8211;time -= how_far_overshot<br />
&#8212;-if bpos is too short - undershot:<br />
&#8212;&#8212;&#8211;time += how_far_undershot<br />
&#8212;-recalculate Lpos and bpos</p>
<p>If that makes any sense&#8230;<br />
Basically, test where the target will be in 1 sec,<br />
find how close to the target your shot would be in 1 sec - moving towards the new target pos.<br />
Then adjust the time until you find a collision&#8230;</p>
<p>But depending on how much you are doing this it could be kinda slow&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LunarCrisis</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1145</link>
		<dc:creator>LunarCrisis</dc:creator>
		<pubDate>Sat, 19 Apr 2008 21:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1145</guid>
		<description>My answer:
http://www.ludumdare.com/compo/2008/04/19/re-distractions-deluxe/</description>
		<content:encoded><![CDATA[<p>My answer:<br />
<a href="http://www.ludumdare.com/compo/2008/04/19/re-distractions-deluxe/" rel="nofollow">http://www.ludumdare.com/compo/2008/04/19/re-distractions-deluxe/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DrPetter</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1144</link>
		<dc:creator>DrPetter</dc:creator>
		<pubDate>Sat, 19 Apr 2008 21:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1144</guid>
		<description>According to my scribblings above it should "simply" be a problem of finding t. When you know the time it'll take the bullet to arrive at its destination you can also calculate the angle it needs to be fired in. Finding the position of the target at that time is equivalent to finding the time itself since the position is just start+velocity*time.
HOWEVER - how long it takes depends on which angle you fire in, and all that... so the problem isn't so simple after all (depending on who you ask of course, math geeks are probably laughing).
This all seems like a routine exam question. I'm just lucky I don't have to take that exam.</description>
		<content:encoded><![CDATA[<p>According to my scribblings above it should &#8220;simply&#8221; be a problem of finding t. When you know the time it&#8217;ll take the bullet to arrive at its destination you can also calculate the angle it needs to be fired in. Finding the position of the target at that time is equivalent to finding the time itself since the position is just start+velocity*time.<br />
HOWEVER - how long it takes depends on which angle you fire in, and all that&#8230; so the problem isn&#8217;t so simple after all (depending on who you ask of course, math geeks are probably laughing).<br />
This all seems like a routine exam question. I&#8217;m just lucky I don&#8217;t have to take that exam.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deathz0rz</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1139</link>
		<dc:creator>deathz0rz</dc:creator>
		<pubDate>Sat, 19 Apr 2008 20:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1139</guid>
		<description>If you mean: vector math dot product simple, then yes, you're right.</description>
		<content:encoded><![CDATA[<p>If you mean: vector math dot product simple, then yes, you&#8217;re right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RB[0]</title>
		<link>http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1138</link>
		<dc:creator>RB[0]</dc:creator>
		<pubDate>Sat, 19 Apr 2008 20:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/2008/04/19/distractions-deluxe/#comment-1138</guid>
		<description>Why not just figure out where the target will be when the bullet should hit it?

It should simply be a problem of finding where the bullet will be in the time it will take for the bullet to reach that spot...

I don't have a specific algorithm or anything ATM  but I'd think it would be fairly simple...</description>
		<content:encoded><![CDATA[<p>Why not just figure out where the target will be when the bullet should hit it?</p>
<p>It should simply be a problem of finding where the bullet will be in the time it will take for the bullet to reach that spot&#8230;</p>
<p>I don&#8217;t have a specific algorithm or anything ATM  but I&#8217;d think it would be fairly simple&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
