Note that there are some explanatory texts on larger screens.

plurals
  1. POFaster alternatives to Dijkstra's algorithm for GPS system
    primarykey
    data
    text
    <p>I'm a real speed freak if it gets to algorithms, and in the plugins I made for a game.</p> <p>The speed is.. a bit.. not satisfying. Especially while driving around with a car and you do not follow your path, the path has to be recalculated.. and it takes some time, So the in-game GPS is stacking up many "wrong way" signals (and stacking up the signals means more calculations afterward, for each wrong way move) because I want a fast, live-gps system which updates constantly.</p> <p>I changed the old algorithm (some simple dijkstra implementation) to boost::dijkstra's to calculate a path from node A to node B </p> <p>(total node list is around ~15k nodes with ~40k connections, for curious people here is the map: <a href="http://gz.pxf24.pl/downloads/prv2.jpg" rel="nofollow">http://gz.pxf24.pl/downloads/prv2.jpg</a> (12 MB), edges in the red lines are the nodes),</p> <p>but it didn't really increase in speed. (At least not noticeably, maybe 50 ms).</p> <p>The information that is stored in the Node array is:</p> <pre><code>The ID of the Node, The position of the node, All the connections to the node (and which way it is connected to the other nodes, TO, FROM, or BOTH) Distance to the connected nodes. </code></pre> <p>I'm curious if anybody knows some faster alternatives in C/C++? Any suggestions (+ code examples?) are appreciated!</p> <hr> <p>If anyone is interested in the project, here it is (source+binaries):</p> <p><a href="https://gpb.googlecode.com/files/RouteConnector_177.zip" rel="nofollow">https://gpb.googlecode.com/files/RouteConnector_177.zip</a></p> <p>In this video you can see what the gps-system is like:</p> <p><a href="http://www.youtu.be/xsIhArstyU8" rel="nofollow">http://www.youtu.be/xsIhArstyU8</a></p> <p>as you can see the red route is updating slowly (well, for us - gamers - it is slow).</p> <p>( ByTheWay: the gaps between the red lines have been fixed a long time ago :p )</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload