<?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: Optimization problem</title>
	<atom:link href="https://mm.soldat.pl/development-log/optimization-problem/feed" rel="self" type="application/rss+xml" />
	<link>https://mm.soldat.pl/development-log/optimization-problem</link>
	<description>Michał Marcinkowski&#039;s: Gamedev Log &#38; Articles</description>
	<lastBuildDate>Tue, 24 Mar 2026 04:51:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>By: Makron666</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-93356</link>
		<dc:creator><![CDATA[Makron666]]></dc:creator>
		<pubDate>Thu, 28 May 2009 08:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-93356</guid>
		<description><![CDATA[What about angle checking: if the angle of a node is 0, remove that node?]]></description>
		<content:encoded><![CDATA[<p>What about angle checking: if the angle of a node is 0, remove that node?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MM</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-93001</link>
		<dc:creator><![CDATA[MM]]></dc:creator>
		<pubDate>Fri, 22 May 2009 22:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-93001</guid>
		<description><![CDATA[Thanks guys. It gave me some ideas, although most of your propositions would be too slow for what I&#039;m planning (thousands of these lines?). I think I need to do some spatial hashing first and then apply some easy trick.

&lt;i&gt;This is what you should’ve done from the start instead of talking about inspirational crap ( which you do over a beer and not on a blog ).&lt;/i&gt;

I code over a beer and blog about inspiration ;p.]]></description>
		<content:encoded><![CDATA[<p>Thanks guys. It gave me some ideas, although most of your propositions would be too slow for what I&#8217;m planning (thousands of these lines?). I think I need to do some spatial hashing first and then apply some easy trick.</p>
<p><i>This is what you should’ve done from the start instead of talking about inspirational crap ( which you do over a beer and not on a blog ).</i></p>
<p>I code over a beer and blog about inspiration ;p.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snow</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92988</link>
		<dc:creator><![CDATA[Snow]]></dc:creator>
		<pubDate>Fri, 22 May 2009 18:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92988</guid>
		<description><![CDATA[If you rush design you produce a piece of crap. That&#039;s general knowledge. 

Amazing that there is one now and then that is actually angry that they&#039;re not getting something for free fast enough lol.]]></description>
		<content:encoded><![CDATA[<p>If you rush design you produce a piece of crap. That&#8217;s general knowledge. </p>
<p>Amazing that there is one now and then that is actually angry that they&#8217;re not getting something for free fast enough lol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DARK AVENGER</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92969</link>
		<dc:creator><![CDATA[DARK AVENGER]]></dc:creator>
		<pubDate>Fri, 22 May 2009 13:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92969</guid>
		<description><![CDATA[Michal .. at last you&#039;ve started writing some fucking code for a change.
What you want is to cluster points in sets of collinear points.
Here&#039;s a link treating a similar problem and some algorithms are discussed in there.
http://discuss.joelonsoftware.com/default.asp?interview.11.576927.12
Also , 

This is what you should&#039;ve done from the start instead of talking about inspirational crap ( which you do over a beer and not on a blog ).]]></description>
		<content:encoded><![CDATA[<p>Michal .. at last you&#8217;ve started writing some fucking code for a change.<br />
What you want is to cluster points in sets of collinear points.<br />
Here&#8217;s a link treating a similar problem and some algorithms are discussed in there.<br />
<a href="http://discuss.joelonsoftware.com/default.asp?interview.11.576927.12" rel="nofollow">http://discuss.joelonsoftware.com/default.asp?interview.11.576927.12</a><br />
Also , </p>
<p>This is what you should&#8217;ve done from the start instead of talking about inspirational crap ( which you do over a beer and not on a blog ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Awsom</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92967</link>
		<dc:creator><![CDATA[Awsom]]></dc:creator>
		<pubDate>Fri, 22 May 2009 10:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92967</guid>
		<description><![CDATA[I love this gay]]></description>
		<content:encoded><![CDATA[<p>I love this gay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gheft</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92932</link>
		<dc:creator><![CDATA[gheft]]></dc:creator>
		<pubDate>Thu, 21 May 2009 23:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92932</guid>
		<description><![CDATA[this might work?

for a in lines
  as = a.slope
  for b in lines
    if as==b.slope
      if a.1==b.2
	a.1 = b.1
	delete b
      else if a.2==b.1
	a.2 = b.2
	delete b]]></description>
		<content:encoded><![CDATA[<p>this might work?</p>
<p>for a in lines<br />
  as = a.slope<br />
  for b in lines<br />
    if as==b.slope<br />
      if a.1==b.2<br />
	a.1 = b.1<br />
	delete b<br />
      else if a.2==b.1<br />
	a.2 = b.2<br />
	delete b</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snow</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92914</link>
		<dc:creator><![CDATA[Snow]]></dc:creator>
		<pubDate>Thu, 21 May 2009 15:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92914</guid>
		<description><![CDATA[This is similar to line tools within some graphic and photo-editing software. The beginning and end of a drawn line are detected, then based on curves, dots are plotted out at certain angles to keep the path on top of the line. These tools usually have an optimization option allowing you to decrease or increase the points on the line. If you can find some info and code for that feature - I bet, it would definitely help you out. You might even be able to put in an adjustable optimization in your engine, depending on what lines are for what.]]></description>
		<content:encoded><![CDATA[<p>This is similar to line tools within some graphic and photo-editing software. The beginning and end of a drawn line are detected, then based on curves, dots are plotted out at certain angles to keep the path on top of the line. These tools usually have an optimization option allowing you to decrease or increase the points on the line. If you can find some info and code for that feature &#8211; I bet, it would definitely help you out. You might even be able to put in an adjustable optimization in your engine, depending on what lines are for what.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riaan</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92898</link>
		<dc:creator><![CDATA[Riaan]]></dc:creator>
		<pubDate>Thu, 21 May 2009 10:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92898</guid>
		<description><![CDATA[@Monx, your app looks neat, but there is one bug. If you place points A, then point B, then point C so that A lies in the middle, then optimize, then your app will erase point B.

&quot;I didn’t add that I don’t store the lines that easily.
They are just stored as a list of pairs (2 points), not as big connected lines. So its a bit harder.&quot;
hmmm...]]></description>
		<content:encoded><![CDATA[<p>@Monx, your app looks neat, but there is one bug. If you place points A, then point B, then point C so that A lies in the middle, then optimize, then your app will erase point B.</p>
<p>&#8220;I didn’t add that I don’t store the lines that easily.<br />
They are just stored as a list of pairs (2 points), not as big connected lines. So its a bit harder.&#8221;<br />
hmmm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riaan</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92896</link>
		<dc:creator><![CDATA[Riaan]]></dc:creator>
		<pubDate>Thu, 21 May 2009 10:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92896</guid>
		<description><![CDATA[The dot product method will work the best. It (could) tell you the angle between 3 points, and if that angle is close to +-180 then they are in a straight line. It will work for 3d points as well. Don&#039;t use &quot;gradient&quot; method, because it will be very inconsistent - what if delta y is very small or zero?.]]></description>
		<content:encoded><![CDATA[<p>The dot product method will work the best. It (could) tell you the angle between 3 points, and if that angle is close to +-180 then they are in a straight line. It will work for 3d points as well. Don&#8217;t use &#8220;gradient&#8221; method, because it will be very inconsistent &#8211; what if delta y is very small or zero?.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Monx</title>
		<link>https://mm.soldat.pl/development-log/optimization-problem/comment-page-1#comment-92867</link>
		<dc:creator><![CDATA[Monx]]></dc:creator>
		<pubDate>Thu, 21 May 2009 04:09:12 +0000</pubDate>
		<guid isPermaLink="false">http://mm.soldat.pl/?p=310#comment-92867</guid>
		<description><![CDATA[@nadult: That&#039;s what i did too.
http://spamtheweb.com/ul/upload/210509/3088_lineOptimisation.php]]></description>
		<content:encoded><![CDATA[<p>@nadult: That&#8217;s what i did too.<br />
<a href="http://spamtheweb.com/ul/upload/210509/3088_lineOptimisation.php" rel="nofollow">http://spamtheweb.com/ul/upload/210509/3088_lineOptimisation.php</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
