Hi<br><br>I&#39;m maintaining Konquest (ok, problem is : I don&#39;t really know what to do...)<br>I started maintaining it for KDE4 only, I never looked at the KDE 3.5 code and honestly I don&#39;t want to, I think it&#39;d be a great waste of time to backport the changes : scalable graphics (even without svg), better user interface, better AI...
<br>The AI patch has been integrated in KDE4, and it was a shame it wasn&#39;t applied before in KDE3.5.<br>The distance computation code in KDE4 is the following :<br>&nbsp;&nbsp;&nbsp; Coordinate&nbsp; diff = p1-&gt;sector()-&gt;coord() - p2-&gt;sector()-&gt;coord();
<br>&nbsp;&nbsp;&nbsp; return sqrt( double( ( diff.x() * diff.x() )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + ( diff.y() * diff.y() ) ) ) / 2;<br>And it&#39;s mathematically correct. The distance between two points is half the square root of the sum of square differences... (hard to explain)
<br>If you have two points, (0, 0) and (1, 1). The distance between them is sqrt(2)/2<br>With your computation code, it&#39;s 1 ==&gt; there is no difference between going to (1,0), (0,1) and (1,1)<br><br>Also please before modifying Konquest : look at the KDE4 version.
<br>I don&#39;t think it&#39;s worth the effort of maintaining the KDE 3 version considering that KDE3 end is near, most distributions are now packaging KDE 4 parts (for instance Suse 10.3 will include Kdegames 4...), and KDE 4 games are just great.
<br><br>Of course, I&#39;m open to any suggestion on Konquest, and the same apply for other kde games. But for konquest, please... don&#39;t care about the KDE 3 version, I don&#39;t want to play with that code :p<br><br>
<br><div><span class="gmail_quote">On 5/20/07, <b class="gmail_sendername">Jack Grahl</b> &lt;<a href="mailto:mnvl16@yahoo.co.uk">mnvl16@yahoo.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi there,<br>I&#39;ve written a modification to the &#39;distance&#39; function in Konquest, which calculates the distance between planets. The new function is essentially the same, but changes the order of operations to better conserve accuracy. The accuracy isn&#39;t critical since the number of turns ships take to travel between planets is obviously an integer. However the new function is more understandable (when using the ruler) and easier to estimate by eye (since it is closer to usual distance in the plane). Of course this changes the strategy, but not critically since the relative distances of the planets are more important than their layout in the plane.
<br>I was also wondering whether this game is being actively maintained at the moment. Someone submitted a nice patch several years ago which improved the AI for the game and would have simplified improving it further, by abstracting it from the core game engine. This patch doesn&#39;t seem to ever have been applied. There are also several more modifications to this game I&#39;d like to do gradually - mainly to do with useability. Perhaps someone could let me know what the situation is?
<br>Best wishes,<br>Jack Grahl<br><br><br>--- kdegames-3.5.5/kdegames-3.5.5/konquest/gamecore.cc&nbsp;&nbsp;2007-05-19 21:26:38.000000000 +0100<br>+++ kdegames-3.5.5-dist/kdegames-3.5.5/konquest/gamecore.cc&nbsp;&nbsp;&nbsp;&nbsp; 2005-09-10 09:18:23.000000000
 +0100<br>@@ -49,10 +49,10 @@<br> double<br> CoreLogic::distance( Planet *p1, Planet *p2 )<br> {<br>-&nbsp;&nbsp;&nbsp;&nbsp;int k = (p1-&gt;getSector().getRow() - p2-&gt;getSector().getRow());<br>-&nbsp;&nbsp;&nbsp;&nbsp;int l = (p1-&gt;getSector().getColumn() - p2-&gt;getSector().getColumn());
<br>+&nbsp;&nbsp;&nbsp;&nbsp;int k = (p1-&gt;getSector().getRow() - p2-&gt;getSector().getRow()) / 2;<br>+&nbsp;&nbsp;&nbsp;&nbsp;int l = (p1-&gt;getSector().getColumn() - p2-&gt;getSector().getColumn()) / 2;<br><br>-&nbsp;&nbsp;&nbsp;&nbsp;return (sqrt(double((k*k) + (l*l))) / 2);
<br>+&nbsp;&nbsp;&nbsp;&nbsp;return sqrt(double((k*k) + (l*l)));<br> }<br><br> double<br><br><br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;___________________________________________________________<br>Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
<br>now.<br><a href="http://uk.answers.yahoo.com/">http://uk.answers.yahoo.com/</a><br>_______________________________________________<br>kde-games-devel mailing list<br><a href="mailto:kde-games-devel@kde.org">kde-games-devel@kde.org
</a><br><a href="https://mail.kde.org/mailman/listinfo/kde-games-devel">https://mail.kde.org/mailman/listinfo/kde-games-devel</a><br></blockquote></div><br>